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
On Thu, 9 Jul 2020 at 08:07, DV Henkel-Wallace via Boost-users
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
libc++ is not binary compatible with libstdc++. You need to use either libstdc++ or libc++ with both compilers if you want binary compatibility. This doesn't have anything to do with Boost.
On Jul 9, 2020, at 04:25, Mathias Gaunard
wrote: On Thu, 9 Jul 2020 at 08:07, DV Henkel-Wallace via Boost-users
wrote: 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
libc++ is not binary compatible with libstdc++. You need to use either libstdc++ or libc++ with both compilers if you want binary compatibility.
This doesn't have anything to do with Boost.
Thanks Mathias. I did not express my problem clearly. This is a b2 issue; I doubt any _library source code_ has any direct interaction with this and I'm sorry if I accidentally gave that impression. Is there a way to get b2 to disgorge the environment and tool invocation of each step (basically what is passed to system() or exec())? The background, perhaps clarified: We have our own code, some third party code (like Boost) and of course different runtime platforms (Mac, iOS, Linux...). Since different platforms use different compilers/runtimes as their "native" stack, our development system builds everything end-to-end with both gcc and clang to catch problems as early as possible. All compilation is with c++14 or later, post the C++11 ABI break, hence the naming issues. This process isolates us from any system libraries that don't have C linkage. Therefore g++ is used to compile libstdc++, boost, other third party code, and our code. Symbols are generated that use __c++11:: in their name. And clang++ is used to compile libc++, boost, other third party code, and our code. Symbols are generated that use use __1:: in their name. But boost itself is compiled via b2 and what is passed to the compiler (and which compiler b2 chooses) is quite opaque. Despite my attempts to force the use of clang it appears that b2 is either calling g++ or otherwise asking clang to use g++-style symbol linkage on Linux. On the Mac the same invocation behaves as expected. 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 Any thoughts on how to debug this?
-----Original Message----- From: Boost-users
On Behalf Of DV Henkel-Wallace via Boost- users Sent: 9 July 2020 15:41 To: Mathias Gaunard Cc: DV Henkel-Wallace ; boost-users@lists.boost.org Subject: Re: [Boost-users] Boost ABI/Linkage of clang vs g++ On Jul 9, 2020, at 04:25, Mathias Gaunard
wrote: On Thu, 9 Jul 2020 at 08:07, DV Henkel-Wallace via Boost-users
wrote: 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
libc++ is not binary compatible with libstdc++. You need to use either libstdc++ or libc++ with both compilers if you want binary compatibility.
This doesn't have anything to do with Boost.
Thanks Mathias. I did not express my problem clearly. This is a b2 issue; I doubt any _library source code_ has any direct interaction with this and I'm sorry if I accidentally gave that impression. Is there a way to get b2 to disgorge the environment and tool invocation of each step (basically what is passed to system() or exec())?
The background, perhaps clarified:
We have our own code, some third party code (like Boost) and of course different runtime platforms (Mac, iOS, Linux...). Since different platforms use different compilers/runtimes as their "native" stack, our development system builds everything end-to-end with both gcc and clang to catch problems as early as possible. All compilation is with c++14 or later, post the C++11 ABI break, hence the naming issues. This process isolates us from any system libraries that don't have C linkage.
Therefore g++ is used to compile libstdc++, boost, other third party code, and our code. Symbols are generated that use __c++11:: in their name. And clang++ is used to compile libc++, boost, other third party code, and our code. Symbols are generated that use use __1:: in their name.
But boost itself is compiled via b2 and what is passed to the compiler (and which compiler b2 chooses) is quite opaque. Despite my attempts to force the use of clang it appears that b2 is either calling g++ or otherwise asking clang to use g++-style symbol linkage on Linux. On the Mac the same invocation behaves as expected.
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
Any thoughts on how to debug this?
Does b2 -debug-configuration help? https://boostorg.github.io/build/manual/master/index.html section 3.3 configuration ☀ You can use the --debug-configuration option to find which configuration files are actually loaded. Paul
the reality is that most of us have no time to read the fuckin'docs, coz my wife would like diner in time today. Boost is not helpful in maintaining my family-relationships. The latter are my top-priorities. More and more Boost is in-compatible with my definition of being a happy chappy and based on this I try to avoid Boost, becoz daddy has to work to much, reading all that old shit a.o.t. helping me to fix a small bit of irrelevant (in the global picture) without getting a cross-examination to determine whether we would like to help degski to achieve his main goal in life, that is to say taking care of my loved ones some of them carrying half my genes (i.e. a bad copy of myself, they call those children, they are in the branch devel. and they are the future. On Thu, 9 Jul 2020 at 18:52, Paul A. Bristow via Boost-users < boost-users@lists.boost.org> wrote:
-----Original Message----- From: Boost-users
On Behalf Of DV Henkel-Wallace via Boost- users Sent: 9 July 2020 15:41 To: Mathias Gaunard Cc: DV Henkel-Wallace ; boost-users@lists.boost.org Subject: Re: [Boost-users] Boost ABI/Linkage of clang vs g++ On Jul 9, 2020, at 04:25, Mathias Gaunard < mathias.gaunard@ens-lyon.org> wrote:
On Thu, 9 Jul 2020 at 08:07, DV Henkel-Wallace via Boost-users
wrote: 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
libc++ is not binary compatible with libstdc++. You need to use either libstdc++ or libc++ with both compilers if you want binary compatibility.
This doesn't have anything to do with Boost.
Thanks Mathias. I did not express my problem clearly. This is a b2 issue; I doubt any _library source code_ has any direct interaction with this and I'm sorry if I accidentally gave that impression. Is there a way to get b2 to disgorge the environment and tool invocation of each step (basically what is passed to system() or exec())?
The background, perhaps clarified:
We have our own code, some third party code (like Boost) and of course different runtime platforms (Mac, iOS, Linux...). Since different platforms use different compilers/runtimes as their "native" stack, our development system builds everything end-to-end with both gcc and clang to catch problems as early as possible. All compilation is with c++14 or later, post the C++11 ABI break, hence the naming issues. This process isolates us from any system libraries that don't have C linkage.
Therefore g++ is used to compile libstdc++, boost, other third party code, and our code. Symbols are generated that use __c++11:: in their name. And clang++ is used to compile libc++, boost, other third party code, and our code. Symbols are generated that use use __1:: in their name.
But boost itself is compiled via b2 and what is passed to the compiler (and which compiler b2 chooses) is quite opaque. Despite my attempts to force the use of clang it appears that b2 is either calling g++ or otherwise asking clang to use g++-style symbol linkage on Linux. On the Mac the same invocation behaves as expected.
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
Any thoughts on how to debug this?
Does b2 -debug-configuration help?
https://boostorg.github.io/build/manual/master/index.html section 3.3 configuration
☀ You can use the --debug-configuration option to find which configuration files are actually loaded.
Paul
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org https://lists.boost.org/mailman/listinfo.cgi/boost-users
i forgot the most important to all: "go suck eggs, please".
On Fri, 17 Jul 2020 at 03:46, degski
the reality is that most of us have no time to read the fuckin'docs, coz my wife would like diner in time today. Boost is not helpful in maintaining my family-relationships. The latter are my top-priorities. More and more Boost is in-compatible with my definition of being a happy chappy and based on this I try to avoid Boost, becoz daddy has to work to much, reading all that old shit a.o.t. helping me to fix a small bit of irrelevant (in the global picture) without getting a cross-examination to determine whether we would like to help degski to achieve his main goal in life, that is to say taking care of my loved ones some of them carrying half my genes (i.e. a bad copy of myself, they call those children, they are in the branch devel. and they are the future.
On Thu, 9 Jul 2020 at 18:52, Paul A. Bristow via Boost-users < boost-users@lists.boost.org> wrote:
-----Original Message----- From: Boost-users
On Behalf Of DV Henkel-Wallace via Boost- users Sent: 9 July 2020 15:41 To: Mathias Gaunard Cc: DV Henkel-Wallace ; boost-users@lists.boost.org Subject: Re: [Boost-users] Boost ABI/Linkage of clang vs g++ On Jul 9, 2020, at 04:25, Mathias Gaunard < mathias.gaunard@ens-lyon.org> wrote:
On Thu, 9 Jul 2020 at 08:07, DV Henkel-Wallace via Boost-users
wrote: 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
libc++ is not binary compatible with libstdc++. You need to use either libstdc++ or libc++ with both compilers if you want binary compatibility.
This doesn't have anything to do with Boost.
Thanks Mathias. I did not express my problem clearly. This is a b2 issue; I doubt any _library source code_ has any direct interaction with this and I'm sorry if I accidentally gave that impression. Is there a way to get b2 to disgorge the environment and tool invocation of each step (basically what is passed to system() or exec())?
The background, perhaps clarified:
We have our own code, some third party code (like Boost) and of course different runtime platforms (Mac, iOS, Linux...). Since different platforms use different compilers/runtimes as their "native" stack, our development system builds everything end-to-end with both gcc and clang to catch problems as early as possible. All compilation is with c++14 or later, post the C++11 ABI break, hence the naming issues. This process isolates us from any system libraries that don't have C linkage.
Therefore g++ is used to compile libstdc++, boost, other third party code, and our code. Symbols are generated that use __c++11:: in their name. And clang++ is used to compile libc++, boost, other third party code, and our code. Symbols are generated that use use __1:: in their name.
But boost itself is compiled via b2 and what is passed to the compiler (and which compiler b2 chooses) is quite opaque. Despite my attempts to force the use of clang it appears that b2 is either calling g++ or otherwise asking clang to use g++-style symbol linkage on Linux. On the Mac the same invocation behaves as expected.
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
Any thoughts on how to debug this?
Does b2 -debug-configuration help?
https://boostorg.github.io/build/manual/master/index.html section 3.3 configuration
☀ You can use the --debug-configuration option to find which configuration files are actually loaded.
Paul
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org https://lists.boost.org/mailman/listinfo.cgi/boost-users
Am 09.07.20 um 16:40 schrieb DV Henkel-Wallace via Boost-users:
On Jul 9, 2020, at 04:25, Mathias Gaunard
wrote: On Thu, 9 Jul 2020 at 08:07, DV Henkel-Wallace via Boost-users
wrote: 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
libc++ is not binary compatible with libstdc++. You need to use either libstdc++ or libc++ with both compilers if you want binary compatibility.
This doesn't have anything to do with Boost.
Thanks Mathias. I did not express my problem clearly. This is a b2 issue; I doubt any _library source code_ has any direct interaction with this and I'm sorry if I accidentally gave that impression. Is there a way to get b2 to disgorge the environment and tool invocation of each step (basically what is passed to system() or exec())?
The background, perhaps clarified:
We have our own code, some third party code (like Boost) and of course different runtime platforms (Mac, iOS, Linux...). Since different platforms use different compilers/runtimes as their "native" stack, our development system builds everything end-to-end with both gcc and clang to catch problems as early as possible. All compilation is with c++14 or later, post the C++11 ABI break, hence the naming issues. This process isolates us from any system libraries that don't have C linkage.
Therefore g++ is used to compile libstdc++, boost, other third party code, and our code. Symbols are generated that use __c++11:: in their name. And clang++ is used to compile libc++, boost, other third party code, and our code. Symbols are generated that use use __1:: in their name.
But boost itself is compiled via b2 and what is passed to the compiler (and which compiler b2 chooses) is quite opaque. Despite my attempts to force the use of clang it appears that b2 is either calling g++ or otherwise asking clang to use g++-style symbol linkage on Linux. On the Mac the same invocation behaves as expected.
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
Any thoughts on how to debug this?
Just a wild guess, but could it be that your combined value for environment variable CXX is not used verbatim by b2? You should probably try to set CXX only to the compiler-executable and put the `-stdlib=libc++` option into CXXFLAGS environment variable. If b2 has an option `stdlib=libc++` I am also not sure. For me it always succeeds by building Boost with Clang and libc++ like this: ``` ./b2 toolset=clang cxxflags="-std=c++20 -stdlib=libc++" linkflags="-stdlib=libc++" cxxstd=20 install ... ``` Probably I could omit the `cxxflags` option but I have not tried it lately. Hope that helps, Deniz -- BENOCS GmbH Dipl.-Inform. Deniz Bahadir Reuchlinstr. 10 D 10553 Berlin Germany Phone: +49 - 30 / 577 0004-22 Email: deniz.bahadir@benocs.com www.benocs.com Board of Management: Stephan Schröder, Dr.-Ing. Ingmar Poese Commercial Register: Amtsgericht Bonn HRB 19378
participants (5)
-
degski
-
Deniz Bahadir
-
DV Henkel-Wallace
-
Mathias Gaunard
-
pbristow@hetp.u-net.com