Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 831476 - >=dev-cpp/tbb-2021.5 produces broken libs with missing symbols on musl
Summary: >=dev-cpp/tbb-2021.5 produces broken libs with missing symbols on musl
Status: RESOLVED DUPLICATE of bug 832700
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Science Related Packages
URL: https://github.com/rui314/mold/issues...
Whiteboard:
Keywords:
Depends on:
Blocks: systemwide-mold
  Show dependency tree
 
Reported: 2022-01-19 13:37 UTC by tt_1
Modified: 2022-02-07 04:14 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
output from emerge --info (emerge-info-aarch64-musl,5.62 KB, text/plain)
2022-01-19 13:38 UTC, tt_1
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tt_1 2022-01-19 13:37:43 UTC
I'm having trouble to compile sys-devel/mold on a musl chroot, and seems this will be a problem for all packages that build and link against libtbb.so libs, if this is attempted with a musl based env: 

ldd /usr/lib/libtbb.so.12.5
        ldd (0x7f91aa6000)
        libstdc++.so.6 => /usr/lib/gcc/aarch64-gentoo-linux-musl/10.3.0/libstdc++.so.6 (0x7f9187b000)
        libgcc_s.so.1 => /usr/lib/gcc/aarch64-gentoo-linux-musl/10.3.0/libgcc_s.so.1 (0x7f91857000)
        libc.so => ldd (0x7f91aa6000)
Error relocating /usr/lib/libtbb.so.12.5: swapcontext: symbol not found
Error relocating /usr/lib/libtbb.so.12.5: getcontext: symbol not found
Error relocating /usr/lib/libtbb.so.12.5: makecontext: symbol not found


the symbols are wanted in the headers: 

https://github.com/oneapi-src/oneTBB/blob/master/src/tbb/co_context.h#L324

I've often seen that devs stub this stuff out of the way with glibc specific ifdefs, is that an option here?
Comment 1 tt_1 2022-01-19 13:38:50 UTC
Created attachment 762634 [details]
output from emerge --info
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-01-19 21:20:30 UTC
We need to force linking against libucontext.
Comment 3 tt_1 2022-01-19 21:34:01 UTC
never heard about that lib, but guess what happens when you compile it: 


ldd /usr/lib/libucontext_posix.so.1 
        ldd (0x7fbb773000)
        libc.so => ldd (0x7fbb773000)
Error relocating /usr/lib/libucontext_posix.so.1: libucontext_getcontext: symbol not found
Error relocating /usr/lib/libucontext_posix.so.1: libucontext_swapcontext: symbol not found
Error relocating /usr/lib/libucontext_posix.so.1: libucontext_setcontext: symbol not found
Comment 4 tt_1 2022-01-19 22:00:04 UTC
for some more clues on the problem, read the github issue please.
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-01-20 05:25:13 UTC
Thanks for reporting that.
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-02-07 04:14:14 UTC
I'll call this a dupe of the other one as the other one got tagged with the fix commit.

*** This bug has been marked as a duplicate of bug 832700 ***