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
openjdk: Clean up platform conditionals #35450
Conversation
done | ||
|
||
find $out -name \*.so\* | while read lib; do | ||
patchelf --set-interpreter ${glibc.out}/lib/ld-linux*.so.2 $lib || true | ||
patchelf --set-rpath "${glibc.out}/lib:${stdenv.cc.cc.lib}/lib:$LIBDIRS" $lib || true | ||
patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux*.so.2 $lib || true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure whether glibc
can be dropped like that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are nss modules in glibc, but musl don't support those anyway.
On at least NixOS we also use nscd, which is apparently also supported by musl.
I have not seen any port of jdk, that uses anything but glibc though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While we are touching this wouldn't it make sense to use $NIX_CC/nix-support/dynamic-linker
instead of ld-linux*.so.2
?
In my yet not working WIP for aarch64 for openjdk I had to do that. Due to time constraints that work might not continue soon on my end thought..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the info you two!
Yeah my thoughts are even if it doesn't work, its better to require stdenv.cc.libc
to be glibc
(which could be achieved with a one-off override, rather than whole-world stdenv switch) than hack it in like that.
Failure on aarch64-linux (full log) Partial log (click to expand)
|
Failure on x86_64-darwin (full log) Partial log (click to expand)
|
cc @andir |
Failure on x86_64-linux (full log) Partial log (click to expand)
|
0fbd599
to
47d074b
Compare
Failure on aarch64-linux (full log) Partial log (click to expand)
|
Success on x86_64-darwin (full log) Partial log (click to expand)
|
Failure on x86_64-linux (full log) Partial log (click to expand)
|
47d074b
to
933e866
Compare
Failure on aarch64-linux (full log) Partial log (click to expand)
|
Failure on x86_64-darwin (full log) Partial log (click to expand)
|
Failure on x86_64-linux (full log) Partial log (click to expand)
|
Built manually. |
Motivation for this change
Better style, more robust with an eye towards cross compilation / portability.
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)