Subject: Re: [Boost-build] "install" rule strange behaviour
From: Vladimir Prus (ghost_at_[hidden])
Date: 2012-08-30 08:44:40
On 30.08.2012 14:43, dimak wrote:
> Conclusion: "install" rule work depends on sourced targets characteristics.
> Question 1: Is it correct?
> Question 2: How to achieve always "copying" way of install rule working?
this is expected behaviour. Suppose we have no 'explicit' anywhere. Then,
we first build executable, and the install it. And sometimes we install using
copy and sometimes using relink.
The story is that by default, if an executable is using other shared libraries, then:
- For in-tree builds, the executable is built with -Wl,-rpath, and can be run directly,
finding those libraries
- For installs, the executable is built without -Wl,-rpath
Since rpath cannot be removed by copy operation, we relink executable.
If an executable has no dependency shared libraries, then there are no rpaths in it, and
we can copy.
Now, when 'explicit' comes into play, it means than the in-tree execuable can be skipped, so
if we decide to link executable to install directory, we don't even need to produce in-tree
Does this clarifies the behaviour?
If you want to force copy, you can use <hardcode-dll-paths>false in requirements to disable
rpaths for in-tree executables.
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk