Linking problems on FreeBSD
Andreas Pakulat
apaku at gmx.de
Sun Feb 10 22:55:46 CET 2008
On 10.02.08 13:45:10, David Johnson wrote:
> 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.
How does the actual linker call look like? (make VERBOSE=1)
Can you check wether link_directories(${KDE4_LIB_DIR}) helps? Thats
something that is needed for CMake 2.6 support anyway and if we have a
need for this with cmake 2.4 it may speed up getting this into svn.
Andreas
--
You will be awarded some great honor.
More information about the Kde-buildsystem
mailing list