conan-io / conan-center-index

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

[package] boost/1.79.0: Build error with Clang 12 on Windows. #11970

Open Adnn opened 2 years ago

Adnn commented 2 years ago

Package and Environment Details

Conan profile

[settings]
arch=x86_64
arch_build=x86_64
build_type=Debug
compiler=clang
compiler.cppstd=20
compiler.version=12
os=Windows
os_build=Windows
[options]
[build_requires]
*: cmake/3.22.0
[env]
CONAN_CMAKE_GENERATOR=Unix Makefiles
[conf]
tools.cmake.cmaketoolchain:generator=Unix Makefiles

Steps to reproduce

On Windows, I am trying to build the latest boost from Conan center with a profile using Clang 12 with:

conan install -pr clang12-win-dev boost/1.79.0@ --build=missing

The build fails with error:

ERROR: boost/1.79.0: Error in build() method, line 875 self.run(full_command, run_environment=True) ConanException: Error 1 while executing b2.exe -q numa=on target-os=windows architecture=x86 address-model=64 binary-format=pe abi=ms --layout=system --user-config=C:.conan\a06fea\1\source_subfolder\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=off --disable-iconv threading=multi visibility=hidden link=static variant=debug --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-wave toolset=clang-win cxxflags=-std=c++20 pch=on linkflags="-stdlib=None" cxxflags="-fPIC -stdlib=None" install --prefix=C:.conan\cfb3d9\1 -j12 --abbreviate-paths -d0 --debug-configuration --build-dir="C:.conan\29916a\1"

And I cannot see any specific output regarding which CU fails (see full log below).

There are however a few surprising messages, such as:

warning: Boost.Json was explicitly requested, but will not be built, because it requires C++11. note: To enable C++11 support, use the 'cxxstd=11' command line argument

Despite the profile request to build as Cpp 20.

Logs

Click to expand log Configuration: [settings] arch=x86_64 arch_build=x86_64 build_type=Debug compiler=clang compiler.cppstd=20 compiler.version=12 os=Windows os_build=Windows [options] [build_requires] *: cmake/3.22.0 [env] CONAN_CMAKE_GENERATOR=Unix Makefiles [conf] tools.cmake.cmaketoolchain:generator=Unix Makefiles boost/1.79.0: WARN: Package binary is corrupted, removing: 03858f2b67b1ec5fb3f1fb9c1c129e716545ff45 Installing package: boost/1.79.0 Requirements boost/1.79.0 from 'conancenter' - Cache bzip2/1.0.8 from 'conancenter' - Cache zlib/1.2.12 from 'conancenter' - Cache Packages boost/1.79.0:03858f2b67b1ec5fb3f1fb9c1c129e716545ff45 - Build bzip2/1.0.8:ff009f72eef7deb9abdcd409fffd0402592d664f - Cache zlib/1.2.12:bd500648356902bb5cb5a6961daa81fc25f3f22c - Cache Build requirements b2/4.8.0 from 'conancenter' - Cache cmake/3.22.0 from 'conancenter' - Cache Build requirements packages b2/4.8.0:ca33edce272a279b24f87dc0d4cf5bbdcffbc187 - Cache cmake/3.22.0:01edd76db8e16db9b38c3cca44ec466a9444c388 - Cache Installing (downloading, building) binaries... b2/4.8.0: Already installed! bzip2/1.0.8: Already installed! bzip2/1.0.8: Appending PATH environment variable: C:\Users\adn\.conan\data\bzip2\1.0.8\_\_\package\ff009f72eef7deb9abdcd409fffd0402592d664f\bin cmake/3.22.0: Already installed! cmake/3.22.0: Appending PATH environment variable: C:\Users\adn\.conan\data\cmake\3.22.0\_\_\package\01edd76db8e16db9b38c3cca44ec466a9444c388\bin zlib/1.2.12: Already installed! boost/1.79.0: Applying build-requirement: cmake/3.22.0 boost/1.79.0: Applying build-requirement: b2/4.8.0 boost/1.79.0: WARN: Build folder is dirty, removing it: C:\.conan\29916a\1 boost/1.79.0: Building your package in C:\.conan\29916a\1 boost/1.79.0: Generator txt created conanbuildinfo.txt boost/1.79.0: Aggregating env generators boost/1.79.0: Calling build() WARN: replace_in_file didn't find pattern '/* thread_local */' in 'C:\.conan\a06fea\1\source_subfolder\boost\stacktrace\detail\libbacktrace_impls.hpp' file. WARN: replace_in_file didn't find pattern '/* static __thread */' in 'C:\.conan\a06fea\1\source_subfolder\boost\stacktrace\detail\libbacktrace_impls.hpp' file. WARN: replace_in_file didn't find pattern 'local generic-os = [ set.difference $(all-os) : aix darwin vxworks solaris osf hpux ] ;' in 'C:\.conan\a06fea\1\source_subfolder\tools\build\src\tools\gcc.jam' file. WARN: replace_in_file didn't find pattern 'local no-threading = android beos haiku sgi darwin vxworks ;' in 'C:\.conan\a06fea\1\source_subfolder\tools\build\src\tools\gcc.jam' file. WARN: replace_in_file didn't find pattern ' @numa' in 'C:\.conan\a06fea\1\source_subfolder\libs\fiber\build\Jamfile.v2' file. boost/1.79.0: WARN: Patching user-config.jam boost/1.79.0: WARN: using zlib : 1.2.12 : "C:/Users/adn/.conan/data/zlib/1.2.12/_/_/package/bd500648356902bb5cb5a6961daa81fc25f3f22c/include" "C:/Users/adn/.conan/data/zlib/1.2.12/_/_/package/bd500648356902bb5cb5a6961daa81fc25f3f22c/lib" zlib ; using bzip2 : 1.0.8 : "C:/Users/adn/.conan/data/bzip2/1.0.8/_/_/package/ff009f72eef7deb9abdcd409fffd0402592d664f/include" "C:/Users/adn/.conan/data/bzip2/1.0.8/_/_/package/ff009f72eef7deb9abdcd409fffd0402592d664f/lib" bz2 ; using "clang-win" : : C:/Users/adn/scoop/shims/clang++.exe : ; boost/1.79.0: WARN: b2.exe -q numa=on target-os=windows architecture=x86 address-model=64 binary-format=pe abi=ms --layout=system --user-config=C:\.conan\a06fea\1\source_subfolder\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=off --disable-iconv threading=multi visibility=hidden link=static variant=debug --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-wave toolset=clang-win cxxflags=-std=c++20 pch=on linkflags="-stdlib=None" cxxflags="-fPIC -stdlib=None" install --prefix=C:\.conan\cfb3d9\1 -j12 --abbreviate-paths -d0 --debug-configuration --build-dir="C:\.conan\29916a\1" notice: found boost-build.jam at C:/.conan/a06fea/1/source_subfolder/boost-build.jam notice: loading B2 from C:/.conan/a06fea/1/source_subfolder/tools/build/src/bootstrap.jam notice: Searching 'C:\Users\adn' 'C:\Users\adn' 'C:\Users\adn' 'C:/.conan/a06fea/1/source_subfolder/tools/build/src' 'C:/.conan/a06fea/1/source_subfolder/tools/build/src/kernel' 'C:/.conan/a06fea/1/source_subfolder/tools/build/src/util' 'C:/.conan/a06fea/1/source_subfolder/tools/build/src/build' 'C:/.conan/a06fea/1/source_subfolder/tools/build/src/tools' 'C:/.conan/a06fea/1/source_subfolder/tools/build/src/contrib' 'C:/.conan/a06fea/1/source_subfolder/tools/build/src/.' for site-config configuration file 'site-config.jam'. notice: Configuration file 'site-config.jam' not found in 'C:\Users\adn' 'C:\Users\adn' 'C:\Users\adn' 'C:/.conan/a06fea/1/source_subfolder/tools/build/src' 'C:/.conan/a06fea/1/source_subfolder/tools/build/src/kernel' 'C:/.conan/a06fea/1/source_subfolder/tools/build/src/util' 'C:/.conan/a06fea/1/source_subfolder/tools/build/src/build' 'C:/.conan/a06fea/1/source_subfolder/tools/build/src/tools' 'C:/.conan/a06fea/1/source_subfolder/tools/build/src/contrib' 'C:/.conan/a06fea/1/source_subfolder/tools/build/src/.'. notice: Loading explicitly specified user configuration file: C:\.conan\a06fea\1\source_subfolder\tools\build\user-config.jam notice: Searching 'C:\.conan\a06fea\1\source_subfolder\tools\build' for user-config configuration file 'user-config.jam'. notice: Loading user-config configuration file 'user-config.jam' from 'C:/.conan/a06fea/1/source_subfolder/tools/build'. notice: [zlib] Using pre-installed library notice: [zlib] Condition notice: [bzip2] Using pre-installed library notice: [bzip2] Condition notice: [msvc-cfg] msvc-14.2 detected, command: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64\cl.exe' notice: [clang-win] using compiler '"C:/Users/adn/scoop/shims/clang++.exe"', version '12.0.1', target 'x86_64', default address-model=64 notice: will use 'C:/Users/adn/scoop/shims/clang++.exe' for clang-win, condition clang-win-12.0.1 notice: [clang-win] x86-32: notice: [clang-win] x86-32: using assembler 'ml.exe' notice: [clang-win] x86-32: using archiver 'lib.exe' notice: [clang-win] x86-32: using manifest-tool 'mt.exe' notice: [clang-win] x86-32: using resource-compiler 'rc.exe' notice: [clang-win] x86-32: using mc-compiler 'mc.exe' notice: [clang-win] x86-32: using idl-compiler 'midl.exe' notice: [clang-win] arm-32: notice: [clang-win] arm-32: using assembler 'armasm.exe' notice: [clang-win] arm-32: using archiver 'lib.exe' notice: [clang-win] arm-32: using manifest-tool 'mt.exe' notice: [clang-win] arm-32: using resource-compiler 'rc.exe' notice: [clang-win] arm-32: using mc-compiler 'mc.exe' notice: [clang-win] arm-32: using idl-compiler 'midl.exe' notice: [clang-win] x86-64: notice: [clang-win] x86-64: using assembler 'ml64.exe' notice: [clang-win] x86-64: using archiver 'lib.exe' notice: [clang-win] x86-64: using manifest-tool 'mt.exe' notice: [clang-win] x86-64: using resource-compiler 'rc.exe' notice: [clang-win] x86-64: using mc-compiler 'mc.exe' notice: [clang-win] x86-64: using idl-compiler 'midl.exe' notice: [clang-win] arm-64: notice: [clang-win] arm-64: using assembler 'armasm64.exe' notice: [clang-win] arm-64: using archiver 'lib.exe' notice: [clang-win] arm-64: using manifest-tool 'mt.exe' notice: [clang-win] arm-64: using resource-compiler 'rc.exe' notice: [clang-win] arm-64: using mc-compiler 'mc.exe' notice: [clang-win] arm-64: using idl-compiler 'midl.exe' 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 'DIR /-C /A:S "C:\Users\adn\AppData\Local\Programs\Python\Python310\python.exe" 2>&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' notice: [python-cfg] ...requested configuration matched! notice: [python-cfg] Details of this Python configuration: notice: [python-cfg] interpreter command: "python" notice: [python-cfg] include path: "C:\Users\adn\AppData\Local\Programs\Python\Python310\Include" notice: [python-cfg] library path: "C:\Users\adn\AppData\Local\Programs\Python\Python310\libs" notice: [python-cfg] DLL search path: "C:\Users\adn\AppData\Local\Programs\Python\Python310" notice: [python-cfg] Checking for NumPy... notice: [python-cfg] running command 'python -c "import sys; sys.stderr = sys.stdout; import numpy; print(numpy.get_include())"' notice: [python-cfg] NumPy disabled. Reason: notice: [python-cfg] python -c "import sys; sys.stderr = sys.stdout; import numpy; print(numpy.get_include())" aborted with notice: [python-cfg] Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'numpy' Performing configuration checks - default address-model : none [1] - default architecture : none [1] - compiler supports SSE2 : no [2] - compiler supports SSE4.1 : no [2] - has synchronization.lib : no [2] - has std::atomic_ref : no [2] - has statx : no [2] - has statx syscall : no [2] - has BCrypt API : no [2] - is Windows CE : no [2] - has init_priority attribute : no [2] - has stat::st_blksize : no [2] - has stat::st_mtim : no [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) : no [2] - cxx11_auto_declarations : no [2] - cxx11_constexpr : no [2] - cxx11_defaulted_functions : no [2] - cxx11_final : no [2] - cxx11_hdr_mutex : no [2] - cxx11_hdr_tuple : no [2] - cxx11_lambdas : no [2] - cxx11_noexcept : no [2] - cxx11_nullptr : no [2] - cxx11_rvalue_references : no [2] - cxx11_template_aliases : no [2] - cxx11_thread_local : no [2] - cxx11_variadic_templates : no [2] - cxx11_auto_declarations : no [3] - cxx11_constexpr : no [3] - cxx11_defaulted_functions : no [3] - cxx11_final : no [3] - cxx11_hdr_mutex : no [3] - cxx11_hdr_tuple : no [3] - cxx11_lambdas : no [3] - cxx11_noexcept : no [3] - cxx11_nullptr : no [3] - cxx11_rvalue_references : no [3] - cxx11_template_aliases : no [3] - cxx11_thread_local : no [3] - cxx11_variadic_templates : no [3] - has_icu builds : no [2] - zlib : no [4] - bzip2 : no [4] warning: Boost.Json was explicitly requested, but will not be built, because it requires C++11. note: To enable C++11 support, use the 'cxxstd=11' command line argument. - cxx11_decltype : no [2] - cxx11_basic_alignas : no [2] - cxx11_decltype : no [3] - cxx11_basic_alignas : no [3] - native atomic int32 supported : no [2] - has message compiler : no [2] - native syslog supported : no [2] - pthread supports robust mutexes : no [2] - compiler supports SSSE3 : no [2] - compiler supports AVX2 : no [2] - gcc visibility : no [2] - sfinae_expr : no [2] - cxx11_unified_initialization_syntax : no [2] - cxx11_hdr_initializer_list : no [2] - cxx11_hdr_chrono : no [2] - cxx11_numeric_limits : no [2] - cxx11_hdr_array : no [2] - cxx11_hdr_atomic : no [2] - cxx11_hdr_type_traits : no [2] - cxx11_allocator : no [2] - cxx11_explicit_conversion_operators : no [2] - gcc visibility : no [3] - sfinae_expr : no [3] - cxx11_unified_initialization_syntax : no [3] - cxx11_hdr_initializer_list : no [3] - cxx11_hdr_chrono : no [3] - cxx11_numeric_limits : no [3] - cxx11_hdr_array : no [3] - cxx11_hdr_atomic : no [3] - cxx11_hdr_type_traits : no [3] - cxx11_allocator : no [3] - cxx11_explicit_conversion_operators : no [3] - cxx11_static_assert : no [2] - std::fstream is moveable and swappable : no [2] - Has Large File Support : no [2] - Has attribute init_priority : no [2] - cxx11_static_assert : no [3] - std::fstream is moveable and swappable : no [3] - Has Large File Support : no [3] - Has attribute init_priority : no [3] - libbacktrace builds : no [2] - libbacktrace builds : no [3] - addr2line builds : no [2] - addr2line builds : no [3] - WinDbg builds : no [2] - WinDbg builds : no [3] - WinDbgCached builds : no [2] - WinDbgCached builds : no [3] - BOOST_COMP_GNUC >= 4.3.0 : no [2] - cxx11_hdr_thread : no [2] - cxx11_hdr_regex : no [2] - cxx11_hdr_thread : no [3] - cxx11_hdr_regex : no [3] [1] clng-12.0. [2] clng-win-12.0./dbg/adrs-mdl-64/archt-x86/bst.l-off/bst.l-off/lnk-sttc/nm-on/pythn-3.10/thrdp-wn32/thrd-mlt/vsblt-hdn [3] clng-win-12.0./dbg/adrs-mdl-64/archt-x86/bst.l-off/bst.l-off/bld-no/lnk-sttc/nm-on/pythn-3.10/thrdp-wn32/thrd-mlt/vsblt-hdn [4] lnk-sttc Component configuration: - atomic : building - chrono : 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 - wave : building ...skipped libboost_stacktrace_noop.lib for lack of noop.obj... ...skipped libboost_stacktrace_basic.lib for lack of basic.obj... ...skipped libboost_stacktrace_noop.lib for lack of libboost_stacktrace_noop.lib... ...skipped libboost_iostreams.lib for lack of file_descriptor.obj... ...skipped libboost_iostreams.lib for lack of libboost_iostreams.lib... ...failed updating 31 targets... boost/1.79.0: boost/1.79.0: ERROR: Package '03858f2b67b1ec5fb3f1fb9c1c129e716545ff45' build failed boost/1.79.0: WARN: Build folder C:\.conan\29916a\1 ERROR: boost/1.79.0: Error in build() method, line 875 self.run(full_command, run_environment=True) ConanException: Error 1 while executing b2.exe -q numa=on target-os=windows architecture=x86 address-model=64 binary-format=pe abi=ms --layout=system --user-config=C:\.conan\a06fea\1\source_subfolder\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=off --disable-iconv threading=multi visibility=hidden link=static variant=debug --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-wave toolset=clang-win cxxflags=-std=c++20 pch=on linkflags="-stdlib=None" cxxflags="-fPIC -stdlib=None" install --prefix=C:\.conan\cfb3d9\1 -j12 --abbreviate-paths -d0 --debug-configuration --build-dir="C:\.conan\29916a\1"
michael-brade commented 2 years ago

I have the same problem: clang 15.0.2 from llvm.org, boost 1.80. The reason it fails is because boost b2 calls clang with msvc arguments. From C:\.conan\4bba60\1\boost\bin.v2\config.log:

compile-c-c++ C:\.conan\4bba60\1\boost\bin.v2\libs\config\checks\architecture\clng-win-15.0.\dbg\thrd-mlt\32.obj

     "C:/interne/Programme/llvm-15.0.2/bin/clang++.exe" --target=x86_64-pc-windows-msvc "libs\config\checks\architecture\32.cpp" -c -Fo"C:\.conan\4bba60\1\boost\bin.v2\libs\config\checks\architecture\clng-win-15.0.\dbg\thrd-mlt\32.obj"     -TP /EHs /GR -fuse-ld=lld /Z7 /Od /Ob0 /W3 /MDd -fPIC -stdlib=libc++ -std=c++20 -DBOOST_ALL_NO_LIB=1 "-I." 

clang++: error: no such file or directory: '/EHs'
clang++: error: no such file or directory: '/GR'
clang++: error: no such file or directory: '/Z7'
clang++: error: no such file or directory: '/Od'
clang++: error: no such file or directory: '/Ob0'
clang++: error: no such file or directory: '/W3'
clang++: error: no such file or directory: '/MDd'
clang++: error: unsupported option '-fPIC' for target 'x86_64-pc-windows-msvc'
...failed updating 1 target...
manuelpagliuca commented 9 months ago

@michael-brade do you managed to solve this?

michael-brade commented 9 months ago

no, I didn't. I had to give up on it for now, maybe I'll work on this later this year again.