Boost logo

Boost :

From: Ruben Perez (rubenperez038_at_[hidden])
Date: 2023-07-07 16:30:29


Hi,

Re-running the CIs on the master branch, that now has this commit
merged, builds correctly Boost.Context, but the produced library seems
to be missing the symbols required to build an executable with it. On
ARM 64, under Linux, the build produces a warning message (see the
bottom of the email). The linker then complains about undefined
references to make_fcontext, jump_fcontext and ontop_fcontext.

For reference, the executable is using Context through boost::asio::spawn.

Full build log here: https://drone.cpp.al/boostorg/mysql/379/16/3

error: No best alternative for libs/context/build/asm_sources with
<abi>sysv <address-model>64 <architecture>arm <asynch-exceptions>off
<binary-format>elf <boost.mysql.separate-compilation>on
<context-impl>fcontext <coverage>off <cxxstd-dialect>iso <cxxstd>20
<debug-symbols>on <deduced-address-model>64 <deduced-architecture>arm
<exception-handling>on <extern-c-nothrow>off <inlining>off
<link>shared <optimization>off <os>LINUX <pch>on
<preserve-test-targets>on <profiling>off <python-debugging>off
<python>3.10 <relevant>abi <relevant>address-model
<relevant>architecture <relevant>binary-format <relevant>toolset
<rtti>on <runtime-debugging>on <runtime-link>shared <stdlib>native
<strip>off <target-os>linux <testing.execute>on <threadapi>pthread
<threading>multi <toolset-clang:platform>linux
<toolset-clang:version>14 <toolset>clang <variant>debug <vectorize>off
<visibility>hidden <warnings-as-errors>off <warnings>on

    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
    no match: <abi>aapcs <address-model>64 <architecture>arm
<binary-format>mach-o <threading>multi <toolset>darwin
    no match: <abi>aapcs <address-model>64 <architecture>arm
<binary-format>pe <threading>multi <toolset>msvc
    no match: <abi>sysv <address-model>64 <architecture>loongarch
<binary-format>elf <threading>multi <toolset>gcc
    no match: <abi>o32 <address-model>32 <architecture>mips
<binary-format>elf <threading>multi <toolset>clang
    no match: <abi>o32 <address-model>32 <architecture>mips
<binary-format>elf <threading>multi <toolset>gcc
    no match: <abi>n64 <address-model>64 <architecture>mips
<binary-format>elf <threading>multi <toolset>clang
    no match: <abi>n64 <address-model>64 <architecture>mips
<binary-format>elf <threading>multi <toolset>gcc
    no match: <abi>sysv <address-model>32 <architecture>power
<binary-format>elf <threading>multi <toolset>clang
    no match: <abi>sysv <address-model>32 <architecture>power
<binary-format>elf <threading>multi <toolset>gcc
    no match: <abi>sysv <address-model>32 <architecture>power
<binary-format>mach-o <threading>multi <toolset>darwin
    no match: <abi>sysv <address-model>32 <architecture>power
<binary-format>xcoff <threading>multi <toolset>clang
    no match: <abi>sysv <address-model>32 <architecture>power
<binary-format>xcoff <threading>multi <toolset>gcc
    no match: <abi>sysv <address-model>64 <architecture>power
<binary-format>elf <threading>multi <toolset>clang
    no match: <abi>sysv <address-model>64 <architecture>power
<binary-format>elf <threading>multi <toolset>gcc
    no match: <abi>sysv <address-model>64 <architecture>power
<binary-format>mach-o <threading>multi <toolset>clang
    no match: <abi>sysv <address-model>64 <architecture>power
<binary-format>mach-o <threading>multi <toolset>darwin
    no match: <abi>sysv <address-model>64 <architecture>power
<binary-format>xcoff <threading>multi <toolset>clang
    no match: <abi>sysv <address-model>64 <architecture>power
<binary-format>xcoff <threading>multi <toolset>gcc
    no match: <abi>sysv <address-model>32_64 <architecture>power
<binary-format>mach-o <threading>multi
    no match: <abi>sysv <address-model>64 <architecture>riscv
<binary-format>elf <threading>multi <toolset>clang
    no match: <abi>sysv <address-model>64 <architecture>riscv
<binary-format>elf <threading>multi <toolset>gcc
    no match: <abi>sysv <address-model>64 <architecture>s390x
<binary-format>elf <threading>multi <toolset>gcc
    no match: <abi>sysv <address-model>64 <architecture>s390x
<binary-format>elf <threading>multi <toolset>clang
    no match: <abi>sysv <address-model>32 <architecture>x86
<binary-format>elf <threading>multi <toolset>clang
    no match: <abi>sysv <address-model>32 <architecture>x86
<binary-format>elf <threading>multi <toolset>gcc
    no match: <abi>sysv <address-model>32 <architecture>x86
<binary-format>elf <threading>multi <toolset>intel
    no match: <abi>sysv <address-model>32 <architecture>x86
<binary-format>mach-o <threading>multi <toolset>clang
    no match: <abi>sysv <address-model>32 <architecture>x86
<binary-format>mach-o <threading>multi <toolset>darwin
    no match: <abi>ms <address-model>32 <architecture>x86
<binary-format>pe <threading>multi <toolset>clang
    no match: <abi>ms <address-model>32 <architecture>x86
<binary-format>pe <threading>multi <toolset>clang-win
    no match: <abi>ms <address-model>32 <architecture>x86
<binary-format>pe <threading>multi <toolset>gcc
    no match: <abi>ms <address-model>32 <architecture>x86
<binary-format>pe <threading>multi <toolset>intel
    no match: <abi>ms <address-model>32 <architecture>x86
<binary-format>pe <threading>multi <toolset>msvc
    no match: <abi>ms <address-model>32 <architecture>x86
<binary-format>pe <threading>multi <toolset>embarcadero
    no match: <abi>ms <address-model>32 <architecture>x86
<binary-format>pe <threading>multi <toolset>borland
    no match: <abi>sysv <address-model>64 <architecture>x86
<binary-format>elf <threading>multi <toolset>clang
    no match: <abi>sysv <address-model>64 <architecture>x86
<binary-format>elf <threading>multi <toolset>gcc
    no match: <abi>sysv <address-model>64 <architecture>x86
<binary-format>elf <threading>multi <toolset>intel
    no match: <abi>sysv <address-model>64 <architecture>x86
<binary-format>mach-o <threading>multi <toolset>clang
    no match: <abi>sysv <address-model>64 <architecture>x86
<binary-format>mach-o <threading>multi <toolset>gcc
    no match: <abi>sysv <address-model>64 <architecture>x86
<binary-format>mach-o <threading>multi <toolset>darwin
    no match: <abi>sysv <address-model>64 <architecture>x86
<binary-format>mach-o <threading>multi <toolset>intel
    no match: <abi>ms <address-model>64 <architecture>x86
<binary-format>pe <threading>multi <toolset>clang
    no match: <abi>ms <address-model>64 <architecture>x86
<binary-format>pe <threading>multi <toolset>clang-win
    no match: <abi>ms <address-model>64 <architecture>x86
<binary-format>pe <threading>multi <toolset>gcc
    no match: <abi>ms <address-model>64 <architecture>x86
<binary-format>pe <threading>multi <toolset>intel
    no match: <abi>ms <address-model>64 <architecture>x86
<binary-format>pe <threading>multi <toolset>msvc
    no match: <abi>ms <address-model>64 <architecture>x86
<binary-format>pe <threading>multi <toolset>embarcadero
    no match: <abi>x32 <address-model>32 <architecture>x86
<binary-format>elf <threading>multi <toolset>clang
    no match: <abi>x32 <address-model>32 <architecture>x86
<binary-format>elf <threading>multi <toolset>gcc
    no match: <abi>x32 <address-model>32 <architecture>x86
<binary-format>elf <threading>multi <toolset>intel
    no match: <abi>sysv <address-model>32_64 <architecture>x86
<binary-format>mach-o <threading>multi
    no match: <abi>sysv <architecture>combined <binary-format>mach-o
<threading>multi

On Thu, 6 Jul 2023 at 23:10, Marshall Clow <mclow.lists_at_[hidden]> wrote:
>
> On Jul 6, 2023, at 2:02 PM, Ruben Perez <rubenperez038_at_[hidden]> wrote:
> >
> > https://github.com/boostorg/context/commit/d039c8e4da79dbc76481236249e22892bfdde047
>
> I can confirm that with that change applied to the beta release candidate, Boost.Context (and Boost.Fiber) now build successfully on my ARM-based Mac.
>
> — Marshall
>
> >
> > On Thu, 6 Jul 2023 at 22:49, Marshall Clow <mclow.lists_at_[hidden]> wrote:
> >>
> >> On Jul 6, 2023, at 1:19 PM, Ruben Perez <rubenperez038_at_[hidden]> wrote:
> >>
> >>
> >> If I'm not mistaken, there's a bug in Boost.Context that was fixed in develop but not in master that caused similar issues for ARM. It may be related.
> >>
> >>
> >> The failures I am seeing are on ARM.
> >>
> >> — Marshall
> >>
> >>
> >>
> >> Ruben.
> >>
> >> On Thu, 6 Jul 2023, 16:45 Marshall Clow via Boost, <boost_at_[hidden]> wrote:
> >>>
> >>> On Jul 6, 2023, at 7:08 AM, Marshall Clow <mclow.lists_at_[hidden]> wrote:
> >>>>
> >>>> Available at: <https://boostorg.jfrog.io/artifactory/main/beta/1.83.0.beta1/source/>
> >>>>
> >>>> The SHA256 checksums are as follows:
> >>>>
> >>>> 69fe7224568acfa5491bfaa04fd522bf7cfca1800aa192de96ce560da714902f boost_1_83_0_b1_rc1.7z
> >>>> 49afc7c20d65949f7b775060bbec403e7e81d207949dd9f412e2d4569ea5d3f7 boost_1_83_0_b1_rc1.zip
> >>>> fe3895ee9ac78cf57328415f1b3bf3da7ea2ccb3ad87bf0d9b720910d99d18ae boost_1_83_0_b1_rc1.tar.bz2
> >>>> fbbe0d439db5b65f194eb61b89b5cda0575387b0b23fbb85900c3c9ef9eb64bf boost_1_83_0_b1_rc1.tar.gz
> >>>>
> >>>> As always, the release managers would appreciate it if you download the
> >>>> candidate of your choice and give building it a try. Please report both
> >>>> success and failure, and anything else that is noteworthy.
> >>>
> >>>
> >>> I have successfully built the boost libraries for C++03/11/14/17/20/2b on Mac OS 13.4.1 with:
> >>>
> >>> $ clang++ -v
> >>> Apple clang version 14.0.3 (clang-1403.0.22.14.1)
> >>> Target: x86_64-apple-darwin22.5.0
> >>>
> >>>
> >>> But on my M1 Mac:
> >>> $ clang++ -v
> >>> Apple clang version 14.0.3 (clang-1403.0.22.14.1)
> >>> Target: arm64-apple-darwin22.5.0
> >>>
> >>> Boost.Coroutine failed to build.
> >>>
> >>> clang-darwin.link.dll bin.v2/libs/coroutine/build/clang-darwin-14/release/cxxstd-03-iso/threading-multi/visibility-hidden/libboost_coroutine.dylib
> >>> Undefined symbols for architecture arm64:
> >>> "_jump_fcontext", referenced from:
> >>> boost::coroutines::detail::coroutine_context::jump(boost::coroutines::detail::coroutine_context&, void*) in coroutine_context.o
> >>> "_make_fcontext", referenced from:
> >>> boost::coroutines::detail::coroutine_context::coroutine_context(void (*)(boost::context::detail::transfer_t), boost::coroutines::detail::preallocated const&) in coroutine_context.o
> >>> boost::coroutines::detail::coroutine_context::coroutine_context(void (*)(boost::context::detail::transfer_t), boost::coroutines::detail::preallocated const&) in coroutine_context.o
> >>> ld: symbol(s) not found for architecture arm64
> >>> clang: error: linker command failed with exit code 1 (use -v to see invocation)
> >>>
> >>> "/usr/bin/clang++" -o "bin.v2/libs/coroutine/build/clang-darwin-14/release/cxxstd-03-iso/threading-multi/visibility-hidden/libboost_coroutine.dylib" -Wl,-install_name -Wl,"@rpath/libboost_coroutine.dylib" -dynamiclib -single_module "bin.v2/libs/coroutine/build/clang-darwin-14/release/cxxstd-03-iso/threading-multi/visibility-hidden/detail/coroutine_context.o" "bin.v2/libs/coroutine/build/clang-darwin-14/release/cxxstd-03-iso/threading-multi/visibility-hidden/exceptions.o" "bin.v2/libs/coroutine/build/clang-darwin-14/release/cxxstd-03-iso/threading-multi/visibility-hidden/posix/stack_traits.o" "bin.v2/libs/context/build/clang-darwin-14/release/cxxstd-03-iso/threading-multi/visibility-hidden/libboost_context.dylib" -fPIC -std=c++03 -fvisibility=hidden -fvisibility-inlines-hidden --target=arm64-apple-darwin
> >>>
> >>> ...failed clang-darwin.link.dll bin.v2/libs/coroutine/build/clang-darwin-14/release/cxxstd-03-iso/threading-multi/visibility-hidden/libboost_coroutine.dylib...
> >>>
> >>> Which caused the build of Boost.Fiber to fail as well (C++11 and later)
> >>>
> >>>
> >>> There’s another error at the start of the build log that may be relevant:
> >>>
> >>> error: No best alternative for libs/context/build/asm_sources with <abi>sysv <address-model>64 <architecture>arm <asynch-exceptions>off <binary-format>mach-o <context-impl>fcontext <coverage>off <cxxstd-dialect>iso <cxxstd>03 <debug-symbols>off <deduced-address-model>64 <deduced-architecture>arm <exception-handling>on <extern-c-nothrow>off <format>html <inlining>full <link>shared <optimization>speed <os>MACOSX <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>off <runtime-link>shared <stdlib>native <strip>off <target-os>darwin <testing.execute>on <threadapi>pthread <threading>multi <toolset-clang:platform>darwin <toolset-clang:version>14 <toolset>clang <variant>release <vectorize>off <visibility>hidden <warnings-as-errors>off <warnings>on
> >>>
> >>> Full logs attached.
> >>>
> >>> — Marshall
> >>>
> >>>
> >>> _______________________________________________
> >>> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
> >>
> >>
>


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk