summary refs log tree commit diff
diff options
context:
space:
mode:
authortaku0 <mxxouy6x3m_github@tatapa.org>2021-02-27 19:20:23 +0900
committertaku0 <mxxouy6x3m_github@tatapa.org>2021-02-27 19:23:55 +0900
commit5ea6b9082242eb804def178aaf8408ac4ff6bcb3 (patch)
tree1a6255b600828d8520295d8bdd67ca2f22f09b41
parenta5b4bb1d86ff50f0e8f93ffaea0149a05adb1dd1 (diff)
downloadnixpkgs-5ea6b9082242eb804def178aaf8408ac4ff6bcb3.tar
nixpkgs-5ea6b9082242eb804def178aaf8408ac4ff6bcb3.tar.gz
nixpkgs-5ea6b9082242eb804def178aaf8408ac4ff6bcb3.tar.bz2
nixpkgs-5ea6b9082242eb804def178aaf8408ac4ff6bcb3.tar.lz
nixpkgs-5ea6b9082242eb804def178aaf8408ac4ff6bcb3.tar.xz
nixpkgs-5ea6b9082242eb804def178aaf8408ac4ff6bcb3.tar.zst
nixpkgs-5ea6b9082242eb804def178aaf8408ac4ff6bcb3.zip
adoptopenjdk-bin, zulu, graalvm11-ce: do not wrap jspawnhelper
Fix #114495.

Note that OpenJDK 8 does not have jspawnhelper.
-rw-r--r--pkgs/development/compilers/adoptopenjdk-bin/jdk-linux-base.nix5
-rw-r--r--pkgs/development/compilers/graalvm/community-edition.nix5
-rw-r--r--pkgs/development/compilers/zulu/default.nix5
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
   '';