Closed iskunk closed 9 months ago
It is really difficult to provide an out-of-source build of B2 that works across the various compilers and operating systems. Hence it has never been attempted. Nor is likely to be attempted. If your goal is to build Boost in an out-of-source manner my suggestion would be to build B2 separately, i.e. copy it to a writable location, then install it. And use that installed version for building Boost. Note that the current version of B2 should work to build any version of Boost from 1.66 onward.
This issue was originally reported against bootstorg/build, but at that project's request has been transferred here.
Environment and version details
Problem description
If the source tree (
/tmp/boost_1_83_0/
in this example) is read-only, and we operate from a separate writable build directory (/tmp/boost-build/
), then guessing the toolset fails as follows:If I make the source tree writable, then the same command succeeds:
The configuration and build procedure must not write to the source tree in any way. Not only could the source tree be mounted read-only in one of various ways (NFS, Docker volume mount, ISO/SquashFS image, etc.), source tree timestamps are often used to set
SOURCE_DATE_EPOCH
in reproducible builds and writing to the source tree wrecks that.Whatever scratch space is needed by these scripts should come from the build directory or
$TMPDIR
.