Linking problems on FreeBSD
David Johnson
david at usermode.org
Sun Feb 10 22:45:10 CET 2008
We are still having linking problems over at FreeBSD. Several libraries and
apps are being linked to KDE3 by mistake. I need to find a way to fix this.
Please help me if you can.
The problem arises because KDE3 is installed to /usr/local, along with x11 and
Qt4. KDE4 is being installed to /usr/local/kde4. I have fixed the include
path order, but I can find no way to fix the library order so
that /usr/local/kde4/lib will always come before /usr/local/lib. How cmake
generates the library link order is a mystery to me.
An example is kdm_filesystem.so. It's CMakeLists.txt has:
target_link_libraries(kcm_filetypes ${KDE4_KDE3SUPPORT_LIBS} )
In FindKDE4Internal.cmake, KDE4_KDE3SUPPORT_LIBS is set to:
${kde3support_LIB_DEPENDS} ${KDE4_KDE3SUPPORT_LIBRARY}
And in the autogenerated KDELibsDependencies.cmake, kde3support_LIB_DEPENDS is
set to:
"/usr/local/lib/libQtCore.so;-lpthread;kdecore;kdeui;kio;kparts;/usr/local/lib/libQtCore.so;-lpthread;kdecore;kpty;/usr/local/lib/libQtXml.so;/usr/local/lib/libQt3Support.so;/usr/local/lib/libQtCore.so;-lpthread;kdecore;kdeui;kio;kfile;"
With the above entries, the resulting kcm_filesystems.so has dependencies on
KDE3 libraries. If it were just this one file, then I could write a single
patch to fix it. But this is happening with lots of files, both libraries and
executables.
What do I do to ensure that the KDE4 libraries (-L/usr/local/kde4/libs) comes
before the KDE3 libraries (-L/usr/local/lib)? Please provide me an answer if
you are able. I am rapidly losing my patience with cmake.
Thank you,
--
David Johnson
More information about the Kde-buildsystem
mailing list