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.
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?
(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
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.
Was this fixed in recent libomp-5.0.1?
15.0.0 is fine at least.