cmake cvs and runtime path resolution

David Faure faure at kde.org
Thu Feb 21 12:59:35 CET 2008


I just updated my cmake cvs, (cmake version 2.5-20080220), and I get this in kdelibs:

WARNING: Cannot generate a safe runtime path for target kio because there is a cycle in the constraint graph:
dir 0 is [/d/kde/build/4/kdelibs/lib]
dir 1 is [/d/kde/inst/kdesupport_trunk/lib]
dir 2 is [/d/kde/src/4/qt-copy/lib]
dir 3 is [/usr/lib]
  dir 1 must precede it due to [libstreamanalyzer.so]
  dir 2 must precede it due to [libQtSvg.so]
  dir 4 must precede it due to [libacl.so]
dir 4 is [/lib]
  dir 3 must precede it due to [libbz2.so]

which comes down to:

dir 3 is [/usr/lib]
  dir 4 must precede it due to [libacl.so]
dir 4 is [/lib]
  dir 3 must precede it due to [libbz2.so]

Which comes from the fact that libacl.so and libbz2.so are not in the same system dir, as far as cmake can see.
But they are:
ls -l /usr/lib/libbz2.so*
lrwxrwxrwx 1 root root 18 2007-12-17 17:04 /usr/lib/libbz2.so -> /lib/libbz2.so.1.0
ls -l /usr/lib/libacl.so
lrwxrwxrwx 1 root root 14 2007-12-18 20:03 /usr/lib/libacl.so -> /lib/libacl.so
(seems standard on kubuntu gutsy)

Hmm, why does cmake even care for the .so symlinks when looking at runtime paths? Runtime only uses .so.1 anyway, not .so...

Ah, but obviously it doesn't look at that, only at what the cache has to say:
CMakeCache.txt:ACL_LIBS:FILEPATH=/lib/libacl.so
CMakeCache.txt:BZIP2_LIBRARIES:FILEPATH=/usr/lib/libbz2.so
 (because there is no /lib/libbz2.so, only a .so.1)

I'm not sure what the right fix is -- apart from yelling at ubuntu :)

What's for sure is that this is a false positive; any ordering between /lib and /usr/lib would work out just fine in this setup.

-- 
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).


More information about the Kde-buildsystem mailing list