Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2023-11-16 14:01:53


Matthijs Möhlmann wrote:
> Hi,
>
> I tried to build with clang (16.0.6) and it causes a build failure.
>
> Here is the gist with the output:
> https://gist.github.com/matthijs/f60a54d6f5ce86b3ec35c83d751c9631
>
> Here is the partial output of the compile error (its the first one where
> it happens):
> /usr/bin/ld:
> bin.v2/libs/filesystem/build/clang-linux-16/release/threading-multi/visibility-
> hidden/operations.o:
> in function `boost::filesystem::detail::absolute(boost::filesystem::path
> const&, boost::filesystem::path const&, boost::system::error_code*)':
> operations.cpp:(.text+0xd8): undefined reference to `operator
> new(unsigned long)'
...

This might be caused by Filesystem adding <linkflags>"-Wl,--no-undefined"
to its build, which might (for some unfathomable reason) interfere with
your linkflags="-stdlib=libc++".

As a general rule, you should prefer using the built-in b2 features for stdlib
selection and C++ standard level; instead of

cxxflags="-I/usr/include/libcxxabi -std=c++20 -stdlib=libc++" linkflags="-stdlib=libc++"

try

stdlib=libc++ cxxstd=20

and, if needed,

include=/usr/include/libcxxabi

.


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