This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Compiling Amarok with QT in non-standart directory

Tags: None
(comma "," separated)
sweddd
Registered Member
Posts
3
Karma
0
OS
Hello!
Amarok version 2.3.0
My Qt is located is /usr/qt

I run : cmake ../amarok-2.3.0 -DCMAKE_INSTALL_PREFIX=/usr

Its OK. Now in CmakeCache.txt, i can see all QTDirs are OK :

(...etc...)
CMakeCache.txt:QT_LIBRARY_DIR:PATH=/usr/qt/lib
CMakeCache.txt:QT_QTSVG_LIBRARY:FILEPATH=/usr/qt/lib/libQtSvg.so
(...etc... same path for all qtlibs)

Now i run : grep -Ril "/usr/lib/qt/" .
The wrong path is still present in some files :

( ...etc...)
./src/aboutdialog/libattica-ocsclient/CMakeFiles/amarokocsclient.dir/link.txt
./src/aboutdialog/libattica-ocsclient/CMakeFiles/amarokocsclient.dir/build.make
./src/aboutdialog/libattica-ocsclient/cmake_install.cmake
( ...etc... (around 50 files))

And I think thats why im getting this error during 'make' :
(please note the libpath is wrong, but same was ok in cmakecache) :

make[2]: *** No rule to make target `/usr/lib/qt/lib/libQtSvg.so', needed by `lib/libamarokocsclient.so.4.3.0'. Stop.
make[1]: *** [src/aboutdialog/libattica-ocsclient/CMakeFiles/amarokocsclient.dir/all] Error 2

Did I do something wrong ?
I tried forcing QTLIB paths in cmake, but that didn't work.

Thanks.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Is /usr/qt/bin the first item in $PATH? Qt executables are used by KDE to find where Qt is installed.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
sweddd
Registered Member
Posts
3
Karma
0
OS
Thanks for your answer.

Yes, /usr/qt/bin is the first item in my $PATH.
"which qtconfig" gaves "/usr/qt/bin/qtconfig" (there is only one QT install on my system).

If /usr/qt/bin is not in my PATH ; cmake will produce an error : "QtMake not found".
In my case, cmake ends successfully.

I resolved the problem, executing this command between cmake and make, to replace the wrong path :
for file in `grep -Ril "/usr/lib/qt/" .`; do sed -i -e 's/\/usr\/lib\/qt\//\/usr\/qt\//g' $file; done

Now, it compiles fine.

Should I report this AS A BUG ???

Thanks.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
If the output of "qmake --version" is like the following, please file a report, otherwise you will need to recompile Qt with the appropriate prefix.

Using Qt version <your Qt version, doesn't matter what it is> in /usr/qt/lib


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
sweddd
Registered Member
Posts
3
Karma
0
OS
Ok,
Thanks for your answer ;

QMake version 2.01a
Using Qt version 4.6.2 in /usr/qt/lib

So i'll report this as a bug as soon as i have time;
Bye !


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]