Open KiteAnton opened 2 weeks ago
Hi @KiteAnton - thanks so much for reporting this with such detail.
I've been able to reproduce this.
All packages for Conan 2.x are built by our CI with gcc11, including for executables - this explains the error for `GLIBCXX_3.4.29'
- as that is the libstdc++ version for gcc11 (as per https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html)
I think the problem here is that since the b2
recipe does not include the compiler
setting (i suspect it should) - it is not correctly triggering a re-build on different versions of gcc - such as gcc9
for ubuntu focal.
We'll try to fix this quickly today - thanks!!
In the meantime as a workaround, you can ask Conan to rebuild b2 with --build=b2
, which would cause it to not use the binaries available in the remote.
Related: #17034 , #18415 - I think this would be a good thing to include in some linter to prevent settings.compiler
from being deleted @jcar87. It will be a problem for all tool_requires
binaries that remove settings.compiler
.
Related: #17034 , #18415 - I think this would be a good thing to include in some linter to prevent @jcar87. It will be a problem for all
tool_requires
binaries that removesettings.compiler
.
This would be case by case basis - not a blanket rule. Removing the compiler setting is valid in those cases where we can guarantee an old enough version of libstdc++ to be useful, or when if we link against it statically and it has no other dependencies.
Preserving the settings.compiler
is a possible solution, but there are others. On the other hand, we can't maintain support for "too old" gcc forever, however in this case arguably gcc11 is "too new".
Yes, there were no problems when the minimum was gcc5, which was when the current practice of deleting settings.compiler
evolved. One of the two needs to be addressed (or expansion of the libc
/libcxx
model).
we have published new package revisions for b2/5.2.1
in Conan 2, built with an older version of gcc (gcc-7 in this case).
These should not exhibit the problem reported here.
You can either:
--update
to fetch newer revisions from the remoteconan remove "b2/5*"
conan download b2/5.2.1#91bc73931a0acb655947a81569ed8b80:63fead0844576fc02943e16909f08fcdddd6f44b#f9c46d924270b1920fa5398114be2576 -r conancenter
Then boost should use this newer revision and build fine.
I think the problem here is that since the
b2
recipe does not include thecompiler
setting (i suspect it should)
Seems it would need to include the std library version in the ID. The compiler itself is irrelevant at the point of running/loading. And depending on the runtime link, static or dynamic, it would change if the C or C++ std lib version should be included.
Description
Building boost/1.85.0 started to fail on
ubuntu20
/focal
some days ago. The same setup builds on Ubuntu22/jammy.Package and Environment Details
Conan profile
======== Input profiles ======== Profile host: [settings] arch=x86_64 build_type=Release compiler=gcc compiler.cppstd=gnu14 compiler.libcxx=libstdc++11 compiler.version=9 os=Linux
Profile build: [settings] arch=x86_64 build_type=Release compiler=gcc compiler.cppstd=gnu14 compiler.libcxx=libstdc++11 compiler.version=9 os=Linux
Steps to reproduce
2 Create conan profile
conan profile detect
conan install conanfile --build=missing
Logs
Click to expand log
``` -------- Installing package boost/1.85.0 (5 of 5) -------- boost/1.85.0: Building from source boost/1.85.0: Package boost/1.85.0:0f58eab1646ea1083f74d8308efb35a5976ff70f boost/1.85.0: Building your package in /root/.conan2/p/b/boost1e3fb56c591de/b boost/1.85.0: Calling generate() boost/1.85.0: Generators folder: /root/.conan2/p/b/boost1e3fb56c591de/b/build-release/conan boost/1.85.0: Generating aggregated env files boost/1.85.0: Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh'] boost/1.85.0: Calling build() boost/1.85.0: WARN: replace_in_file didn't find pattern '/* thread_local */' in '/root/.conan2/p/boost2b9e9cf3e9a3e/s/src/boost/stacktrace/detail/libbacktrace_impls.hpp' file. boost/1.85.0: WARN: replace_in_file didn't find pattern '/* static __thread */' in '/root/.conan2/p/boost2b9e9cf3e9a3e/s/src/boost/stacktrace/detail/libbacktrace_impls.hpp' file. boost/1.85.0: WARN: replace_in_file didn't find pattern 'local generic-os = [ set.difference $(all-os) : aix darwin vxworks solaris osf hpux ] ;' in '/root/.conan2/p/boost2b9e9cf3e9a3e/s/src/tools/build/src/tools/gcc.jam' file. boost/1.85.0: WARN: replace_in_file didn't find pattern 'local no-threading = android beos haiku sgi darwin vxworks ;' in '/root/.conan2/p/boost2b9e9cf3e9a3e/s/src/tools/build/src/tools/gcc.jam' file. boost/1.85.0: WARN: Patching user-config.jam boost/1.85.0: WARN: using zlib : 1.3.1 :