cmake news: RPATH

David Faure faure at kde.org
Wed Mar 22 23:56:43 CET 2006


On Thursday 16 March 2006 22:30, Alexander Neundorf wrote:
> "none" - don't use RPATH at all
> When installed, the libs have to be in the system library path 
> (ld.so.conf/LD_LIBRARY_PATH)
> To run the executables during the build, simple wrapper shell scripts are 
> created which set (DY)LD_LIBRARY_PATH accordingly.
> 
> "install" - (not on OS X)
> Compile with RPATH set to the installation directory, the kde library 
> directory and the Qt library directory.
> To run the executables during the build, simple wrapper shell scripts are 
> created which set (DY)LD_LIBRARY_PATH accordingly.
(strange, why does this option say "not on OSX", but then mention DYLD_LIBRARY_PATH
which is the OSX one?)

> "both" - (not on OS X)
> Compile with RPATH set to the build directory, the installation directory, the 
> kde library directory and the Qt library directory.
> Executables can simply be run during the build. If both libs, the installed 
> and the not-yet-installed ones are available, the not-yet-installed ones are 
> prefered. This is probably mostly useful for developers.
> 
> "default" or everything else:
> Compile with RPATH set to the builddir, link again when installing and set  
> RPATH to the install dir, the kde lib dir and the Qt lib dir.

It should be noted that since this triggers a relink during make install,
it screws everything up for people compiling as user and doing make install
as root.
Why is the default, the slow option, anyway?
Shouldn't the default be "install", which seems to be the sensible one to me?
(OK running e.g. kconfig_compiler is a tad slower but it's the option that generates
correct binaries for users and packagers, and doesn't relink during install).

Then of course the "default" option must be renamed to something else, like "builddir".

> I couldn't test, but I hope I got things right so it works on OS X too.
Things work for me on OS X (but I think I have DYLD_LIBRARY_PATH set now,
I should probably retry without). The build on Mac OS X stops in kjs due to
the __apple__ defines which assume "not kde", which allegedly the Safari guys
are working on fixing.

-- 
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