FreeBSD build problem
David Johnson
david at usermode.org
Mon Jul 7 01:57:32 CEST 2008
I am having some problems building kde 4.0.83. A few executables are linking
with the KDE3 libraries. So far these are kdialog, kfind and kmenuedit. I
have only built up to kdebase/kdebase-workspace so far.
Currently in FreeBSD, KDE3 is installed to /usr/local. We have given Qt4 and
KDE4 their own private directories to live in, but in the meantime *every*
user has KDE3 in /usr/local.
The problem occurs because in these three apps, -L/usr/local/lib is being
listed before -L/usr/local/kde4/lib. That causes the app to link to KDE3 libs
instead of KDE4. This isn't happening in other apps. Looking closer, the
CMakeLists.txt for kfind has the line:
target_link_libraries(kfind ${KDE4_KDE3SUPPORT_LIBS} )
This results in the the following library
locations: -L/usr/local/lib/qt4 -L/usr/local/lib -L/usr/local/kde4/lib
However, changing that line to add a dependency:
target_link_libraries(kfind ${KDE4_KDEUI_LIBS} ${KDE4_KDE3SUPPORT_LIBS} )
now results in a better library order:
-L/usr/local/lib/qt4 -L/usr/local/kde4/lib -L/usr/local/lib
Obviously, I shouldn't have to add superflous dependencies. But I can't figure
out how cmake generates the order of libraries. I have no idea how to fix
this. I also notice that some dependencies are listed with their full path,
but others not. If all dependencies could be listed by path it would solve
this. But I have no idea how to do it.
Any help would be appreciated.
--
David Johnson
More information about the Kde-buildsystem
mailing list