最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

c++ - Boost 1.87.0 with msys2 on windows - all features marked as "no" and "No best alternative for&a

programmeradmin2浏览0评论

I am trying to build Boost with GCC on windows. My GCC version:

C:\msys64\ucrt64\bin>g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/14.1.0/lto-wrapper.exe
Target: x86_64-w64-mingw32
Configured with: ../gcc-14.1.0/configure --prefix=/ucrt64 --with-local-prefix=/ucrt64/local --build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --with-native-system-header-dir=/ucrt64/include --libexecdir=/ucrt64/lib --enable-bootstrap --enable-checking=release --with-arch=nocona --with-tune=generic --enable-languages=c,lto,c++,fortran,ada,objc,obj-c++,rust,jit --enable-shared --enable-static --enable-libatomic --enable-threads=posix --enable-graphite --enable-fully-dynamic-string --enable-libstdcxx-filesystem-ts --enable-libstdcxx-time --disable-libstdcxx-pch --enable-lto --enable-libgomp --disable-libssp --disable-multilib --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-libiconv --with-system-zlib --with-gmp=/ucrt64 --with-mpfr=/ucrt64 --with-mpc=/ucrt64 --with-isl=/ucrt64 --with-pkgversion='Rev3, Built by MSYS2 project' --with-bugurl= --with-gnu-as --with-gnu-ld --disable-libstdcxx-debug --enable-plugin --with-boot-ldflags=-static-libstdc++ --with-stage1-ldflags=-static-libstdc++
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.1.0 (Rev3, Built by MSYS2 project)

When I run b2, I do it like this:

.\b2.exe toolset=gcc install -q --build-type=complete --without-python -j16 -sNO_BZIP2=1 -d+4

I see a lot of errors like this:

error: No best alternative for /lib/boost/1.87.0/boost_1_87_0/libs/context/build/asm_sources with <abi>ms <address-model>64 <asynch-exceptions>off <binary-format>pe <boost.beast.allow-deprecated>on <boost.beast.separate-compilation>on <boost.cobalt.executor>any_io_executor <boost.cobalt.pmr>std <boost.process.fs>boost <context-impl>fcontext <coverage>off <debug-store>object <debug-symbols>on <embed-manifest-via>mt <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <inlining>off <known-warnings>hide <link>static <midl-robust>yes <midl-stubless-proxy>yes <optimization>off <os>NT <pch>on <preserve-test-targets>on <profiling>off <python-debugging>off <relevant>abi <relevant>address-model <relevant>architecture <relevant>binary-format <relevant>toolset <rtti>on <runtime-debugging>on <runtime-link>static <stdlib>native <strip>off <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-gcc:version>14 <toolset>gcc <variant>debug <vectorize>off <visibility>hidden <warnings-as-errors>off <warnings>on <windows-api>desktop
    no match: <abi>aapcs <address-model>32 <architecture>arm <binary-format>elf <threading>multi <toolset>clang
    no match: <abi>aapcs <address-model>32 <architecture>arm <binary-format>elf <threading>multi <toolset>gcc
    no match: <abi>aapcs <address-model>32 <architecture>arm <binary-format>elf <threading>multi <toolset>qcc
    no match: <abi>aapcs <address-model>32 <architecture>arm <binary-format>mach-o <threading>multi <toolset>clang
    no match: <abi>aapcs <address-model>32 <architecture>arm <binary-format>mach-o <threading>multi <toolset>darwin
    no match: <abi>aapcs <address-model>32 <architecture>arm <binary-format>pe <threading>multi <toolset>msvc
    no match: <abi>aapcs <address-model>64 <architecture>arm <binary-format>elf <threading>multi <toolset>clang
    no match: <abi>aapcs <address-model>64 <architecture>arm <binary-format>elf <threading>multi <toolset>gcc
    no match: <abi>aapcs <address-model>64 <architecture>arm <binary-format>mach-o <threading>multi <toolset>clang

Also, all features it lists are marked as "no":

    - is Windows CE            : no  (cached) [50]
    - cxx11_rvalue_references  : no  (cached) [50]
    - has std::atomic_ref      : no  (cached) [51]
    - has statx                : no  (cached) [51]
    - has statx syscall        : no  (cached) [51]
    - has BCrypt API           : no  (cached) [51]
    - is Windows CE            : no  (cached) [51]
    - cxx11_rvalue_references  : no  (cached) [51]
    - has_icu builds           : no  (cached) [50]
    - cxx11_hdr_ratio          : no  (cached) [50]
    - cxx11_hdr_ratio          : no  (cached) [51]
    - mips                     : no  (cached) [51]
    - native atomic int32 supported : no  (cached) [51]
    - has message compiler     : no  (cached) [51]
    - native syslog supported  : no  (cached) [51]
    - pthread supports robust mutexes : no  (cached) [51]
    - cxx11_lambdas            : no  (cached) [50]
    - cxx11_lambdas            : no  (cached) [51]
    - std_wstreambuf builds    : no  (cached) [50]
    - std_wstreambuf           : no  (cached) [50]
    - std_wstreambuf           : no  (cached) [51]
    - BOOST_COMP_GNUC >= 4.3.0 : no  (cached) [50]
    - cxx11_variadic_templates : no  (cached) [50]
    - cxx11_variadic_templates : no  (cached) [51]
    - cxx20_hdr_concepts       : no  (cached) [50]
    - cxx20_hdr_concepts       : no  (cached) [51]
    - BOOST_ARCH_WORD_BITS == 0.0.16 : no  (cached) [50]
    - BOOST_ARCH_WORD_BITS == 0.0.32 : no  (cached) [50]
    - BOOST_ARCH_WORD_BITS == 0.0.64 : no  (cached) [50]
    - BOOST_ARCH_X86           : no  (cached) [50]
    - BOOST_ARCH_IA64          : no  (cached) [50]
    - BOOST_ARCH_SPARC         : no  (cached) [50]
    - BOOST_ARCH_PPC           : no  (cached) [50]
    - BOOST_ARCH_LOONGARCH     : no  (cached) [50]
    - BOOST_ARCH_MIPS          : no  (cached) [50]
    - BOOST_ARCH_PARISC        : no  (cached) [50]
    - BOOST_ARCH_ARM           : no  (cached) [50]
    - BOOST_ARCH_RISCV         : no  (cached) [50]
    - BOOST_ARCH_SYS390        : no  (cached) [50]

I don't know what all those mean, but BOOST_ARCH_X86 should probably be Yes when compiling on and for 64bit x86 CPU. It almost seems like it can't read the output of the compiler.

This is how I set path to the compiler:

boost_1_87_0\tools\build\src\build\user-config.jam

using gcc : : C:\\msys64\\ucrt64\\bin\\g++.exe ;

Towards the end of the build, I get output like this:

...skipped <pbin.v2\libs\graph\build\gcc-14\debug\address-model-32\threadapi-win32\threading-multi\visibility-hidden>libboost_graph-mgw14-mt-d-1_87.dll.a for lack of <pbin.v2\libs\graph\build\gcc-14\debug\address-model-32\threadapi-win32\threading-multi\visibility-hidden>read_graphviz_new.o...
...skipped <pC:\Boost\lib>libboost_graph-mgw14-mt-d-1_87.dll.a for lack of <pbin.v2\libs\graph\build\gcc-14\debug\address-model-32\threadapi-win32\threading-multi\visibility-hidden>libboost_graph-mgw14-mt-d-1_87.dll.a...
0.000000 sec system; 0.000000 sec user; 0.010542 sec clock
0.000000 sec system; 0.000000 sec user; 0.010193 sec clock
0.000000 sec system; 0.000000 sec user; 0.011472 sec clock
0.000000 sec system; 0.000000 sec user; 0.011050 sec clock
0.000000 sec system; 0.000000 sec user; 0.010550 sec clock
0.000000 sec system; 0.000000 sec user; 0.017701 sec clock
0.000000 sec system; 0.000000 sec user; 0.015955 sec clock
0.000000 sec system; 0.000000 sec user; 0.014221 sec clock
0.000000 sec system; 0.000000 sec user; 0.011568 sec clock
0.000000 sec system; 0.000000 sec user; 0.010537 sec clock
0.000000 sec system; 0.000000 sec user; 0.010510 sec clock
...skipped <pbin.v2\libs\program_options\build\gcc-14\debug\address-model-32\threadapi-win32\threading-multi\visibility-hidden>libboost_program_options-mgw14-mt-d-1_87.dll.a for lack of <pbin.v2\libs\program_options\build\gcc-14\debug\address-model-32\threadapi-win32\threading-multi\visibility-hidden>cmdline.o...
...skipped <pC:\Boost\lib>libboost_program_options-mgw14-mt-d-1_87.dll.a for lack of <pbin.v2\libs\program_options\build\gcc-14\debug\address-model-32\threadapi-win32\threading-multi\visibility-hidden>libboost_program_options-mgw14-mt-d-1_87.dll.a...
0.000000 sec system; 0.000000 sec user; 0.010241 sec clock
0.000000 sec system; 0.000000 sec user; 0.009790 sec clock
0.000000 sec system; 0.000000 sec user; 0.009847 sec clock

...failed updating 0 target...

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论