conan-io / conan-center-index

Recipes for the ConanCenter repository
https://conan.io/center
MIT License
966 stars 1.78k forks source link

[package] boost/1.84.0: Fails to compile with GCC 10 and conan 2 #22818

Open CJCombrink opened 9 months ago

CJCombrink commented 9 months ago

Description

Boost fails to compile with conan 2 and gcc 10. I get the following error:

/opt/rh/gcc-toolset-10/root/usr/include/c++/10/coroutine:295:2: error: #error "the coroutine header requires -fcoroutines"
  295 | #error "the coroutine header requires -fcoroutines"
...

I see there is an issue #22816 and PR #22817 but that looks like conan 1

Package and Environment Details

Conan profile

conan profile show -pr default Host profile: [settings] arch=x86_64 build_type=Release compiler=gcc compiler.cppstd=20 compiler.libcxx=libstdc++11 compiler.version=10 os=Linux os.distro=centos

Build profile: [settings] arch=x86_64 build_type=Release compiler=gcc compiler.cppstd=20 compiler.libcxx=libstdc++11 compiler.version=10 os=Linux os.distro=centos

Steps to reproduce

My conanfile

[tool_requires]
thrift/0.17.0

My install command:

conan install .. --build=missing

Logs

Click to expand log ``` conan install .. --build=missing ======== Input profiles ======== Profile host: [settings] arch=x86_64 build_type=Release compiler=gcc compiler.cppstd=20 compiler.libcxx=libstdc++11 compiler.version=10 os=Linux os.distro=centos Profile build: [settings] arch=x86_64 build_type=Release compiler=gcc compiler.cppstd=20 compiler.libcxx=libstdc++11 compiler.version=10 os=Linux os.distro=centos ======== Computing dependency graph ======== boost/1.84.0: Not found in local cache, looking in remotes... boost/1.84.0: Checking remote: conancenter boost/1.84.0: Downloaded recipe revision 7604ce1e7485780469dffb6430f232ea Graph root conanfile.txt: /home/Buildit/test_conan/conanfile.txt Build requirements b2/4.10.1#a41eecb267963ddf518e3c177eae60e1 - Cache bison/3.8.2#ed1ba0c42d2ab7ab64fc3a62e9ecc673 - Cache boost/1.84.0#7604ce1e7485780469dffb6430f232ea - Downloaded (conancenter) bzip2/1.0.8#457c272f7da34cb9c67456dd217d36c4 - Cache flex/2.6.4#e35bc44b3fcbcd661e0af0dc5b5b1ad4 - Cache libbacktrace/cci.20210118#ec1aa63bbc10145c6a299e68e711670c - Cache libevent/2.1.12#b6333a128075d75a3614bd8418bf2099 - Cache m4/1.4.19#b38ced39a01e31fef5435bc634461fd2 - Cache openssl/1.1.1s#3eeebc156917046ee80533dbbb8f4671 - Cache thrift/0.17.0#fba5a235281b213989a7e7feab0c5ebf - Cache zlib/1.3.1#af8f2ef3d8e0fddf1975281d7fe43bf6 - Cache Resolved version ranges openssl/[>=1.1 <4]: openssl/1.1.1s zlib/[>=1.2.11 <2]: zlib/1.3.1 ======== Computing necessary packages ======== boost/1.84.0: Checking 7 compatible configurations boost/1.84.0: Compatible configurations not found in cache, checking servers boost/1.84.0: 'c1cc6a2c29a2194638ec9daa2ccf71f99355b99c': compiler.cppstd=11 boost/1.84.0: '368033e369daf831b241113011d04028bfc1ef0a': compiler.cppstd=gnu11 boost/1.84.0: '4f0953ee63b156ab1550e3ce94a16eb652f8e797': compiler.cppstd=14 boost/1.84.0: 'ce57e463d6f1b2767273578a20f23d2252ec09a9': compiler.cppstd=gnu14 boost/1.84.0: '72df47e19b2049aef233776a27bb06badfddbeb2': compiler.cppstd=17 boost/1.84.0: '56699eaee6c56ad765424450bf97c7beaa0b0b9d': compiler.cppstd=gnu17 boost/1.84.0: 'f3aa7507f5e4bffc8cebed02154b4b10498440e2': compiler.cppstd=gnu20 thrift/0.17.0: Checking 9 compatible configurations thrift/0.17.0: Compatible configurations not found in cache, checking servers thrift/0.17.0: 'ccd3d37f8e227a65a39a0556f2bee477909e3648': compiler.cppstd=98 thrift/0.17.0: '134a8932f45963abac4f895658f3b6a08487fb20': compiler.cppstd=gnu98 thrift/0.17.0: 'b5aac7a394bb9e21bd0883fd2ec6f40b6792373a': compiler.cppstd=11 thrift/0.17.0: 'cf5c63f9828c2c6231170722e2b5c6d337114f6a': compiler.cppstd=gnu11 thrift/0.17.0: 'd4781c9788d7a3510f1ecdf5e5eef0cc26331bf9': compiler.cppstd=14 thrift/0.17.0: 'd19b29611ce8c2e5d4f2f909b4918ae0bbb52cd0': compiler.cppstd=gnu14 thrift/0.17.0: '3a73ceb58c84f61bbac281fa5a65f1010ad0376e': compiler.cppstd=17 thrift/0.17.0: '951d6268f258d1e89e833906f617ea5866896553': compiler.cppstd=gnu17 thrift/0.17.0: 'bbfd6d1b0615c14f1c6e4403e04e290f73544211': compiler.cppstd=gnu20 Build requirements b2/4.10.1#a41eecb267963ddf518e3c177eae60e1:380d17d4ad565b724e68c51e836a85ba9e4472f3#04811dc2503d49b5a8970ddef5662034 - Cache bison/3.8.2#ed1ba0c42d2ab7ab64fc3a62e9ecc673:508251cb4d2a1e69157fafb746f0c89f44c05700#79d68e9c218de0311fb1c25c9d1e049f - Cache boost/1.84.0#7604ce1e7485780469dffb6430f232ea:2056b48c913c97ff66e4064b9458755238518e0f - Build bzip2/1.0.8#457c272f7da34cb9c67456dd217d36c4:cd54a488ac0cf53426ad9eb3a70c27e566fd2901#3921492dcc7d6df6e8371258891ab3e7 - Cache flex/2.6.4#e35bc44b3fcbcd661e0af0dc5b5b1ad4:4a6ea1ff9dc85792b60efbd6799c6014262be19c#70c43b8fdafeddd5e7df6bb2c28fff9a - Cache libbacktrace/cci.20210118#ec1aa63bbc10145c6a299e68e711670c:4a6ea1ff9dc85792b60efbd6799c6014262be19c#5882840ae05dc665263016a77b276952 - Cache libevent/2.1.12#b6333a128075d75a3614bd8418bf2099:6d3ebb9d6d856b4044c4502a6820817e705ce26b#21c3f9d14a1d1621544ed88a733cf893 - Cache m4/1.4.19#b38ced39a01e31fef5435bc634461fd2:96f4e62ae01514da609a256e14e90bf7ae590383#cf4bf24a1786db7805cc91fd351f1231 - Cache openssl/1.1.1s#3eeebc156917046ee80533dbbb8f4671:66b58fc58dbaa682cb127d9555d70a0837ceb64b#0defad7cdec736e08cf814664e2d91a7 - Cache thrift/0.17.0#fba5a235281b213989a7e7feab0c5ebf:406afd9a705bf49fa583ccd19be3c367db39af0d - Build zlib/1.3.1#af8f2ef3d8e0fddf1975281d7fe43bf6:4a6ea1ff9dc85792b60efbd6799c6014262be19c#b7bbc24bdbcc3a387c0c2f57debd3166 - Cache ======== Installing packages ======== b2/4.10.1: Already installed! (1 of 11) bzip2/1.0.8: Already installed! (2 of 11) libbacktrace/cci.20210118: Already installed! (3 of 11) m4/1.4.19: Already installed! (4 of 11) openssl/1.1.1s: Already installed! (5 of 11) zlib/1.3.1: Already installed! (6 of 11) flex/2.6.4: Already installed! (7 of 11) flex/2.6.4: Appending PATH environment variable: /home/Buildit/.conan2/p/b/flex25a6fd5c95408/p/bin flex/2.6.4: Setting LEX environment variable: /home/Buildit/.conan2/p/b/flex25a6fd5c95408/p/bin/flex boost/1.84.0: Sources downloaded from 'conancenter' boost/1.84.0: Calling source() in /home/Buildit/.conan2/p/boostaa9b6a24cae5d/s/src boost/1.84.0: Downloaded 122.9MB 99% boost_1_84_0.tar.bz2 boost/1.84.0: Apply patch (conan): Optional flag to specify iconv from either libc of libiconv boost/1.84.0: Apply patch (official): Fix compilation with cppstd=20 on libcxx platforms (e.g. MacOS) -------- Installing package boost/1.84.0 (8 of 11) -------- boost/1.84.0: Building from source boost/1.84.0: Package boost/1.84.0:2056b48c913c97ff66e4064b9458755238518e0f boost/1.84.0: Building your package in /home/Buildit/.conan2/p/b/boost0e147afede3cc/b boost/1.84.0: Calling generate() boost/1.84.0: Generators folder: /home/Buildit/.conan2/p/b/boost0e147afede3cc/b/build-release/conan boost/1.84.0: Generating aggregated env files boost/1.84.0: Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh'] boost/1.84.0: Calling build() boost/1.84.0: WARN: replace_in_file didn't find pattern '/* thread_local */' in '/home/Buildit/.conan2/p/boostaa9b6a24cae5d/s/src/boost/stacktrace/detail/libbacktrace_impls.hpp' file. boost/1.84.0: WARN: replace_in_file didn't find pattern '/* static __thread */' in '/home/Buildit/.conan2/p/boostaa9b6a24cae5d/s/src/boost/stacktrace/detail/libbacktrace_impls.hpp' file. boost/1.84.0: WARN: replace_in_file didn't find pattern 'local generic-os = [ set.difference $(all-os) : aix darwin vxworks solaris osf hpux ] ;' in '/home/Buildit/.conan2/p/boostaa9b6a24cae5d/s/src/tools/build/src/tools/gcc.jam' file. boost/1.84.0: WARN: replace_in_file didn't find pattern 'local no-threading = android beos haiku sgi darwin vxworks ;' in '/home/Buildit/.conan2/p/boostaa9b6a24cae5d/s/src/tools/build/src/tools/gcc.jam' file. boost/1.84.0: WARN: Patching user-config.jam boost/1.84.0: WARN: using zlib : 1.3.1 : "/home/Buildit/.conan2/p/b/zlib7fa3ddac0aa29/p/include" "/home/Buildit/.conan2/p/b/zlib7fa3ddac0aa29/p/lib" z ; using bzip2 : 1.0.8 : "/home/Buildit/.conan2/p/b/bzip2a235f8394ee18/p/include" "/home/Buildit/.conan2/p/b/bzip2a235f8394ee18/p/lib" bz2 ; using "gcc" : : "/opt/rh/gcc-toolset-10/root/usr/bin/g++" : "-I/home/Buildit/.conan2/p/b/libbab12e5617427b1/p/include" "-L/home/Buildit/.conan2/p/b/libbab12e5617427b1/p/lib" ; boost/1.84.0: WARN: b2 -q numa=on target-os=linux architecture=x86 address-model=64 binary-format=elf abi=sysv --layout=system --user-config=/home/Buildit/.conan2/p/boostaa9b6a24cae5d/s/src/tools/build/user-config.jam -sNO_ZLIB=0 -sNO_BZIP2=0 -sNO_LZMA=1 -sNO_ZSTD=1 boost.locale.icu=off --disable-icu boost.locale.iconv=on boost.locale.iconv.lib=libc threading=multi visibility=hidden link=static variant=release --with-atomic --with-chrono --with-cobalt --with-container --with-context --with-contract --with-coroutine --with-date_time --with-exception --with-fiber --with-filesystem --with-graph --with-iostreams --with-json --with-locale --with-log --with-math --with-nowide --with-program_options --with-random --with-regex --with-serialization --with-stacktrace --with-system --with-test --with-thread --with-timer --with-type_erasure --with-url --with-wave toolset=gcc cxxstd=20 define=_GLIBCXX_USE_CXX11_ABI=1 pch=on -sLIBBACKTRACE_PATH=/home/Buildit/.conan2/p/b/libbab12e5617427b1/p linkflags="" cxxflags="-fPIC -DBOOST_STACKTRACE_ADDR2LINE_LOCATION=/usr/bin/addr2line" install --prefix=/home/Buildit/.conan2/p/b/boost0e147afede3cc/p -j32 --abbreviate-paths -d0 --debug-configuration --build-dir="/home/Buildit/.conan2/p/b/boost0e147afede3cc/b/build-release" boost/1.84.0: RUN: b2 -q numa=on target-os=linux architecture=x86 address-model=64 binary-format=elf abi=sysv --layout=system --user-config=/home/Buildit/.conan2/p/boostaa9b6a24cae5d/s/src/tools/build/user-config.jam -sNO_ZLIB=0 -sNO_BZIP2=0 -sNO_LZMA=1 -sNO_ZSTD=1 boost.locale.icu=off --disable-icu boost.locale.iconv=on boost.locale.iconv.lib=libc threading=multi visibility=hidden link=static variant=release --with-atomic --with-chrono --with-cobalt --with-container --with-context --with-contract --with-coroutine --with-date_time --with-exception --with-fiber --with-filesystem --with-graph --with-iostreams --with-json --with-locale --with-log --with-math --with-nowide --with-program_options --with-random --with-regex --with-serialization --with-stacktrace --with-system --with-test --with-thread --with-timer --with-type_erasure --with-url --with-wave toolset=gcc cxxstd=20 define=_GLIBCXX_USE_CXX11_ABI=1 pch=on -sLIBBACKTRACE_PATH=/home/Buildit/.conan2/p/b/libbab12e5617427b1/p linkflags="" cxxflags="-fPIC -DBOOST_STACKTRACE_ADDR2LINE_LOCATION=/usr/bin/addr2line" install --prefix=/home/Buildit/.conan2/p/b/boost0e147afede3cc/p -j32 --abbreviate-paths -d0 --debug-configuration --build-dir="/home/Buildit/.conan2/p/b/boost0e147afede3cc/b/build-release" notice: found boost-build.jam at /home/Buildit/.conan2/p/boostaa9b6a24cae5d/s/src/boost-build.jam notice: loading B2 from /home/Buildit/.conan2/p/b/b2cd7cfcf29177e/p/bin/.b2/kernel/bootstrap.jam notice: Searching '/etc' '/home/Buildit' '/home/Buildit/.conan2/p/b/b2cd7cfcf29177e/p/bin/.b2/kernel' '/home/Buildit/.conan2/p/b/b2cd7cfcf29177e/p/bin/.b2/util' '/home/Buildit/.conan2/p/b/b2cd7cfcf29177e/p/bin/.b2/build' '/home/Buildit/.conan2/p/b/b2cd7cfcf29177e/p/bin/.b2/tools' '/home/Buildit/.conan2/p/b/b2cd7cfcf29177e/p/bin/.b2/contrib' '/home/Buildit/.conan2/p/b/b2cd7cfcf29177e/p/bin/.b2/.' for site-config configuration file 'site-config.jam'. notice: Configuration file 'site-config.jam' not found in '/etc' '/home/Buildit' '/home/Buildit/.conan2/p/b/b2cd7cfcf29177e/p/bin/.b2/kernel' '/home/Buildit/.conan2/p/b/b2cd7cfcf29177e/p/bin/.b2/util' '/home/Buildit/.conan2/p/b/b2cd7cfcf29177e/p/bin/.b2/build' '/home/Buildit/.conan2/p/b/b2cd7cfcf29177e/p/bin/.b2/tools' '/home/Buildit/.conan2/p/b/b2cd7cfcf29177e/p/bin/.b2/contrib' '/home/Buildit/.conan2/p/b/b2cd7cfcf29177e/p/bin/.b2/.'. notice: Loading explicitly specified user configuration file: /home/Buildit/.conan2/p/boostaa9b6a24cae5d/s/src/tools/build/user-config.jam notice: Searching '/home/Buildit/.conan2/p/boostaa9b6a24cae5d/s/src/tools/build' for user-config configuration file 'user-config.jam'. notice: Loading user-config configuration file 'user-config.jam' from '/home/Buildit/.conan2/p/boostaa9b6a24cae5d/s/src/tools/build'. notice: [zlib] Using pre-installed library notice: [zlib] Condition notice: [bzip2] Using pre-installed library notice: [bzip2] Condition notice: will use '/opt/rh/gcc-toolset-10/root/usr/bin/g++' for gcc, condition gcc-10 notice: using gcc libraries :: gcc-10 :: /opt/rh/gcc-toolset-10/root/usr/bin /opt/rh/gcc-toolset-10/root/usr/lib /opt/rh/gcc-toolset-10/root/usr/lib32 /opt/rh/gcc-toolset-10/root/usr/lib64 notice: using gcc archiver :: gcc-10 :: /opt/rh/gcc-toolset-10/root/usr/bin/ar warning: toolset gcc initialization: can not find tool windres warning: initialized from /home/Buildit/.conan2/p/boostaa9b6a24cae5d/s/src/tools/build/user-config.jam:5 notice: using rc compiler :: gcc-10 :: /opt/rh/gcc-toolset-10/root/usr/bin/as notice: [zlib] zlib is already configured notice: [bzip2] bzip is already configured notice: iostreams: not using lzma compression notice: iostreams: not using zstd compression notice: [python-cfg] Configuring python... notice: [python-cfg] Checking interpreter command "python"... notice: [python-cfg] running command 'python -c "from sys import *; print('version=%d.%d\nplatform=%s\nprefix=%s\nexec_prefix=%s\nexecutable=%s' % (version_info[0],version_info[1],platform,prefix,exec_prefix,executable))" 2>&1' notice: [python-cfg] ...does not invoke a working interpreter notice: [python-cfg] Python headers and libraries not found. Performing configuration checks - default address-model : 64-bit [1] - default architecture : x86 [1] - compiler supports SSE2 : yes [2] - compiler supports SSE4.1 : yes [2] - cxx11_static_assert : yes [2] - cxx20_hdr_concepts : yes [2] - cpp_lib_memory_resource : yes [2] warning: non-free usage requirements std ignored warning: in main-target boost_cobalt at libs/cobalt/build/Jamfile:73 - has std::atomic_ref : yes [2] - has statx : yes [2] - has init_priority attribute : yes [2] - has stat::st_blksize : yes [2] - has stat::st_mtim : yes [2] - has stat::st_mtimensec : no [2] - has stat::st_mtimespec : no [2] - has stat::st_birthtim : no [2] - has stat::st_birthtimensec : no [2] - has stat::st_birthtimespec : no [2] - has fdopendir(O_NOFOLLOW) : yes [2] - has dirent::d_type : yes [2] - has POSIX *at APIs : yes [2] - cxx11_auto_declarations : yes [2] - cxx11_constexpr : yes [2] - cxx11_defaulted_functions : yes [2] - cxx11_final : yes [2] - cxx11_hdr_mutex : yes [2] - cxx11_hdr_tuple : yes [2] - cxx11_lambdas : yes [2] - cxx11_noexcept : yes [2] - cxx11_nullptr : yes [2] - cxx11_rvalue_references : yes [2] - cxx11_template_aliases : yes [2] - cxx11_thread_local : yes [2] - cxx11_variadic_templates : yes [2] - has_icu builds : no [2] - zlib : yes [3] - bzip2 : yes [3] - cxx11_decltype : yes [2] - cxx11_basic_alignas : yes [2] - iconv (libc) : yes [2] - cxx11_defaulted_moves : yes [2] - cxx11_hdr_functional : yes [2] - cxx11_hdr_type_traits : yes [2] - cxx11_override : yes [2] - cxx11_range_based_for : yes [2] - cxx11_scoped_enums : yes [2] - cxx11_smart_ptr : yes [2] - native atomic int32 supported : yes [2] - native syslog supported : yes [2] - pthread supports robust mutexes : yes [2] - Boost.Regex is header-only : yes [2] - lockfree boost::atomic_flag : yes [2] - compiler supports SSSE3 : yes [2] - compiler supports AVX2 : yes [2] - gcc visibility : yes [2] - sfinae_expr : yes [2] - cxx11_unified_initialization_syntax : yes [2] - cxx11_hdr_initializer_list : yes [2] - cxx11_hdr_chrono : yes [2] - cxx11_numeric_limits : yes [2] - cxx11_hdr_array : yes [2] - cxx11_hdr_atomic : yes [2] - cxx11_allocator : yes [2] - cxx11_explicit_conversion_operators : yes [2] - long double support : yes [2] - cxx11_char16_t : yes [2] - cxx11_char32_t : yes [2] - Has Large File Support : yes [2] - Has attribute init_priority : yes [2] - std_wstreambuf builds : yes [2] - std_wstreambuf : yes [2] - libbacktrace builds : yes [2] - addr2line builds : yes [2] - WinDbg builds : no [2] - cxx11_rvalue_references : yes [4] - WinDbg builds : no [4] - WinDbgCached builds : no [2] - WinDbgCached builds : no [4] - BOOST_COMP_GNUC >= 4.3.0 : yes [2] - cxx11_hdr_thread : yes [2] - cxx11_hdr_regex : yes [2] [1] gcc-10 [2] gcc-10/rls/bst.l-lbc/bst.l-on/bst.l-off/cxstd-20-iso/lnk-sttc/nm-on/thrd-mlt/vsblt-hdn [3] lnk-sttc [4] gcc-10/rls/bst.l-lbc/bst.l-on/bst.l-off/bld-no/cxstd-20-iso/lnk-sttc/nm-on/thrd-mlt/vsblt-hdn Component configuration: - atomic : building - chrono : building - cobalt : building - container : building - context : building - contract : building - coroutine : building - date_time : building - exception : building - fiber : building - filesystem : building - graph : building - graph_parallel : not building - headers : not building - iostreams : building - json : building - locale : building - log : building - math : building - mpi : not building - nowide : building - program_options : building - python : not building - random : building - regex : building - serialization : building - stacktrace : building - system : building - test : building - thread : building - timer : building - type_erasure : building - url : building - wave : building In file included from ./boost/cobalt/concepts.hpp:8, from ./boost/cobalt/main.hpp:8, from libs/cobalt/src/main.cpp:8: /opt/rh/gcc-toolset-10/root/usr/include/c++/10/coroutine:295:2: error: #error "the coroutine header requires -fcoroutines" 295 | #error "the coroutine header requires -fcoroutines" | ^~~~~ In file included from ./boost/cobalt/main.hpp:8, from libs/cobalt/src/main.cpp:8: ./boost/cobalt/concepts.hpp:23:50: error: ‘std::coroutine_handle’ has not been declared 23 | concept awaitable_type = requires (Awaitable aw, std::coroutine_handle h) ... boost/1.84.0: ERROR: Package '2056b48c913c97ff66e4064b9458755238518e0f' build failed boost/1.84.0: WARN: Build folder /home/Buildit/.conan2/p/b/boost0e147afede3cc/b/build-release ERROR: boost/1.84.0: Error in build() method, line 942 self.run(full_command) ConanException: Error 1 while executing ```
CJCombrink commented 9 months ago

@uilianries PS: I see you have a PR open on boost, any insights?

CJCombrink commented 9 months ago

I upgraded conan to 2.1.0 and removed my os.distro from my profile (since the upgrade nuked my setting.yaml hack) and still see the same build issue

uilianries commented 9 months ago

@CJCombrink Hello! Unfortunately your issue is not related to my PR. That PR is only related to cxxstd, but your bug requires an extra flag to use coroutines.

It's a total valid bug report, as cobalt is C++20 and uses coroutines. I'll check if we have a PR to this case, otherwise, I'll take a look later.