boostorg / boostorg/boost

Windows on ARM64 (aarch64-w64-mingw32) winfib build using MinGW-w64 fails (undefined jump_fcontext)

Open
#983 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
HTML
Stars
8.6k
Forks
1.9k
Avg merge
39m
Merged PRs (30d)
2

Description

When trying to build a aarch64-w64-mingw32 build (native on Windows on ARM using this [LLVM/CLang](https://github.com/mstorsjo/llvm-mingw)) with `-DBOOST_CONTEXT_IMPLEMENTATION:STRING=winfib` there the following error occcurs:
```raw
undefined symbol: __declspec(dllimport) jump_fcontext
```
This only happens with a shared build. A static build works fine (`-DBUILD_SHARED_LIBS:BOOL=OFF -DBOOST_RUNTIME_LINK:STRING=static`).

Full error output:
```raw
ld.lld: error: undefined symbol: __declspec(dllimport) make_fcontext
>>> referenced by libs/coroutine/CMakeFiles/boost_coroutine.dir/src/detail/coroutine_context.cpp.obj:(boost::coroutines::detail::coroutine_context::coroutine_context(void (*)(boost::context::detail::transfer_t), boost::coroutines::detail::preallocated const&))
>>> referenced by libs/coroutine/CMakeFiles/boost_coroutine.dir/src/detail/coroutine_context.cpp.obj:(boost::coroutines::detail::coroutine_context::coroutine_context(void (*)(boost::context::detail::transfer_t), boost::coroutines::detail::preallocated const&))

ld.lld: error: undefined symbol: __declspec(dllimport) jump_fcontext
>>> referenced by libs/coroutine/CMakeFiles/boost_coroutine.dir/src/detail/coroutine_context.cpp.obj:(boost::coroutines::detail::coroutine_context::jump(boost::coroutines::detail::coroutine_context&, void*))
>>> referenced by libs/coroutine/CMakeFiles/boost_coroutine.dir/src/detail/coroutine_context.cpp.obj:(boost::coroutines::detail::coroutine_context::jump(boost::coroutines::detail::coroutine_context&, void*))
clang-19: error: linker command failed with exit code 1 (use -v to see invocation)
[79/435] Building CXX object libs/serialization/CMakeFiles/boost_serialization.dir/src/xml_grammar.cpp.obj
ninja: build stopped: subcommand failed.
```

As mentioned in #982 builds with `-DBOOST_CONTEXT_IMPLEMENTATION:STRING=fcontext` also fail, so I don't seem to have a proper MinGW-w64 build of Boost for Windows on ARM64 (`aarch64-w64-mingw32`).

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.