bksys / scons (Re: win32 port)

Brad King brad.king at kitware.com
Wed Jan 11 23:21:24 CET 2006


David Faure wrote:
> On Wednesday 11 January 2006 22:38, Thiago Macieira wrote:
>>
>>A standard KDE build has rpath enabled, but developers, when developing, 
>>try to run uninstalled executables from the builddir. That means the 
>>rpath that is there will get in the way and must be dealt with.

I was under the impression that Linux frowns upon the use of rpath in 
installations.  In fact the gentoo people removed rpath support from 
CMake in their distribution of our source (or so I've heard)!  Clearly 
KDE folks are of a different opinion.  Can someone clarify when/why KDE 
uses rpath please?

> But the wrapper script which sort of emulates rpath sounds like a good idea,
> at least for developers. For users (i.e. in release mode) we probably want to 
> remove that overhead.

When implemented as a C program and not a shell script the overhead is 
very small.  The resulting program is tiny and then uses exec to replace 
itself with the full application executable (which could sit in a lib 
directory or somewhere else not in the PATH).  Compared to the time it 
takes to load and dynamically link all the shared libraries the overhead 
will not be noticable.  This approach also has the advantage that the 
installation prefix need not be known when the application is built 
since there is no need for rpath.  A tarball of the install tree can be 
extracted anywhere and the application will run out of the box.  Also no 
changes to the binaries are needed for them to run in the build tree or 
the install tree, and no one ever has to set LD_LIBRARY_PATH by hand.

-Brad


More information about the Kde-buildsystem mailing list