cmake and RPATH

Thiago Macieira thiago at kde.org
Thu Feb 16 17:11:48 CET 2006


Brad King wrote:
>Including an rpath pointing at the build tree has been a default in
>CMake for many years.  All of Kitware's projects run both from the build
>tree and from the install tree so it makes sense for us (and is great
>for debugging).

I think installing a binary with the rpath pointing to the build-tree is a 
no-no. That's just unclean.

My position is, of course, biased: I'm a library developer. That means I 
break the library. I don't want applications that are running or being 
run in my desktop to load the library I am hacking on.

Also, take into account that linking takes a considerable amount of time 
on a KDE build. I've just built kdebase on a 20-node compile farm. It 
took 32 minutes: the last 10 of which were spent linking, without hitting 
the compile farm at all. Installation took another 4 minutes.

That means 14 minutes that could be spent building 50% of the next module  
in my build (kdepim). Imagine if I had been using cmake's 
relink-when-installing feature: it would have been ~20 minutes * 19 
machines of CPU time wasted, or a 42% increase in starvation.

So I think KDE needs a default which is to have rpath point to the 
installation point but not the build-tree.

PS: 32 minutes to build kdebase was only possible because it did a flat 
build without make(1). Using make would've made the compilation take much 
longer, since I'd have got 20 ld processes running simultaneously and 
hitting my disk for I/O.
-- 
  Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358

1. On frumscafte, hwonne time_t wæs náht, se scieppend þone circolwyrde 
wundorcræftlíge cennede and seo eorðe wæs idel and hit wæs gód.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-buildsystem/attachments/20060216/06ebdfc0/attachment-0001.pgp 


More information about the Kde-buildsystem mailing list