Boost logo

Boost :

From: Rainer Deyke (rdeyke_at_[hidden])
Date: 2024-03-12 08:01:31


On 11.03.24 17:11, Marshall Clow via Boost wrote:
> On Mar 11, 2024, at 3:40 AM, Rainer Deyke via Boost <boost_at_[hidden]> wrote:
>>
>> On 07.03.24 17:44, Marshall Clow via Boost wrote:
>>> Available at: <https://boostorg.jfrog.io/artifactory/main/beta/1.85.0.beta1/source/>
>>> The SHA256 checksums are as follows:
>>> fa31215de3a4d2d010c0bc6e42cc63da76be82899f145ea6a6034b5bf3e6e297 boost_1_85_0_b1_rc1.zip
>>> 3b16d693acd4ee1745b0d9267555f7e34387527a02817f0c81bf8ec963b7c569 boost_1_85_0_b1_rc1.tar.bz2
>>> 20c7d2ccbbddeb56e618aa80960ea4dd38cbc4912b9a05fefef31c290519154e boost_1_85_0_b1_rc1.7z
>>> 7a28cd03e8e48b59a898900c953a9194b8f1efbb8c6149703b7faf08642c0cf7 boost_1_85_0_b1_rc1.tar.gz
>>> As always, the release managers would appreciate it if you download the
>>> candidate of your choice and give building it a try. Please report both
>>> success and failure, and anything else that is noteworthy.
>>
>> I can't get this release candidate to build at all. bootstrap.sh generates a non-working b2 executable. Trying to run b2 produces the following output:
>> ./b2: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by ./b2)
>> ./b2: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by ./b2)
>> ./b2: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.22' not found (required by ./b2)
>>
>> It's possible that there is something wonky with my build environment, but I can successfully build Boost 1.84 with the same environment.
>
> I just built the RC on Ubuntu using GCC 11.4. I didn’t have any problems like this.
>
> Can you share more information about your build environment?

I am trying to produce portable binaries while using modern C++, so my
policy is this:
   - Compile on a Docker image with an older OS installed (currently
Ubuntu 16.04 LTS) so that I can link to an older libc.
   - Build my own compiler (currently gcc 13.2.0) instead of relying on
the OS package manager. This means libraries are installed in
/usr/local/lib64 instead of /usr/lib.
   - Statically link everything except libc, including libstdc++ (by
setting CXXFLAGS=-static-libstdc++).
   - Deliberately don't point LD_LIBRARY_PATH to /usr/local/lib64,
because these libraries won't exist on the target system and should only
be statically linked.

The problem is that while tools/build/src/engine/build.sh respects
CXXFLAGS, bootstrap.sh deliberately clobbers CXXFLAGS from the
environment, so b2 is built dynamically linked to a version of libstdc++
that it can't find at runtime.

This explains why the b2 from the release candidate is broken. It
doesn't explain the b2 from Boost 1.84 works, even though it also
dynamically links to libstdc++.

-- 
Rainer Deyke (rainerd_at_[hidden])

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk