bfgroup / b2

B2 makes it easy to build C++ projects, everywhere.
https://www.bfgroup.xyz/b2/
Boost Software License 1.0
76 stars 228 forks source link

OSPLAT is not defined for riscv #340

Closed kxxt closed 9 months ago

kxxt commented 11 months ago

Make sure you completed the following tasks

Environment and version details

B2 Version 4.10. OS=LINUX. Copyright 1993-2002 Christopher Seiwald and Perforce Software, Inc. Copyright 2001 David Turner. Copyright 2001-2004 David Abrahams. Copyright 2002-2019 Rene Rivera. Copyright 2003-2015 Vladimir Prus.

DEFAULTS: jobs = 64


* B2 Configuration: Output of `b2 --debug-configuration` in your project.

notice: found boost-build.jam at /build/boost/src/boost_1_83_0/boost-build.jam notice: loading B2 from /build/boost/src/boost_1_83_0/tools/build/src/kernel/bootstrap.jam notice: Searching '/etc' '/build' '/build/boost/src/boost_1_83_0/tools/build/src/kernel' '/build/boost/src/boost_1_83_0/tools/build/src/util' '/build/boost/src/boost_1_83_0/tools/build/src/build' '/build/boost/src/boost_1_83_0/tools/build/src/tools' '/build/boost/src/boost_1_83_0/tools/build/src/contrib' '/build/boost/src/boost_1_83_0/tools/build/src/.' for site-config configuration file 'site-config.jam'. notice: Configuration file 'site-config.jam' not found in '/etc' '/build' '/build/boost/src/boost_1_83_0/tools/build/src/kernel' '/build/boost/src/boost_1_83_0/tools/build/src/util' '/build/boost/src/boost_1_83_0/tools/build/src/build' '/build/boost/src/boost_1_83_0/tools/build/src/tools' '/build/boost/src/boost_1_83_0/tools/build/src/contrib' '/build/boost/src/boost_1_83_0/tools/build/src/.'. notice: Searching '/build' '/build/boost/src/boost_1_83_0/tools/build/src/kernel' '/build/boost/src/boost_1_83_0/tools/build/src/util' '/build/boost/src/boost_1_83_0/tools/build/src/build' '/build/boost/src/boost_1_83_0/tools/build/src/tools' '/build/boost/src/boost_1_83_0/tools/build/src/contrib' '/build/boost/src/boost_1_83_0/tools/build/src/.' for user-config configuration file 'user-config.jam'. notice: Configuration file 'user-config.jam' not found in '/build' '/build/boost/src/boost_1_83_0/tools/build/src/kernel' '/build/boost/src/boost_1_83_0/tools/build/src/util' '/build/boost/src/boost_1_83_0/tools/build/src/build' '/build/boost/src/boost_1_83_0/tools/build/src/tools' '/build/boost/src/boost_1_83_0/tools/build/src/contrib' '/build/boost/src/boost_1_83_0/tools/build/src/.'. notice: Searching '.' for project-config configuration file 'project-config.jam'. notice: Loading project-config configuration file 'project-config.jam' from '.'. notice: will use 'g++' for gcc, condition gcc-13 notice: using gcc libraries :: gcc-13 :: /usr/bin /usr/lib /usr/lib32 /usr/lib64 notice: using gcc archiver :: gcc-13 :: /usr/sbin/ar warning: toolset gcc initialization: can not find tool windres warning: initialized from project-config.jam:12 notice: using rc compiler :: gcc-13 :: /usr/sbin/as notice: [python-cfg] Configuring python... notice: [python-cfg] user-specified version: "3.11" notice: [python-cfg] user-specified cmd-or-prefix: "/usr" notice: [python-cfg] Checking interpreter command "/usr/bin/python3.11"... notice: [python-cfg] running command '/usr/bin/python3.11 -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: "/usr/bin/python3.11" notice: [python-cfg] include path: "/usr/include/python3.11" notice: [python-cfg] library path: "/usr/lib/python3.11/config" "/usr/lib" notice: [python-cfg] Checking for NumPy... notice: [python-cfg] running command '/usr/bin/python3.11 -c "import sys; sys.stderr = sys.stdout; import numpy; print(numpy.get_include())"' notice: [python-cfg] NumPy enabled ===============MPI Auto-configuration=============== Found recent LAM-MPI or Open MPI wrapper compiler: mpic++ MPI compilation flags: MPI link flags: -Wl,-rpath -Wl,/usr/lib -Wl,--enable-new-dtags -lmpi_cxx -lmpi MPI build features:

mpi_cxx mpi -Wl,-rpath -Wl,/usr/lib -Wl,--enable-new-dtags MPI launcher: mpirun -np ==================================================== notice: [zlib] Using pre-installed library notice: [zlib] Condition notice: [bzip2] Using pre-installed library notice: [bzip2] Condition notice: [lzma] Using pre-installed library notice: [lzma] Condition notice: [zstd] Using pre-installed library notice: [zstd] Condition notice: [locale] ICU path set to /usr Performing configuration checks - default address-model : 64-bit [1] - default architecture : riscv [1] Building the Boost C++ Libraries. error: No best alternative for libs/context/build/asm_sources with aapcs 64 riscv off elf fcontext off off 64 riscv on off full shared speed LINUX on on off off 3.11 abi address-model architecture binary-format toolset on off shared native off linux on pthread multi 13 gcc release off hidden off on no match: aapcs 32 arm elf multi clang no match: aapcs 32 arm elf multi gcc no match: aapcs 32 arm elf multi qcc no match: aapcs 32 arm mach-o multi clang no match: aapcs 32 arm mach-o multi darwin no match: aapcs 32 arm pe multi msvc no match: aapcs 64 arm elf multi clang no match: aapcs 64 arm elf multi gcc no match: aapcs 64 arm mach-o multi clang no match: aapcs 64 arm mach-o multi darwin no match: aapcs 64 arm pe multi msvc no match: sysv 64 loongarch elf multi gcc no match: o32 32 mips elf multi clang no match: o32 32 mips elf multi gcc no match: n64 64 mips elf multi clang no match: n64 64 mips elf multi gcc no match: sysv 32 power elf multi clang no match: sysv 32 power elf multi gcc no match: sysv 32 power mach-o multi clang no match: sysv 32 power mach-o multi gcc no match: sysv 32 power mach-o multi darwin no match: sysv 32 power xcoff multi clang no match: sysv 32 power xcoff multi gcc no match: sysv 64 power elf multi clang no match: sysv 64 power elf multi gcc no match: sysv 64 power mach-o multi clang no match: sysv 64 power mach-o multi gcc no match: sysv 64 power mach-o multi darwin no match: sysv 64 power xcoff multi clang no match: sysv 64 power xcoff multi gcc no match: sysv 32_64 power mach-o multi no match: sysv 64 riscv elf multi clang no match: sysv 64 riscv elf multi gcc no match: sysv 64 s390x elf multi gcc no match: sysv 64 s390x elf multi clang no match: sysv 32 x86 elf multi clang no match: sysv 32 x86 elf multi gcc no match: sysv 32 x86 elf multi intel no match: sysv 32 x86 mach-o multi clang no match: sysv 32 x86 mach-o multi darwin no match: ms 32 x86 pe multi clang no match: ms 32 x86 pe multi clang-win no match: ms 32 x86 pe multi gcc no match: ms 32 x86 pe multi intel no match: ms 32 x86 pe multi msvc no match: ms 32 x86 pe multi embarcadero no match: ms 32 x86 pe multi borland no match: sysv 64 x86 elf multi clang no match: sysv 64 x86 elf multi gcc no match: sysv 64 x86 elf multi intel no match: sysv 64 x86 mach-o multi clang no match: sysv 64 x86 mach-o multi gcc no match: sysv 64 x86 mach-o multi darwin no match: sysv 64 x86 mach-o multi intel no match: ms 64 x86 pe multi clang no match: ms 64 x86 pe multi clang-win no match: ms 64 x86 pe multi gcc no match: ms 64 x86 pe multi intel no match: ms 64 x86 pe multi msvc no match: ms 64 x86 pe multi embarcadero no match: x32 32 x86 elf multi clang no match: x32 32 x86 elf multi gcc no match: x32 32 x86 elf multi intel no match: sysv 32_64 x86 mach-o multi no match: sysv arm+x86 mach-o multi - has std::atomic_ref : no [2] - has -Wl,--no-undefined : 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 : yes [2] - zlib : yes - bzip2 : yes - lzma : yes - zstd : yes - has_lzma_cputhreads builds : yes [2] - cxx11_decltype : yes [2] - cxx11_basic_alignas : yes [2] - iconv (libc) : yes [2] notice: [locale] Search ICU in /usr/lib notice: [locale] Search ICU in /usr/lib notice: [locale] Search ICU in /usr/lib notice: [locale] Search ICU in /usr/lib - icu : 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] - cxx11_static_assert : yes [2] - lockfree boost::atomic_flag : yes [2] - native atomic int32 supported : yes [2] - native syslog supported : yes [2] - pthread supports robust mutexes : 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] - libbacktrace builds : no [2] - libbacktrace builds : no [3] - addr2line builds : yes [2] - WinDbg builds : no [2] - WinDbg builds : no [3] - WinDbgCached builds : no [2] - WinDbgCached builds : no [3] - BOOST_COMP_GNUC >= 4.3.0 : yes [2] - BOOST_COMP_GNUC >= 4.3.0 : yes [4] - cxx11_hdr_thread : yes [2] - cxx11_hdr_regex : yes [2] error: No best alternative for libs/context/build/asm_sources with aapcs 64 riscv off elf fcontext off off 64 riscv on off full static speed LINUX on on off off 3.11 abi address-model architecture binary-format toolset on off shared native off linux on pthread multi 13 gcc release off hidden off on no match: aapcs 32 arm elf multi clang no match: aapcs 32 arm elf multi gcc no match: aapcs 32 arm elf multi qcc no match: aapcs 32 arm mach-o multi clang no match: aapcs 32 arm mach-o multi darwin no match: aapcs 32 arm pe multi msvc no match: aapcs 64 arm elf multi clang no match: aapcs 64 arm elf multi gcc no match: aapcs 64 arm mach-o multi clang no match: aapcs 64 arm mach-o multi darwin no match: aapcs 64 arm pe multi msvc no match: sysv 64 loongarch elf multi gcc no match: o32 32 mips elf multi clang no match: o32 32 mips elf multi gcc no match: n64 64 mips elf multi clang no match: n64 64 mips elf multi gcc no match: sysv 32 power elf multi clang no match: sysv 32 power elf multi gcc no match: sysv 32 power mach-o multi clang no match: sysv 32 power mach-o multi gcc no match: sysv 32 power mach-o multi darwin no match: sysv 32 power xcoff multi clang no match: sysv 32 power xcoff multi gcc no match: sysv 64 power elf multi clang no match: sysv 64 power elf multi gcc no match: sysv 64 power mach-o multi clang no match: sysv 64 power mach-o multi gcc no match: sysv 64 power mach-o multi darwin no match: sysv 64 power xcoff multi clang no match: sysv 64 power xcoff multi gcc no match: sysv 32_64 power mach-o multi no match: sysv 64 riscv elf multi clang no match: sysv 64 riscv elf multi gcc no match: sysv 64 s390x elf multi gcc no match: sysv 64 s390x elf multi clang no match: sysv 32 x86 elf multi clang no match: sysv 32 x86 elf multi gcc no match: sysv 32 x86 elf multi intel no match: sysv 32 x86 mach-o multi clang no match: sysv 32 x86 mach-o multi darwin no match: ms 32 x86 pe multi clang no match: ms 32 x86 pe multi clang-win no match: ms 32 x86 pe multi gcc no match: ms 32 x86 pe multi intel no match: ms 32 x86 pe multi msvc no match: ms 32 x86 pe multi embarcadero no match: ms 32 x86 pe multi borland no match: sysv 64 x86 elf multi clang no match: sysv 64 x86 elf multi gcc no match: sysv 64 x86 elf multi intel no match: sysv 64 x86 mach-o multi clang no match: sysv 64 x86 mach-o multi gcc no match: sysv 64 x86 mach-o multi darwin no match: sysv 64 x86 mach-o multi intel no match: ms 64 x86 pe multi clang no match: ms 64 x86 pe multi clang-win no match: ms 64 x86 pe multi gcc no match: ms 64 x86 pe multi intel no match: ms 64 x86 pe multi msvc no match: ms 64 x86 pe multi embarcadero no match: x32 32 x86 elf multi clang no match: x32 32 x86 elf multi gcc no match: x32 32 x86 elf multi intel no match: sysv 32_64 x86 mach-o multi no match: sysv arm+x86 mach-o multi - has std::atomic_ref : no [4] - has statx : yes [4] - has init_priority attribute : yes [4] - has stat::st_blksize : yes [4] - has stat::st_mtim : yes [4] - has stat::st_mtimensec : no [4] - has stat::st_mtimespec : no [4] - has stat::st_birthtim : no [4] - has stat::st_birthtimensec : no [4] - has stat::st_birthtimespec : no [4] - has fdopendir(O_NOFOLLOW) : yes [4] - has dirent::d_type : yes [4] - has POSIX *at APIs : yes [4] - cxx11_auto_declarations : yes [4] - cxx11_constexpr : yes [4] - cxx11_defaulted_functions : yes [4] - cxx11_final : yes [4] - cxx11_hdr_mutex : yes [4] - cxx11_hdr_tuple : yes [4] - cxx11_lambdas : yes [4] - cxx11_noexcept : yes [4] - cxx11_nullptr : yes [4] - cxx11_rvalue_references : yes [4] - cxx11_template_aliases : yes [4] - cxx11_thread_local : yes [4] - cxx11_variadic_templates : yes [4] - has_icu builds : yes [4] - zlib : yes [5] - bzip2 : yes [5] - lzma : yes [5] - zstd : yes [5] - has_lzma_cputhreads builds : yes [4] - cxx11_decltype : yes [4] - cxx11_basic_alignas : yes [4] - iconv (libc) : yes [4] - icu : yes [4] - cxx11_defaulted_moves : yes [4] - cxx11_hdr_functional : yes [4] - cxx11_hdr_type_traits : yes [4] - cxx11_override : yes [4] - cxx11_range_based_for : yes [4] - cxx11_scoped_enums : yes [4] - cxx11_smart_ptr : yes [4] - cxx11_static_assert : yes [4] - lockfree boost::atomic_flag : yes [4] - native atomic int32 supported : yes [4] - native syslog supported : yes [4] - pthread supports robust mutexes : yes [4] - gcc visibility : yes [4] - sfinae_expr : yes [4] - cxx11_unified_initialization_syntax : yes [4] - cxx11_hdr_initializer_list : yes [4] - cxx11_hdr_chrono : yes [4] - cxx11_numeric_limits : yes [4] - cxx11_hdr_array : yes [4] - cxx11_hdr_atomic : yes [4] - cxx11_allocator : yes [4] - cxx11_explicit_conversion_operators : yes [4] - long double support : yes [4] - cxx11_char16_t : yes [4] - cxx11_char32_t : yes [4] - Has Large File Support : yes [4] - Has attribute init_priority : yes [4] - libbacktrace builds : no [4] - libbacktrace builds : no [6] - addr2line builds : yes [4] - WinDbg builds : no [4] - WinDbg builds : no [6] - WinDbgCached builds : no [4] - WinDbgCached builds : no [6] - cxx11_hdr_thread : yes [4] - cxx11_hdr_regex : yes [4] [1] gcc-13 [2] gcc-13/release/python-3.11/threading-multi/visibility-hidden [3] gcc-13/release/build-no/python-3.11/threading-multi/visibility-hidden [4] gcc-13/release/link-static/python-3.11/threading-multi/visibility-hidden [5] link-static [6] gcc-13/release/build-no/link-static/python-3.11/threading-multi/visibility-hidden 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 : building - headers : building - iostreams : building - json : building - locale : building - log : building - math : building - mpi : building - nowide : building - program_options : building - python : building - random : building - regex : building - serialization : building - stacktrace : building - system : building - test : building - thread : building - timer : building - type_erasure : building - url : building - wave : building ...patience... ...patience... ...patience... ...patience... ...patience... ...patience... ...found 22024 targets... ...updating 2025 targets... boost-install.generate-cmake-config- bin.v2/libs/regex/build/stage/boost_regex-config.cmake boost-install.generate-cmake-config-version- bin.v2/libs/json/build/stage/boost_json-config-version.cmake boost-install.generate-cmake-config-version- bin.v2/libs/regex/build/stage/boost_regex-config-version.cmake boost-install.generate-cmake-config- bin.v2/libs/json/build/stage/boost_json-config.cmake boost-install.generate-cmake-config- bin.v2/libs/iostreams/build/stage/boost_iostreams-config.cmake boost-install.generate-cmake-config-version- bin.v2/libs/iostreams/build/stage/boost_iostreams-config-version.cmake boost-install.generate-cmake-config- bin.v2/libs/fiber/build/stage/boost_fiber-config.cmake boost-install.generate-cmake-config- bin.v2/libs/graph/build/stage/boost_graph-config.cmake boost-install.generate-cmake-config- bin.v2/libs/graph_parallel/build/stage/boost_graph_parallel-config.cmake boost-install.generate-cmake-config- bin.v2/libs/python/build/stage/boost_python-config.cmake boost-install.generate-cmake-config-version- bin.v2/libs/python/build/stage/boost_python-config-version.cmake boost-install.generate-cmake-config- bin.v2/libs/mpi/build/stage/boost_mpi-config.cmake ...on 100th target... .... ``` ### Brief problem description `OSPLAT` is not defined for riscv64 and riscv32, which leads to the following bug: https://github.com/boostorg/context/issues/243 ### Steps to reproduce the issue Build boost on riscv64 linux. ### Actual behavior summary A non fatal error happens, which causes https://github.com/boostorg/context/issues/243 `error: No best alternative for libs/context/build/asm_sources with aapcs 64 riscv off elf fcontext off off 64 riscv on off full static speed LINUX on on off off 3.11 abi address-model architecture binary-format toolset on off shared native off linux on pthread multi 13 gcc release off hidden off on` ### Expected behavior summary This non fatal error shouldn't happen.
grafikrobot commented 9 months ago

Resolved by Decided to go a much simpler way to resolve this. See https://github.com/bfgroup/b2/commit/d1c231218604c9c8c9e0c10c33d79de3b448426e