Linking problems on FreeBSD

David Johnson david at
Mon Feb 11 01:36:20 CET 2008

On Sunday 10 February 2008, Andreas Pakulat wrote:
> On 10.02.08 15:55:43, David Johnson wrote:
> > "CMakeFiles/kcm_filetypes.dir/kserviceselectdlg.o" -L/usr/local/lib
> > -L/usr/local/kde4/lib -lQtCore -lpthread -lkdecore -lkdeui -lkio -lkparts
> > -lQtCore -lpthread -lkdecore -lkpty -lQtXml -lQt3Support -lQtCore
> > -lpthread -lkdecore -lkdeui -lkio -lkfile -lkde3support -lutil -lkdecore
> > -lkdeui -lQtSvg -lSM -lICE -lX11 -lXext -lXft -lXau -lXdmcp -lXpm -lXtst
> > -lXcursor -lXfixes -lkio -lstreamanalyzer -lstreams -lfam -lXrender
> > -lkdecore -lQtNetwork -lz -lbz2 -lintl -lsolid -lQtCore -lpthread
> > -lQtDBus -lQtXml -lQtGui
> So the linker call is actually correct.

No, because /usr/local/lib is before /user/local/kde4/lib. That's why it's
picking up KDE3 libs out of /usr/local/lib. With
link_directories(${KDE4_LIB_DIR}), /usr/local/kde4/lib comes first, and it

> Hmm, how does LD_LIBRARY_PATH look? Whats in /etc/ (if that
> exists on BSD)? As you probably can see /usr/X11R6/lib is not even
> mentioned anyhere in the linker call, so ld must pick up these paths
> from somewhere else.

/usr/X11R6 is a link to /usr/local, and exists to keep compatibility.

There is no LD_LIBRARY_PATH currently set. FreeBSD does nto use
anymore, but the ldconfig path is set in rc.conf, which uses:
 ldconfig_paths="/usr/lib/compat /usr/X11R6/lib /usr/local/lib

David Johnson

More information about the Kde-buildsystem mailing list