Operating System+version: Debian 11 bullseye (in docker container)
Compiler+version: GCC 9.5.0
Conan version: 2.1.0
Python version: 3.9.2
Steps to reproduce
Run the following Dockerfile and the latest revision should fail to build:
# Using GCC 9
FROM gcc:9
# Install CMake
RUN apt-get update
RUN apt-get install -y cmake
# Install latest Conan (2.1.0)
RUN wget https://github.com/conan-io/conan/releases/download/2.1.0/conan-2.1.0-amd64.deb
RUN apt install ./conan-2.1.0-amd64.deb
# Create new default profile with cppstd 20
RUN conan profile detect
RUN sed -i 's/compiler.cppstd=.*$/compiler.cppstd=20/' ~/.conan2/profiles/default
# Working revision
RUN conan install --build=missing --requires boost/1.83.0#39551a6ba03b4fe2c7a86b9a6d80cd67
# Broken revision
RUN conan install --build=missing --requires boost/1.83.0#67abd9a563219045b609c298bccb8f42
The recipe is passing the incorrect flags to b2. It passes cxxstd=20 instead of cxxstd=2a.
This change was introduced in #22554.
I can create a PR with a fix if required (assuming I am not doing anything incorrectly).
I was thinking something like this:
safe_cppstd = self.settings.get_safe("compiler.cppstd")
if safe_cppstd:
- cppstd_version = safe_cppstd.replace("gnu", "")
+ from conan.tools.build import flags as flags_
+ cppstd_flag = flags_.cppstd_flag(self.settings)
+ if cppstd_flag and cppstd_flag.startswith("-std=c++"):
+ cppstd_version = cppstd_flag[8:]
+ else:
+ cppstd_version = safe_cppstd.replace("gnu", "")
flags.append(f"cxxstd={cppstd_version}")
if "gnu" in safe_cppstd:
flags.append("cxxstd-dialect=gnu")
elif self._has_cppstd_11_supported:
flags.append("cxxstd=11")
Logs
#12 [9/9] RUN conan install --build=missing --requires boost/1.83.0#67abd9a563219045b609c298bccb8f42
#12 0.511
#12 0.511 ======== Input profiles ========
#12 0.511 Profile host:
#12 0.511 [settings]
#12 0.511 arch=x86_64
#12 0.511 build_type=Release
#12 0.511 compiler=gcc
#12 0.511 compiler.cppstd=20
#12 0.511 compiler.libcxx=libstdc++11
#12 0.511 compiler.version=9
#12 0.511 os=Linux
#12 0.511
#12 0.511 Profile build:
#12 0.511 [settings]
#12 0.511 arch=x86_64
#12 0.511 build_type=Release
#12 0.511 compiler=gcc
#12 0.511 compiler.cppstd=20
#12 0.511 compiler.libcxx=libstdc++11
#12 0.511 compiler.version=9
#12 0.511 os=Linux
#12 0.511
#12 0.513
#12 0.513 ======== Computing dependency graph ========
#12 0.525 boost/1.83.0: Not found in local cache, looking in remotes...
#12 0.525 boost/1.83.0: Checking remote: conancenter
#12 2.487 boost/1.83.0: Downloaded recipe revision 67abd9a563219045b609c298bccb8f42
#12 2.567 Graph root
#12 2.567 cli
#12 2.567 Requirements
#12 2.567 boost/1.83.0#67abd9a563219045b609c298bccb8f42 - Downloaded (conancenter)
#12 2.567 bzip2/1.0.8#457c272f7da34cb9c67456dd217d36c4 - Cache
#12 2.567 libbacktrace/cci.20210118#ec1aa63bbc10145c6a299e68e711670c - Cache
#12 2.567 zlib/1.3.1#af8f2ef3d8e0fddf1975281d7fe43bf6 - Cache
#12 2.567 Build requirements
#12 2.567 b2/4.10.1#a41eecb267963ddf518e3c177eae60e1 - Cache
#12 2.567 Resolved version ranges
#12 2.567 zlib/[>=1.2.11 <2]: zlib/1.3.1
#12 2.567
#12 2.567 ======== Computing necessary packages ========
#12 3.192 boost/1.83.0: Checking 7 compatible configurations
#12 3.195 boost/1.83.0: Compatible configurations not found in cache, checking servers
#12 3.195 boost/1.83.0: '0b5616b01bcc537fc72a40a43e2c1f5abdce3fdf': compiler.cppstd=11
#12 3.460 boost/1.83.0: 'caac4b211e86b8a98d527012bbdc8cd06e6fab9c': compiler.cppstd=gnu11
#12 3.724 boost/1.83.0: 'd6fef05aaadf8c2019cedde4d35538e9448a016f': compiler.cppstd=14
#12 3.987 boost/1.83.0: '309294f436c8c9184444b505fe75e2392de5eb73': compiler.cppstd=gnu14
#12 4.251 boost/1.83.0: '34488d7518c4413fa425b824d6749be54c34f51a': compiler.cppstd=17
#12 4.513 boost/1.83.0: 'e19a97e1e88b1f6becce3569a89396bf09ab9e3e': compiler.cppstd=gnu17
#12 4.778 boost/1.83.0: 'c2b6d277450a0811b824ba292101123f81e5f74f': compiler.cppstd=gnu20
#12 5.041 Requirements
#12 5.041 boost/1.83.0#67abd9a563219045b609c298bccb8f42:e02567687fdeab363df23269558486cc3432ad26 - Build
#12 5.041 bzip2/1.0.8#457c272f7da34cb9c67456dd217d36c4:b22b902fa151b63e240c80fdb2a313a02eb9969b#e49c6e9003f453c5881a94de2747590c - Cache
#12 5.041 libbacktrace/cci.20210118#ec1aa63bbc10145c6a299e68e711670c:72c852c5f0ae27ca0b1741e5fd7c8b8be91a590a#fe8bad9819c5c6b7aac95130974ad703 - Cache
#12 5.041 zlib/1.3.1#af8f2ef3d8e0fddf1975281d7fe43bf6:72c852c5f0ae27ca0b1741e5fd7c8b8be91a590a#2af3ae66c7543a6b7dd59a7e2e88ac0f - Cache
#12 5.041 Build requirements
#12 5.041 b2/4.10.1#a41eecb267963ddf518e3c177eae60e1:63fead0844576fc02943e16909f08fcdddd6f44b#a31a98f757dcf4d3f03ed629ccde26b7 - Cache
#12 5.042
#12 5.042 ======== Installing packages ========
#12 5.054 b2/4.10.1: Already installed! (1 of 5)
#12 5.061 bzip2/1.0.8: Already installed! (2 of 5)
#12 5.068 libbacktrace/cci.20210118: Already installed! (3 of 5)
#12 5.074 zlib/1.3.1: Already installed! (4 of 5)
#12 5.523 boost/1.83.0: Sources downloaded from 'conancenter'
#12 5.524 boost/1.83.0: Calling source() in /root/.conan2/p/boosta359959baf636/s/src
#12 9.076 boost/1.83.0: Downloading 122.9MB boost_1_83_0.tar.bz2
#12 19.42 boost/1.83.0: Downloaded 2.6MB 2% boost_1_83_0.tar.bz2
#12 30.03 boost/1.83.0: Downloaded 4.2MB 3% boost_1_83_0.tar.bz2
#12 40.63 boost/1.83.0: Downloaded 5.3MB 4% boost_1_83_0.tar.bz2
#12 50.75 boost/1.83.0: Downloaded 7.8MB 6% boost_1_83_0.tar.bz2
#12 61.09 boost/1.83.0: Downloaded 10.8MB 8% boost_1_83_0.tar.bz2
#12 71.11 boost/1.83.0: Downloaded 12.3MB 9% boost_1_83_0.tar.bz2
#12 81.27 boost/1.83.0: Downloaded 13.9MB 11% boost_1_83_0.tar.bz2
#12 91.28 boost/1.83.0: Downloaded 16.7MB 13% boost_1_83_0.tar.bz2
#12 101.4 boost/1.83.0: Downloaded 19.6MB 15% boost_1_83_0.tar.bz2
#12 111.7 boost/1.83.0: Downloaded 22.3MB 18% boost_1_83_0.tar.bz2
#12 122.0 boost/1.83.0: Downloaded 24.5MB 19% boost_1_83_0.tar.bz2
#12 132.3 boost/1.83.0: Downloaded 26.0MB 21% boost_1_83_0.tar.bz2
#12 142.4 boost/1.83.0: Downloaded 28.7MB 23% boost_1_83_0.tar.bz2
#12 152.8 boost/1.83.0: Downloaded 31.0MB 25% boost_1_83_0.tar.bz2
#12 163.0 boost/1.83.0: Downloaded 32.9MB 26% boost_1_83_0.tar.bz2
#12 173.2 boost/1.83.0: Downloaded 35.2MB 28% boost_1_83_0.tar.bz2
#12 183.4 boost/1.83.0: Downloaded 37.5MB 30% boost_1_83_0.tar.bz2
#12 193.5 boost/1.83.0: Downloaded 39.8MB 32% boost_1_83_0.tar.bz2
#12 203.9 boost/1.83.0: Downloaded 42.0MB 34% boost_1_83_0.tar.bz2
#12 214.6 boost/1.83.0: Downloaded 43.2MB 35% boost_1_83_0.tar.bz2
#12 224.9 boost/1.83.0: Downloaded 44.9MB 36% boost_1_83_0.tar.bz2
#12 235.0 boost/1.83.0: Downloaded 49.0MB 39% boost_1_83_0.tar.bz2
#12 245.1 boost/1.83.0: Downloaded 52.2MB 42% boost_1_83_0.tar.bz2
#12 255.4 boost/1.83.0: Downloaded 54.0MB 43% boost_1_83_0.tar.bz2
#12 265.5 boost/1.83.0: Downloaded 55.2MB 44% boost_1_83_0.tar.bz2
#12 276.0 boost/1.83.0: Downloaded 56.9MB 46% boost_1_83_0.tar.bz2
#12 286.4 boost/1.83.0: Downloaded 58.6MB 47% boost_1_83_0.tar.bz2
#12 296.4 boost/1.83.0: Downloaded 63.0MB 51% boost_1_83_0.tar.bz2
#12 306.5 boost/1.83.0: Downloaded 68.4MB 55% boost_1_83_0.tar.bz2
#12 316.7 boost/1.83.0: Downloaded 72.3MB 58% boost_1_83_0.tar.bz2
#12 326.9 boost/1.83.0: Downloaded 76.2MB 61% boost_1_83_0.tar.bz2
#12 337.3 boost/1.83.0: Downloaded 80.3MB 65% boost_1_83_0.tar.bz2
#12 347.8 boost/1.83.0: Downloaded 82.7MB 67% boost_1_83_0.tar.bz2
#12 358.1 boost/1.83.0: Downloaded 85.0MB 69% boost_1_83_0.tar.bz2
#12 368.2 boost/1.83.0: Downloaded 88.0MB 71% boost_1_83_0.tar.bz2
#12 378.3 boost/1.83.0: Downloaded 89.9MB 73% boost_1_83_0.tar.bz2
#12 388.5 boost/1.83.0: Downloaded 91.5MB 74% boost_1_83_0.tar.bz2
#12 398.6 boost/1.83.0: Downloaded 94.2MB 76% boost_1_83_0.tar.bz2
#12 408.9 boost/1.83.0: Downloaded 97.7MB 79% boost_1_83_0.tar.bz2
#12 419.0 boost/1.83.0: Downloaded 100.1MB 81% boost_1_83_0.tar.bz2
#12 429.1 boost/1.83.0: Downloaded 102.4MB 83% boost_1_83_0.tar.bz2
#12 439.2 boost/1.83.0: Downloaded 107.9MB 87% boost_1_83_0.tar.bz2
#12 449.2 boost/1.83.0: Downloaded 112.8MB 91% boost_1_83_0.tar.bz2
#12 459.3 boost/1.83.0: Downloaded 116.3MB 94% boost_1_83_0.tar.bz2
#12 472.1 boost/1.83.0: Downloaded 116.7MB 94% boost_1_83_0.tar.bz2
#12 483.6 boost/1.83.0: Downloaded 116.9MB 95% boost_1_83_0.tar.bz2
#12 497.1 boost/1.83.0: Downloaded 117.1MB 95% boost_1_83_0.tar.bz2
#12 510.0 boost/1.83.0: Downloaded 117.4MB 95% boost_1_83_0.tar.bz2
#12 520.2 boost/1.83.0: Downloaded 120.6MB 98% boost_1_83_0.tar.bz2
#12 592.5 boost/1.83.0: Apply patch (conan): Optional flag to specify iconv from either libc of libiconv
#12 592.5 boost/1.83.0: Apply patch (official): Fix compilation on windows when NOMINMAX is not defined
#12 592.5
#12 592.5 -------- Installing package boost/1.83.0 (5 of 5) --------
#12 592.5 boost/1.83.0: Building from source
#12 592.5 boost/1.83.0: Package boost/1.83.0:e02567687fdeab363df23269558486cc3432ad26
#12 592.5 boost/1.83.0: Building your package in /root/.conan2/p/b/boostb62ce121a6296/b
#12 592.5 boost/1.83.0: Calling generate()
#12 592.5 boost/1.83.0: Generators folder: /root/.conan2/p/b/boostb62ce121a6296/b/build-release/conan
#12 592.5 boost/1.83.0: Generating aggregated env files
#12 592.5 boost/1.83.0: Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh']
#12 592.5 boost/1.83.0: Calling build()
#12 592.5 boost/1.83.0: WARN: replace_in_file didn't find pattern '/* thread_local */' in '/root/.conan2/p/boosta359959baf636/s/src/boost/stacktrace/detail/libbacktrace_impls.hpp' file.
#12 592.5 boost/1.83.0: WARN: replace_in_file didn't find pattern '/* static __thread */' in '/root/.conan2/p/boosta359959baf636/s/src/boost/stacktrace/detail/libbacktrace_impls.hpp' file.
#12 592.5 boost/1.83.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/boosta359959baf636/s/src/tools/build/src/tools/gcc.jam' file.
#12 592.5 boost/1.83.0: WARN: replace_in_file didn't find pattern 'local no-threading = android beos haiku sgi darwin vxworks ;' in '/root/.conan2/p/boosta359959baf636/s/src/tools/build/src/tools/gcc.jam' file.
#12 592.5 boost/1.83.0: WARN: Patching user-config.jam
#12 592.5 boost/1.83.0: WARN:
#12 592.5 using zlib : 1.3.1 : <include>"/root/.conan2/p/b/zlib005085ff6782e/p/include" <search>"/root/.conan2/p/b/zlib005085ff6782e/p/lib" <name>z ;
#12 592.5 using bzip2 : 1.0.8 : <include>"/root/.conan2/p/b/bzip2ab2a8d46681af/p/include" <search>"/root/.conan2/p/b/bzip2ab2a8d46681af/p/lib" <name>bz2 ;
#12 592.5 using "gcc" : : "/usr/local/bin/g++" :
#12 592.5 <compileflags>"-I/root/.conan2/p/b/libbace80d9c18f834/p/include" <linkflags>"-L/root/.conan2/p/b/libbace80d9c18f834/p/lib" ;
#12 592.5 boost/1.83.0: WARN: b2 -q numa=on target-os=linux architecture=x86 address-model=64 binary-format=elf abi=sysv --layout=system --user-config=/root/.conan2/p/boosta359959baf636/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-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=/root/.conan2/p/b/libbace80d9c18f834/p linkflags="" cxxflags="-fPIC -DBOOST_STACKTRACE_ADDR2LINE_LOCATION=/usr/bin/addr2line" install --prefix=/root/.conan2/p/b/boostb62ce121a6296/p -j12 --abbreviate-paths -d0 --debug-configuration --build-dir="/root/.conan2/p/b/boostb62ce121a6296/b/build-release"
#12 592.5 boost/1.83.0: RUN: b2 -q numa=on target-os=linux architecture=x86 address-model=64 binary-format=elf abi=sysv --layout=system --user-config=/root/.conan2/p/boosta359959baf636/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-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=/root/.conan2/p/b/libbace80d9c18f834/p linkflags="" cxxflags="-fPIC -DBOOST_STACKTRACE_ADDR2LINE_LOCATION=/usr/bin/addr2line" install --prefix=/root/.conan2/p/b/boostb62ce121a6296/p -j12 --abbreviate-paths -d0 --debug-configuration --build-dir="/root/.conan2/p/b/boostb62ce121a6296/b/build-release"
#12 592.6 notice: found boost-build.jam at /root/.conan2/p/boosta359959baf636/s/src/boost-build.jam
#12 592.6 notice: loading B2 from /root/.conan2/p/b2b05c07523db95/p/bin/.b2/kernel/bootstrap.jam
#12 592.6 notice: Searching '/etc' '/root' '/root/.conan2/p/b2b05c07523db95/p/bin/.b2/kernel' '/root/.conan2/p/b2b05c07523db95/p/bin/.b2/util' '/root/.conan2/p/b2b05c07523db95/p/bin/.b2/build' '/root/.conan2/p/b2b05c07523db95/p/bin/.b2/tools' '/root/.conan2/p/b2b05c07523db95/p/bin/.b2/contrib' '/root/.conan2/p/b2b05c07523db95/p/bin/.b2/.' for site-config configuration file 'site-config.jam'.
#12 592.6 notice: Configuration file 'site-config.jam' not found in '/etc' '/root' '/root/.conan2/p/b2b05c07523db95/p/bin/.b2/kernel' '/root/.conan2/p/b2b05c07523db95/p/bin/.b2/util' '/root/.conan2/p/b2b05c07523db95/p/bin/.b2/build' '/root/.conan2/p/b2b05c07523db95/p/bin/.b2/tools' '/root/.conan2/p/b2b05c07523db95/p/bin/.b2/contrib' '/root/.conan2/p/b2b05c07523db95/p/bin/.b2/.'.
#12 592.6 notice: Loading explicitly specified user configuration file:
#12 592.6 /root/.conan2/p/boosta359959baf636/s/src/tools/build/user-config.jam
#12 592.6 notice: Searching '/root/.conan2/p/boosta359959baf636/s/src/tools/build' for user-config configuration file 'user-config.jam'.
#12 592.6 notice: Loading user-config configuration file 'user-config.jam' from '/root/.conan2/p/boosta359959baf636/s/src/tools/build'.
#12 592.6 notice: [zlib] Using pre-installed library
#12 592.6 notice: [zlib] Condition
#12 592.6 notice: [bzip2] Using pre-installed library
#12 592.6 notice: [bzip2] Condition
#12 592.6 notice: will use '/usr/local/bin/g++' for gcc, condition <toolset>gcc-9
#12 592.6 notice: using gcc libraries :: <toolset>gcc-9 :: /usr/local/bin /usr/local/lib /usr/local/lib32 /usr/local/lib64
#12 592.6 notice: using gcc archiver :: <toolset>gcc-9 :: ar
#12 592.6 warning: toolset gcc initialization: can not find tool windres
#12 592.6 warning: initialized from /root/.conan2/p/boosta359959baf636/s/src/tools/build/user-config.jam:5
#12 592.6 notice: using rc compiler :: <toolset>gcc-9 :: as
#12 593.0 notice: [zlib] zlib is already configured
#12 593.0 notice: [bzip2] bzip is already configured
#12 593.0 notice: iostreams: not using lzma compression
#12 593.0 notice: iostreams: not using zstd compression
#12 593.1 notice: [python-cfg] Configuring python...
#12 593.1 notice: [python-cfg] Checking interpreter command "python"...
#12 593.1 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'
#12 593.1 notice: [python-cfg] ...does not invoke a working interpreter
#12 593.1 notice: [python-cfg] Python headers and libraries not found.
#12 593.3 Performing configuration checks
#12 593.3
#12 593.3 - default address-model : 64-bit [1]
#12 593.4 - default architecture : x86 [1]
#12 593.4 - compiler supports SSE2 : no [2]
#12 593.4 - compiler supports SSE4.1 : no [2]
#12 599.2 - has std::atomic_ref : no [2]
#12 599.2 - has statx : no [2]
#12 599.2 - has statx syscall : no [2]
#12 599.2 - has init_priority attribute : no [2]
#12 599.2 - has stat::st_blksize : no [2]
#12 599.2 - has stat::st_mtim : no [2]
#12 599.2 - has stat::st_mtimensec : no [2]
#12 599.2 - has stat::st_mtimespec : no [2]
#12 599.2 - has stat::st_birthtim : no [2]
#12 599.2 - has stat::st_birthtimensec : no [2]
#12 599.2 - has stat::st_birthtimespec : no [2]
#12 599.2 - has fdopendir(O_NOFOLLOW) : no [2]
#12 599.2 - has dirent::d_type : no [2]
#12 599.3 - has POSIX *at APIs : no [2]
#12 599.3 - cxx11_auto_declarations : no [2]
#12 599.3 - cxx11_auto_declarations : no [3]
#12 600.2 - has_icu builds : no [2]
#12 603.2 - zlib : no [4]
#12 603.2 - bzip2 : no [4]
#12 603.5 - cxx11_constexpr : no [2]
#12 603.5 - cxx11_constexpr : no [3]
#12 603.5 - iconv (libc) : no [2]
#12 603.5 - iconv (separate) : no [2]
#12 603.5 - Boost.Locale needs either iconv or ICU library to be built.
#12 603.5 - iconv (libc) : no [3]
#12 603.5 - iconv (separate) : no [3]
#12 603.5 - Boost.Locale needs either iconv or ICU library to be built.
#12 603.6 - native atomic int32 supported : no [2]
#12 603.6 - native syslog supported : no [2]
#12 603.6 - pthread supports robust mutexes : no [2]
#12 603.7 - lockfree boost::atomic_flag : no [2]
#12 603.8 - compiler supports SSSE3 : no [2]
#12 603.8 - compiler supports AVX2 : no [2]
#12 613.2 - gcc visibility : no [2]
#12 613.2 - cxx11_noexcept : no [2]
#12 613.2 - gcc visibility : no [3]
#12 613.2 - cxx11_noexcept : no [3]
#12 614.2 - libbacktrace builds : no [2]
#12 614.2 - libbacktrace builds : no [3]
#12 614.2 - addr2line builds : no [2]
#12 614.3 - addr2line builds : no [3]
#12 614.3 - WinDbg builds : no [2]
#12 614.3 - WinDbg builds : no [3]
#12 614.3 - WinDbgCached builds : no [2]
#12 614.3 - WinDbgCached builds : no [3]
#12 614.8 - BOOST_COMP_GNUC >= 4.3.0 : no [2]
#12 620.4
#12 620.4 [1] gcc-9
#12 620.4 [2] gcc-9/rls/bst.l-lbc/bst.l-on/bst.l-off/cxstd-20-iso/lnk-sttc/nm-on/thrd-mlt/vsblt-hdn
#12 620.4 [3] gcc-9/rls/bst.l-lbc/bst.l-on/bst.l-off/bld-no/cxstd-20-iso/lnk-sttc/nm-on/thrd-mlt/vsblt-hdn
#12 620.4 [4] lnk-sttc
#12 620.4
#12 620.4 Component configuration:
#12 620.4
#12 620.4 - atomic : building
#12 620.4 - chrono : building
#12 620.4 - container : building
#12 620.4 - context : building
#12 620.4 - contract : building
#12 620.4 - coroutine : building
#12 620.4 - date_time : building
#12 620.4 - exception : building
#12 620.4 - fiber : building
#12 620.4 - filesystem : building
#12 620.4 - graph : building
#12 620.4 - graph_parallel : not building
#12 620.4 - headers : not building
#12 620.4 - iostreams : building
#12 620.4 - json : building
#12 620.4 - locale : building
#12 620.4 - log : building
#12 620.4 - math : building
#12 620.4 - mpi : not building
#12 620.4 - nowide : building
#12 620.4 - program_options : building
#12 620.4 - python : not building
#12 620.4 - random : building
#12 620.4 - regex : building
#12 620.4 - serialization : building
#12 620.4 - stacktrace : building
#12 620.4 - system : building
#12 620.4 - test : building
#12 620.4 - thread : building
#12 620.4 - timer : building
#12 620.4 - type_erasure : building
#12 620.4 - url : building
#12 620.4 - wave : building
#12 620.4
#12 620.9 g++: error: unrecognized command line option '-std=c++20'; did you mean '-std=c++2a'?
#12 620.9 g++: error: unrecognized command line option '-std=c++20'; did you mean '-std=c++2a'?
#12 620.9 g++: error: unrecognized command line option '-std=c++20'; did you mean '-std=c++2a'?
#12 620.9 g++: error: unrecognized command line option '-std=c++20'; did you mean '-std=c++2a'?
#12 621.1 ...failed updating 4 targets...
#12 621.1
#12 621.1 boost/1.83.0: ERROR:
#12 621.1 Package 'e02567687fdeab363df23269558486cc3432ad26' build failed
#12 621.1 boost/1.83.0: WARN: Build folder /root/.conan2/p/b/boostb62ce121a6296/b/build-release
#12 621.1 ERROR: boost/1.83.0: Error in build() method, line 942
#12 621.1 self.run(full_command)
#12 621.1 ConanException: Error 1 while executing
#12 ERROR: process "/bin/sh -c conan install --build=missing --requires boost/1.83.0#67abd9a563219045b609c298bccb8f42" did not complete successfully: exit code: 1
------
> [9/9] RUN conan install --build=missing --requires boost/1.83.0#67abd9a563219045b609c298bccb8f42:
620.9 g++: error: unrecognized command line option '-std=c++20'; did you mean '-std=c++2a'?
620.9 g++: error: unrecognized command line option '-std=c++20'; did you mean '-std=c++2a'?
621.1 ...failed updating 4 targets...
621.1
621.1 boost/1.83.0: ERROR:
621.1 Package 'e02567687fdeab363df23269558486cc3432ad26' build failed
621.1 boost/1.83.0: WARN: Build folder /root/.conan2/p/b/boostb62ce121a6296/b/build-release
621.1 ERROR: boost/1.83.0: Error in build() method, line 942
621.1 self.run(full_command)
621.1 ConanException: Error 1 while executing
Environment details
Steps to reproduce
Run the following Dockerfile and the latest revision should fail to build:
The recipe is passing the incorrect flags to
b2
. It passescxxstd=20
instead ofcxxstd=2a
. This change was introduced in #22554. I can create a PR with a fix if required (assuming I am not doing anything incorrectly).I was thinking something like this:
Logs