From 6ab299b3a36c656065d92cab3385a29e43404879 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sun, 12 Mar 2023 11:24:11 +0000 Subject: [PATCH 1/4] openjdk: port to gnumake-4.4.1 Revert 41a6b03b89552c "revert back to gnumake-4.4 as gnumake-4.4.1 breaks the build" and aply the fix from https://github.com/openjdk/jdk/pull/12992 --- pkgs/development/compilers/openjdk/19.nix | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/pkgs/development/compilers/openjdk/19.nix b/pkgs/development/compilers/openjdk/19.nix index 1ac3796cf9bb..903155cfcc58 100644 --- a/pkgs/development/compilers/openjdk/19.nix +++ b/pkgs/development/compilers/openjdk/19.nix @@ -9,9 +9,6 @@ , headless ? stdenv.targetPlatform.isGhcjs , enableJavaFX ? false, openjfx , enableGnome2 ? true, gtk3, gnome_vfs, glib, GConf -# Hold back make-4.4 as 4.4.1 breaks the build: -# https://github.com/NixOS/nixpkgs/issues/219513 -, gnumake44 }: let @@ -32,7 +29,7 @@ let hash = "sha256-pBEHmBtIgG4Czou4C/zpBBYZEDImvXiLoA5CjOzpeyI="; }; - nativeBuildInputs = [ gnumake44 pkg-config autoconf unzip ensureNewerSourcesForZipFilesHook ]; + nativeBuildInputs = [ pkg-config autoconf unzip ensureNewerSourcesForZipFilesHook ]; buildInputs = [ cpio file which zip perl zlib cups freetype alsa-lib libjpeg giflib libpng zlib lcms2 libX11 libICE libXrender libXext libXtst libXt libXtst @@ -63,6 +60,14 @@ let url = "https://git.alpinelinux.org/aports/plain/testing/openjdk19/FixNullPtrCast.patch?id=93dc07f97ff716b647c5f57c6224901ea06da560"; hash = "sha256-H4X3Yip5bCpXMH7MSu9BgXIOYRVUBMZPZW8EvZSWI5k="; }) + + # Fix build for gnumake-4.4.1: + # https://github.com/openjdk/jdk/pull/12992 + (fetchpatch { + name = "gnumake-4.4.1"; + url = "https://github.com/openjdk/jdk/commit/9341d135b855cc208d48e47d30cd90aafa354c36.patch"; + hash = "sha256-Qcm3ZmGCOYLZcskNjj7DYR85R4v07vYvvavrVOYL8vg="; + }) ] ++ lib.optionals (!headless && enableGnome2) [ ./swing-use-gtk-jdk13.patch ]; From 544ef3138a7f383a260f421eb7999dd917a0c414 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sun, 12 Mar 2023 12:05:46 +0000 Subject: [PATCH 2/4] openjdk: port to gnumake-4.4.1 Revert e6d4aecb97 "revert back to gnumake-4.4 as gnumake-4.4.1 breaks the build" and aply the fix from https://github.com/openjdk/jdk/pull/12992 --- pkgs/development/compilers/openjdk/17.nix | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/pkgs/development/compilers/openjdk/17.nix b/pkgs/development/compilers/openjdk/17.nix index c085d669971a..2eac6e33116a 100644 --- a/pkgs/development/compilers/openjdk/17.nix +++ b/pkgs/development/compilers/openjdk/17.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, fetchurl, fetchFromGitHub, bash, pkg-config, autoconf, cpio +{ stdenv, lib, fetchurl, fetchpatch, fetchFromGitHub, bash, pkg-config, autoconf, cpio , file, which, unzip, zip, perl, cups, freetype, harfbuzz, alsa-lib, libjpeg, giflib , libpng, zlib, lcms2, libX11, libICE, libXrender, libXext, libXt, libXtst , libXi, libXinerama, libXcursor, libXrandr, fontconfig, openjdk17-bootstrap @@ -6,9 +6,6 @@ , headless ? false , enableJavaFX ? false, openjfx , enableGnome2 ? true, gtk3, gnome_vfs, glib, GConf -# Hold back make-4.4 as 4.4.1 breaks the build: -# https://github.com/NixOS/nixpkgs/issues/219513 -, gnumake44 }: let @@ -29,7 +26,7 @@ let sha256 = "sha256-zPpINi++3Ct0PCwlwlfhceh/ploMkclw+MgeI9dULdc="; }; - nativeBuildInputs = [ gnumake44 pkg-config autoconf unzip ]; + nativeBuildInputs = [ pkg-config autoconf unzip ]; buildInputs = [ cpio file which zip perl zlib cups freetype harfbuzz alsa-lib libjpeg giflib libpng zlib lcms2 libX11 libICE libXrender libXext libXtst libXt libXtst @@ -61,6 +58,14 @@ let url = "https://git.alpinelinux.org/aports/plain/community/openjdk17/FixNullPtrCast.patch?id=41e78a067953e0b13d062d632bae6c4f8028d91c"; sha256 = "sha256-LzmSew51+DyqqGyyMw2fbXeBluCiCYsS1nCjt9hX6zo="; }) + + # Fix build for gnumake-4.4.1: + # https://github.com/openjdk/jdk/pull/12992 + (fetchpatch { + name = "gnumake-4.4.1"; + url = "https://github.com/openjdk/jdk/commit/9341d135b855cc208d48e47d30cd90aafa354c36.patch"; + hash = "sha256-Qcm3ZmGCOYLZcskNjj7DYR85R4v07vYvvavrVOYL8vg="; + }) ] ++ lib.optionals (!headless && enableGnome2) [ ./swing-use-gtk-jdk13.patch ]; From 7b53fc52419ec55419853c324cfad7d1dfac79ec Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sun, 12 Mar 2023 12:06:40 +0000 Subject: [PATCH 3/4] openjdk11: port to gnumake-4.4.1 Revert e6d4aecb97 "revert back to gnumake-4.4 as gnumake-4.4.1 breaks the build" and aply the fix from https://github.com/openjdk/jdk/pull/12992 --- pkgs/development/compilers/openjdk/11.nix | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/pkgs/development/compilers/openjdk/11.nix b/pkgs/development/compilers/openjdk/11.nix index 75e2d9c17148..808b0ef2e12e 100644 --- a/pkgs/development/compilers/openjdk/11.nix +++ b/pkgs/development/compilers/openjdk/11.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, fetchFromGitHub, bash, pkg-config, autoconf, cpio, file, which, unzip +{ stdenv, lib, fetchpatch, fetchFromGitHub, bash, pkg-config, autoconf, cpio, file, which, unzip , zip, perl, cups, freetype, harfbuzz, alsa-lib, libjpeg, giflib, libpng, zlib, lcms2 , libX11, libICE, libXrender, libXext, libXt, libXtst, libXi, libXinerama , libXcursor, libXrandr, fontconfig, openjdk11-bootstrap @@ -6,9 +6,6 @@ , headless ? false , enableJavaFX ? false, openjfx , enableGnome2 ? true, gtk3, gnome_vfs, glib, GConf -# Hold back make-4.4 as 4.4.1 breaks the build: -# https://github.com/NixOS/nixpkgs/issues/219513 -, gnumake44 }: let @@ -28,7 +25,7 @@ let sha256 = "sha256-QGOpMIrWwOtIcUY/CLbTRDvcVTG2xioZu46v+n+IIQ4="; }; - nativeBuildInputs = [ gnumake44 pkg-config autoconf unzip ]; + nativeBuildInputs = [ pkg-config autoconf unzip ]; buildInputs = [ cpio file which zip perl zlib cups freetype harfbuzz alsa-lib libjpeg giflib libpng zlib lcms2 libX11 libICE libXrender libXext libXtst libXt libXtst @@ -43,6 +40,14 @@ let ./currency-date-range-jdk10.patch ./increase-javadoc-heap.patch ./fix-library-path-jdk11.patch + + # Fix build for gnumake-4.4.1: + # https://github.com/openjdk/jdk/pull/12992 + (fetchpatch { + name = "gnumake-4.4.1"; + url = "https://github.com/openjdk/jdk/commit/9341d135b855cc208d48e47d30cd90aafa354c36.patch"; + hash = "sha256-Qcm3ZmGCOYLZcskNjj7DYR85R4v07vYvvavrVOYL8vg="; + }) ] ++ lib.optionals (!headless && enableGnome2) [ ./swing-use-gtk-jdk10.patch ]; From bec778740ca0ccbc57ab7ac171a6423f563f7217 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sun, 12 Mar 2023 12:08:45 +0000 Subject: [PATCH 4/4] gnumake44: revert "reintrocude older 4.4 version for openjdk" This reverts commit d78148fb3944aca23adc5e72c782384ce9208f15. openjdk{11,17,19} were ported to latest gnumake-4.4.1. --- .../gnumake/4.4/0001-No-impure-bin-sh.patch | 35 --------- .../gnumake/4.4/0002-remove-impure-dirs.patch | 40 ---------- .../build-managers/gnumake/4.4/default.nix | 75 ------------------- pkgs/top-level/all-packages.nix | 2 - 4 files changed, 152 deletions(-) delete mode 100644 pkgs/development/tools/build-managers/gnumake/4.4/0001-No-impure-bin-sh.patch delete mode 100644 pkgs/development/tools/build-managers/gnumake/4.4/0002-remove-impure-dirs.patch delete mode 100644 pkgs/development/tools/build-managers/gnumake/4.4/default.nix diff --git a/pkgs/development/tools/build-managers/gnumake/4.4/0001-No-impure-bin-sh.patch b/pkgs/development/tools/build-managers/gnumake/4.4/0001-No-impure-bin-sh.patch deleted file mode 100644 index 58ee2d6fe09b..000000000000 --- a/pkgs/development/tools/build-managers/gnumake/4.4/0001-No-impure-bin-sh.patch +++ /dev/null @@ -1,35 +0,0 @@ -From e00a5257a6ca5fedbf68b09eee7df3502971a057 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= -Date: Sat, 24 Apr 2021 10:11:40 +0200 -Subject: [PATCH 1/2] No impure bin sh - -default_shell is used to populuate default shell used to execute jobs. -Unless SHELL is set to a different value this would be /bin/sh. -Our stdenv provides sh in form of bash anyway. Having this value not -hard-coded has some advantages: - -- It would ensure that on all systems it uses sh from its PATH rather - than /bin/sh, which helps as different systems might have different - shells there (bash vs. dash) -- In the past I had issues with LD_PRELOAD with BEAR, where /bin/sh - used a different glibc than BEAR which came from my development shell. ---- - src/job.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/job.c b/src/job.c -index ae1f18b..6b4ddb3 100644 ---- a/src/job.c -+++ b/src/job.c -@@ -77,7 +77,7 @@ char * vms_strsignal (int status); - - #else - --const char *default_shell = "/bin/sh"; -+const char *default_shell = "sh"; - int batch_mode_shell = 0; - - #endif --- -2.31.1 - diff --git a/pkgs/development/tools/build-managers/gnumake/4.4/0002-remove-impure-dirs.patch b/pkgs/development/tools/build-managers/gnumake/4.4/0002-remove-impure-dirs.patch deleted file mode 100644 index e62aee7d9993..000000000000 --- a/pkgs/development/tools/build-managers/gnumake/4.4/0002-remove-impure-dirs.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 795d63d3c8b5c0dbb7e544954f75507b371b7228 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= -Date: Sat, 24 Apr 2021 10:20:16 +0200 -Subject: [PATCH 2/2] remove impure dirs - ---- - src/read.c | 3 --- - src/remake.c | 2 -- - 2 files changed, 5 deletions(-) - -diff --git a/src/read.c b/src/read.c -index fa197fb..defacfb 100644 ---- a/src/read.c -+++ b/src/read.c -@@ -109,9 +109,6 @@ static const char *default_include_directories[] = - #endif - INCLUDEDIR, - #ifndef _AMIGA -- "/usr/gnu/include", -- "/usr/local/include", -- "/usr/include", - #endif - 0 - }; -diff --git a/src/remake.c b/src/remake.c -index fb237c5..94bff7d 100644 ---- a/src/remake.c -+++ b/src/remake.c -@@ -1601,8 +1601,6 @@ library_search (const char *lib, FILE_TIMESTAMP *mtime_ptr) - static const char *dirs[] = - { - #ifndef _AMIGA -- "/lib", -- "/usr/lib", - #endif - #if defined(WINDOWS32) && !defined(LIBDIR) - /* --- -2.31.1 - diff --git a/pkgs/development/tools/build-managers/gnumake/4.4/default.nix b/pkgs/development/tools/build-managers/gnumake/4.4/default.nix deleted file mode 100644 index 3057a0a4d40b..000000000000 --- a/pkgs/development/tools/build-managers/gnumake/4.4/default.nix +++ /dev/null @@ -1,75 +0,0 @@ -{ lib -, stdenv -, fetchurl -, guileSupport ? false, guile -# avoid guile depend on bootstrap to prevent dependency cycles -, inBootstrap ? false -, pkg-config -, gnumake -}: - -let - guileEnabled = guileSupport && !inBootstrap; -in - -stdenv.mkDerivation rec { - pname = "gnumake"; - version = "4.4"; - - src = fetchurl { - url = "mirror://gnu/make/make-${version}.tar.gz"; - hash = "sha256-WB9NToctp0s5Qch0IViYp9NYAvA3Mr3M7h1KeXkQXRg="; - }; - - # to update apply these patches with `git am *.patch` to https://git.savannah.gnu.org/git/make.git - patches = [ - # Replaces /bin/sh with sh, see patch file for reasoning - ./0001-No-impure-bin-sh.patch - # Purity: don't look for library dependencies (of the form `-lfoo') in /lib - # and /usr/lib. It's a stupid feature anyway. Likewise, when searching for - # included Makefiles, don't look in /usr/include and friends. - ./0002-remove-impure-dirs.patch - ]; - - nativeBuildInputs = lib.optionals guileEnabled [ pkg-config ]; - buildInputs = lib.optionals guileEnabled [ guile ]; - - configureFlags = lib.optional guileEnabled "--with-guile" - - # Make uses this test to decide whether it should keep track of - # subseconds. Apple made this possible with APFS and macOS 10.13. - # However, we still support macOS 10.11 and 10.12. Binaries built - # in Nixpkgs will be unable to use futimens to set mtime less than - # a second. So, tell Make to ignore nanoseconds in mtime here by - # overriding the autoconf test for the struct. - # See https://github.com/NixOS/nixpkgs/issues/51221 for discussion. - ++ lib.optional stdenv.isDarwin "ac_cv_struct_st_mtim_nsec=no"; - - outputs = [ "out" "man" "info" ]; - separateDebugInfo = true; - - passthru.tests = { - # make sure that the override doesn't break bootstrapping - gnumakeWithGuile = gnumake.override { guileSupport = true; }; - }; - - meta = with lib; { - description = "A tool to control the generation of non-source files from sources"; - longDescription = '' - Make is a tool which controls the generation of executables and - other non-source files of a program from the program's source files. - - Make gets its knowledge of how to build your program from a file - called the makefile, which lists each of the non-source files and - how to compute it from other files. When you write a program, you - should write a makefile for it, so that it is possible to use Make - to build and install the program. - ''; - homepage = "https://www.gnu.org/software/make/"; - - license = licenses.gpl3Plus; - maintainers = [ maintainers.vrthra ]; - mainProgram = "make"; - platforms = platforms.all; - }; -} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a66fd786ca95..4c986690beba 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -18068,8 +18068,6 @@ with pkgs; gnumake = callPackage ../development/tools/build-managers/gnumake { }; gnumake42 = callPackage ../development/tools/build-managers/gnumake/4.2 { }; - # openjdk-17 fails on 4.4.1. Provide 4.4 until we fix it. - gnumake44 = callPackage ../development/tools/build-managers/gnumake/4.4 { }; go-licenses = callPackage ../development/tools/misc/go-licenses { };