Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 591982 - sys-libs/libomp: underlinking on musl
Summary: sys-libs/libomp: underlinking on musl
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Bernard Cafarelli
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: musl-porting
  Show dependency tree
 
Reported: 2016-08-24 00:25 UTC by zhanglei.april
Modified: 2018-01-03 17:48 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description zhanglei.april 2016-08-24 00:25:01 UTC
When I use ld.gold to build libomp against musl, I hit a missing symbol error:

$ ldd libomp.so
    ldd (0x55658da31000)
    libc.so => ldd (0x55658da31000)
Error relocating libomp.so: __kmp_gtid: symbol not found
Error relocating libomp.so: __kmp_gtid: symbol not found

Using ld.bfd is fine; and I also can't reproduce this with glibc, so this issue probably has something to do with musl.
Comment 1 Felix Janda 2016-08-24 06:34:58 UTC
Can reproduce on arm with different compilers (and musl).

Might be related to the fact that musl does not support symbol
versioning. What does glibc ldd say about the libomp.so produced from
the musl system?
Comment 2 zhanglei.april 2016-08-24 07:12:50 UTC
(In reply to Felix Janda from comment #1)
> Can reproduce on arm with different compilers (and musl).
> 
> Might be related to the fact that musl does not support symbol
> versioning. What does glibc ldd say about the libomp.so produced from
> the musl system?
error while loading shared libraries: /usr/lib64/libc.so: invalid ELF header
Comment 3 Felix Janda 2016-08-24 08:42:20 UTC
Ok, I've tested myself right now. After replacing the /usr/lib/libc.so
ldscript, the glibc ldd no longer complains about anything. So this bug
is likely a problem with musl's dynamic linker, possibly related to its
lack of support for symbol versioning.
Comment 4 tt_1 2018-01-03 17:48:30 UTC
Was this fixed in recent libomp-5.0.1?