boost-users@lists.boost.org

We build with clang++-10 w/libc++.a and g++-10 w/libstdc++.a, so build a copy 
of boost in each configuration as well.  This works great on the Mac 
development machines but the clang case doesn't generate the correct linkage on 
the Linux deployment machines.  The correct clang linkage is 
std::__1::basic_string... but boost builds with std::__cxx11::basic_string

Here's the linkage of libc++:

$ objdump -T /usr/lib/llvm-10/lib/libc++.so.1|c++filt|grep ::basic_string|head 
-1
0000000000057450 g    DF .text  0000000000000048  Base        
std::__1::locale::locale(std::__1::basic_string<char, 
std::__1::char_traits<char>, std::__1::allocator<char> > const&)

Notice: std::__1::basic_string< ...

When compiling my own code with clang++-10 the correct symbol is generated:

$ nm options.cc.o |c++filt |fgrep __ |fgrep ::set_option_name |head -1
0000000000000000 W 
fmt::v6::basic_format_context<std::__1::back_insert_iterator<fmt::v6::internal::buffer<char>
 >, char>::iterator...

Notice std::__1:: ...

However the boost object have the wrong symbol name:

$ nm 3P/llvm/lib/libboost_program_options.a |c++filt |fgrep __ |fgrep 
::basic_string |head -1
0000000000000000 W 
boost::program_options::unknown_option::unknown_option(std::__cxx11::basic_string<char,
 std::char_traits<char>, std::allocator<char> > const&)

Notice std::__cxx11::basic_string< ...


I'm compiling boost this way:
export CC=clang CXX="clang++ -stdlib=libc++" CXXSTD=c++20 ; ./b2 stdlib=libc++ 
toolset=clang boost.locale.icu=off boost.locale.std=off --with-atomic 
--with-chrono --with-date_time --with-headers --with-locale --with-log 
--with-program_options --with-random --with-regex --with-system --with-thread 
threading=multi -sNO_COMPRESSION=1 link=static install

It's 1.73.0
_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
https://lists.boost.org/mailman/listinfo.cgi/boost-users

Reply via email to