Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 921109

Summary: dev-java/openjdk-17.0.8.1_p1: fails to compile with musl+Clang
Product: Gentoo Linux Reporter: tigrmango
Component: Current packagesAssignee: Java team <java>
Status: UNCONFIRMED ---    
Severity: normal CC: java, jstein, leohdz172, tigrmango
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge --info
Build log

Description tigrmango 2023-12-31 05:07:34 UTC
The package fails to compile because of relocations, i.e.

ld.lld: error: relocation R_X86_64_PC32 cannot be used against symbol '__cxa_unexpected_handler'; recompile with -fPIC
>>> defined in /usr/lib/libc++abi.a(cxa_default_handlers.cpp.o)
>>> referenced by cxa_default_handlers.cpp.o:(std::set_unexpected(void (*)())) in archive /usr/lib/libc++abi.a

Happy to test and provide information for whatever is needed

Reproducible: Always

Steps to Reproduce:
1. Have a musl+Clang system
2. Try to compile openjdk
3. Wait
Actual Results:  
Build failure

Expected Results:  
Compiled and installed succesfully

I tried to compile it myself after -bin version failed to run a program that I needed

Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.UnsatisfiedLinkError: /opt/openjdk-bin-17.0.8.1_p1/lib/libawt_xawt.so: Error relocating /opt/openjdk-bin-17.0.8.1_p1/lib/libawt_xawt.so: __strdup: symbol not found [in thread "main"]

Again, happy to test and provide any information
Comment 1 tigrmango 2023-12-31 08:40:10 UTC
Recompiled with GCC and there were no errors, should this be added to the Clang tracker perhaps?
Comment 2 Leonardo Hernández Hernández 2023-12-31 21:42:11 UTC
Please always attach the full build.log (compressed if necessary) and emerge --info.
Comment 3 tigrmango 2024-01-01 13:49:48 UTC
Created attachment 881199 [details]
emerge --info
Comment 4 tigrmango 2024-01-01 13:57:19 UTC
Created attachment 881201 [details]
Build log