-
-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Boost 1.76 and 1.77 (beta) don't create static libraries on macOS with build-type=complete #66
Comments
Forgot to note that the build does find iconv (below): Performing configuration checks
warning: Graph library does not contain MPI-based parallel components. |
Cannot reproduce, must be something on your end. |
Can you elaborate on what do you mean that you can't reproduce? Have you tried the b2 command above? Are you suggesting it is because of the cxxflags parameters? This happens for me on any of the Macs I have with 1.76 and not happening with 1.75. If you simply bootstrap.sh followed by the b2 command above should be easily reproducible. |
I also tried this on brand new Mac and it happens here too. The only thing I have installed on the Mac was Xcode + the command line tools which is of course needed to bring the toolchain. |
Doesn't happen for me on Linux with the command provided
Only guessing here but yes and especially it may "point to the real problem (e.g. no static libc++?)"
Is Boost.Locale the only library affected? Because it is literally the same for those 2 versions. Can you try again with 1.76 and attach the build log? It should rather look like |
It is entirely possible that it doesn't happen on Linux. It is a different platform and different environment. I have not tried building it for Linux (yet), but I'm able to reproduce it on macOS 100% consistently and also with different macOS versions and clang toolchains. E.g. I can reproduce it on somewhat older intel Mac with macOS Mojave and Clang 10.0.0 and very recent arm Mac (m1) with macOS Big Sur and clang 12.0.5. I can try running with the parameters you specify and will let you know, but the command line I'm using should be legit and it should work fine.
I will attach the build.log file in my next comment in a couple of days. |
I did check on Linux and this problem does not happen there, but as I mentioned above this is not surprising as Linux is quite a different env than macOS (including e.g. iconv is part of libc there unlike on the Mac). I also did try with the cxxstd=11 stdlib=libc++ parameters and this did not help. The - cxx11_auto_declarations in the log file is "yes". Attached are the two log files - one with the original b2 command line and the second with the cxxstd=11 stdlib=libc++ parameters (replacing the respective cxxflags and linkflags parameters). |
That is a good hint. Can you create another log with: |
Attached is the log with the command line above |
Sorry, digging in the dark here and I'm not to familiar with b2 myself so need to ask you for some more info. |
No worries and apologies for the delayed replies. Thank you for investigating it. See attached files (both build and config logs for the static and shared). |
Ok checked that and got (shortened) the following as the difference:
As you can see the invocation from B2 is fully correct as far as I can tell. The error from the static build is: --> We can't do much, maybe you can install/change something on your system so this works. As you said it has seemingly worked in 1.75, would you mind creating the above logs for that Boost version and on the same system too? I suspect either that it hasn't actually worked or something on your system has changed. |
I'm not sure what do you mean by "fully static builds", usually what it means is to link statically to the C++ standard library (libc++ or libstdc++), but not to link statically to libc or other OS level libraries. I believe this is also what this boost option means (runtume-link -- a.k.a. the c++ std lib runtime). I'm not sure why it fails to find this file and why the -static parameter works this way, but it clearly something with Boost.Locale because all other boost libraries (except one) are building and producing static libraries just fine. Also it builds and produces static libraries for 1.75, so it is broken only for Boost.Locale and only for 1.76 and onwards. Let me know if you want me to build some other library to diff and try to see how they are linking. Attached are the build and config files for 1.75 that you requested (for both static and shared command line). |
BTW, I will be traveling in the next week or so (in case I'm not able to respond), just fyi- |
Just to be sure: Have you used the exact same b2 cmdline for the 1.75 build? The configure checks: In 1.76: I.e. missing the -fPIC and seemingly the -static. |
Yes, I have used the same exact command lines for the 1.75 logs I sent above (see command lines below). I'm not sure why 1.76 is adding -static instead of -fPIC. ./b2 --build-dir=./bld/int --with-locale --layout=tagged runtime-debugging=off debug-symbols=on address-model=64 cxxstd=11 stdlib=libc++ runtime-link=static -d+2 --reconfigure -a --debug-building > ./build.log |
Ok, the Can you try |
On 1.75 this command line has failed with an error saying that variant=shared is invalid (see below & attached file, config file is empty): /Users/lazar/swblocks/dist-devenv5-darwin-20-arm/scratch/boost/boost_1_75_0/tools/build/src/build/feature.jam:491: in feature.validate-value-string from module feature |
Oh, my bad: It should be |
Is someone interested to look into this issue? This is still happening with boost 1.84 on macOS Ventura and it is very frustrating because effectively you can't use the boost locale library if you are linking statically. |
I'd need the build logs each for 1.75 and newer created by using |
Boost 1.76 and 1.77 Boost.Locale doesn't create the static libraries (s, sd flavors) with build-type=complete on macOS (Mojave, Bug Sur, both arm & intel). I'm using boost.locale.icu=off boost.locale.iconv=on parameters and you can see the complete b2 command below.
On Boost 1.75 it works and creates the following libraries:
libboost_locale-mt-a64.a
libboost_locale-mt-a64.dylib
libboost_locale-mt-d-a64.a
libboost_locale-mt-d-a64.dylib
libboost_locale-mt-s-a64.a
libboost_locale-mt-sd-a64.a
On Boost 1.76 and 1.77 does not create the static versions (sd & s flavors), but just the dynamic versions:
libboost_locale-mt-a64.a
libboost_locale-mt-a64.dylib
libboost_locale-mt-d-a64.a
libboost_locale-mt-d-a64.dylib
The complete b2 command used is the following:
./b2 --prefix=./bld --stagedir=./bld/stage --build-dir=./bld/int -j16 --build-type=complete --layout=tagged runtime-debugging=off debug-symbols=on address-model=64 cxxflags="-stdlib=libc++ -std=c++11 -fPIC" linkflags="-stdlib=libc++ -std=c++11 -fPIC" --without-python --without-iostreams boost.locale.icu=off boost.locale.iconv=on install > ./build.log
The text was updated successfully, but these errors were encountered: