New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linker error with `context-impl=ucontext`: multiple definition of `boost::context::detail::current_rec` #78

jspam opened this Issue Apr 10, 2018 · 3 comments


None yet
2 participants

jspam commented Apr 10, 2018

When building with context-impl=ucontext define=BOOST_USE_UCONTEXT on branch develop (commit 7900c86) I get the following linker error:

bin.v2/libs/context/build/gcc-7.3.0/release/context-impl-ucontext/threading-multi/fiber.o:(.tbss+0x18): multiple definition of `boost::context::detail::current_rec'
bin.v2/libs/context/build/gcc-7.3.0/release/context-impl-ucontext/threading-multi/continuation.o:(.tbss+0x18): first defined here
collect2: error: ld returned 1 exit status

    "g++"    -o "bin.v2/libs/context/build/gcc-7.3.0/release/context-impl-ucontext/threading-multi/" -Wl,-h -Wl, -shared -Wl,--start-group "bin.v2/libs/context/build/gcc-7.3.0/release/context-impl-ucontext/threading-multi/continuation.o" "bin.v2/libs/context/build/gcc-7.3.0/release/context-impl-ucontext/threading-multi/fiber.o" "bin.v2/libs/context/build/gcc-7.3.0/release/context-impl-ucontext/threading-multi/execution_context.o" "bin.v2/libs/context/build/gcc-7.3.0/release/context-impl-ucontext/threading-multi/posix/stack_traits.o"  -Wl,-Bstatic  -Wl,-Bdynamic -lrt -Wl,--end-group -fPIC -m64 -pthread 

The multiple definitions are here:

fiber.cpp:24: thread_local fiber_activation_record * current_rec;
continuation.cpp:26: thread_local activation_record * current_rec;

olk added a commit that referenced this issue Apr 11, 2018

rename thread-local for fiber
- in context of #78

This comment has been minimized.


olk commented Apr 11, 2018


@olk olk closed this Apr 11, 2018


This comment has been minimized.


olk commented Apr 11, 2018

could you verify the fix, please?


This comment has been minimized.

jspam commented Apr 11, 2018

It works, thank you for the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment