From 5ea6b9082242eb804def178aaf8408ac4ff6bcb3 Mon Sep 17 00:00:00 2001 From: taku0 Date: Sat, 27 Feb 2021 19:20:23 +0900 Subject: adoptopenjdk-bin, zulu, graalvm11-ce: do not wrap jspawnhelper Fix #114495. Note that OpenJDK 8 does not have jspawnhelper. --- pkgs/development/compilers/adoptopenjdk-bin/jdk-linux-base.nix | 5 ++++- pkgs/development/compilers/graalvm/community-edition.nix | 5 ++++- pkgs/development/compilers/zulu/default.nix | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/pkgs/development/compilers/adoptopenjdk-bin/jdk-linux-base.nix b/pkgs/development/compilers/adoptopenjdk-bin/jdk-linux-base.nix index 1c5fd67f2d9..ed8935b0042 100644 --- a/pkgs/development/compilers/adoptopenjdk-bin/jdk-linux-base.nix +++ b/pkgs/development/compilers/adoptopenjdk-bin/jdk-linux-base.nix @@ -82,7 +82,10 @@ let result = stdenv.mkDerivation rec { EOF # We cannot use -exec since wrapProgram is a function but not a command. - for bin in $( find "$out" -executable -type f ); do + # + # jspawnhelper is executed from JVM, so it doesn't need to wrap it, and it + # breaks building OpenJDK (#114495). + for bin in $( find "$out" -executable -type f -not -name jspawnhelper ); do if patchelf --print-interpreter "$bin" &> /dev/null; then wrapProgram "$bin" --prefix LD_LIBRARY_PATH : "${runtimeLibraryPath}" fi diff --git a/pkgs/development/compilers/graalvm/community-edition.nix b/pkgs/development/compilers/graalvm/community-edition.nix index ea18be56250..3a8fca2c1a0 100644 --- a/pkgs/development/compilers/graalvm/community-edition.nix +++ b/pkgs/development/compilers/graalvm/community-edition.nix @@ -189,7 +189,10 @@ let preFixup = '' # We cannot use -exec since wrapProgram is a function but not a # command. - for bin in $( find "$out" -executable -type f -not -path '*/languages/ruby/lib/gems/*' ); do + # + # jspawnhelper is executed from JVM, so it doesn't need to wrap it, + # and it breaks building OpenJDK (#114495). + for bin in $( find "$out" -executable -type f -not -path '*/languages/ruby/lib/gems/*' -not -name jspawnhelper ); do if patchelf --print-interpreter "$bin" &> /dev/null || head -n 1 "$bin" | grep '^#!' -q; then wrapProgram "$bin" \ --prefix LD_LIBRARY_PATH : "${runtimeLibraryPath}" diff --git a/pkgs/development/compilers/zulu/default.nix b/pkgs/development/compilers/zulu/default.nix index 000530e66a7..c7b01877ad5 100644 --- a/pkgs/development/compilers/zulu/default.nix +++ b/pkgs/development/compilers/zulu/default.nix @@ -81,7 +81,10 @@ in stdenv.mkDerivation { EOF '' + lib.optionalString stdenv.isLinux '' # We cannot use -exec since wrapProgram is a function but not a command. - for bin in $( find "$out" -executable -type f ); do + # + # jspawnhelper is executed from JVM, so it doesn't need to wrap it, and it + # breaks building OpenJDK (#114495). + for bin in $( find "$out" -executable -type f -not -name jspawnhelper ); do wrapProgram "$bin" --prefix LD_LIBRARY_PATH : "${runtimeLibraryPath}" done ''; -- cgit 1.4.1