about summary refs log tree commit diff
path: root/pkgs/development/compilers
diff options
context:
space:
mode:
authorVladimír Čunát <v@cunat.cz>2022-12-17 09:07:41 +0100
committerVladimír Čunát <v@cunat.cz>2022-12-17 10:11:10 +0100
commit2e8026080e4872c3f75def57f12eb3302e9abab5 (patch)
treed5ba4cf6ba2f24c4018e61be93715d8e329df7f5 /pkgs/development/compilers
parent52bb86fa2fede82d9d46ac2b51ab09a4b399a770 (diff)
parent0fdda5326fc72e25aa69a706ea73db2574c3cfd9 (diff)
Merge #206327: julia_18: use more bundle libraries
Diffstat (limited to 'pkgs/development/compilers')
-rw-r--r--pkgs/development/compilers/julia/1.8.nix44
-rw-r--r--pkgs/development/compilers/julia/patches/1.8/0001-skip-symlink-system-libraries.patch2
-rw-r--r--pkgs/development/compilers/julia/patches/1.8/0002-skip-building-doc.patch6
-rw-r--r--pkgs/development/compilers/julia/patches/1.8/0003-skip-failing-and-flaky-tests.patch25
-rw-r--r--pkgs/development/compilers/julia/patches/1.8/0003-skip-failing-tests.patch6
-rw-r--r--pkgs/development/compilers/julia/patches/1.8/0004-ignore-absolute-path-when-loading-library.patch2
6 files changed, 46 insertions, 39 deletions
diff --git a/pkgs/development/compilers/julia/1.8.nix b/pkgs/development/compilers/julia/1.8.nix
index f975b39773d54..708e04971cbe5 100644
--- a/pkgs/development/compilers/julia/1.8.nix
+++ b/pkgs/development/compilers/julia/1.8.nix
@@ -12,19 +12,13 @@
 , libwhich
 , libxml2
 , libunwind
-, libgit2
 , curl
-, nghttp2
-, mbedtls_2
-, libssh2
 , gmp
-, mpfr
 , suitesparse
 , utf8proc
 , zlib
 , p7zip
 , ncurses
-, pcre2
 }:
 
 stdenv.mkDerivation rec {
@@ -41,15 +35,6 @@ stdenv.mkDerivation rec {
       path = name: "https://raw.githubusercontent.com/archlinux/svntogit-community/6fd126d089d44fdc875c363488a7c7435a223cec/trunk/${name}";
     in
     [
-      # Pull upstream fix to fix tests mpfr-4.1.1
-      #   https://github.com/JuliaLang/julia/pull/47659
-      (fetchpatch {
-        name = "mfr-4.1.1.patch";
-        url = "https://github.com/JuliaLang/julia/commit/59965205ccbdffb4e25e1b60f651ca9df79230a4.patch";
-        hash = "sha256-QJ5wxZMhz+or8BqcYv/5fNSTxDAvdSizTYqt7630kcw=";
-        includes = [ "stdlib/MPFR_jll/test/runtests.jl" ];
-      })
-
       (fetchurl {
         url = path "julia-hardcoded-libs.patch";
         sha256 = "sha256-kppSpVA7bRohd0wXDs4Jgct9ocHnpbeiiSz7ElFom1U=";
@@ -77,17 +62,11 @@ stdenv.mkDerivation rec {
   buildInputs = [
     libxml2
     libunwind
-    libgit2
     curl
-    nghttp2
-    mbedtls_2
-    libssh2
     gmp
-    mpfr
     utf8proc
     zlib
     p7zip
-    pcre2
   ];
 
   JULIA_RPATH = lib.makeLibraryPath (buildInputs ++ [ stdenv.cc.cc gfortran.cc ncurses ]);
@@ -106,29 +85,32 @@ stdenv.mkDerivation rec {
     "USE_SYSTEM_CSL=1"
     "USE_SYSTEM_LLVM=0" # a patched version is required
     "USE_SYSTEM_LIBUNWIND=1"
-    "USE_SYSTEM_PCRE=1"
+    "USE_SYSTEM_PCRE=0" # version checks
     "USE_SYSTEM_LIBM=0"
     "USE_SYSTEM_OPENLIBM=0"
     "USE_SYSTEM_DSFMT=0" # not available in nixpkgs
     "USE_SYSTEM_LIBBLASTRAMPOLINE=0" # not available in nixpkgs
     "USE_SYSTEM_BLAS=0" # test failure
     "USE_SYSTEM_LAPACK=0" # test failure
-    "USE_SYSTEM_GMP=1"
-    "USE_SYSTEM_MPFR=1"
+    "USE_SYSTEM_GMP=1" # version checks, but bundled version fails build
+    "USE_SYSTEM_MPFR=0" # version checks
     "USE_SYSTEM_LIBSUITESPARSE=0" # test failure
     "USE_SYSTEM_LIBUV=0" # a patched version is required
     "USE_SYSTEM_UTF8PROC=1"
-    "USE_SYSTEM_MBEDTLS=1"
-    "USE_SYSTEM_LIBSSH2=1"
-    "USE_SYSTEM_NGHTTP2=1"
+    "USE_SYSTEM_MBEDTLS=0" # version checks
+    "USE_SYSTEM_LIBSSH2=0" # version checks
+    "USE_SYSTEM_NGHTTP2=0" # version checks
     "USE_SYSTEM_CURL=1"
-    "USE_SYSTEM_LIBGIT2=1"
+    "USE_SYSTEM_LIBGIT2=0" # version checks
     "USE_SYSTEM_PATCHELF=1"
     "USE_SYSTEM_LIBWHICH=1"
-    "USE_SYSTEM_ZLIB=1"
+    "USE_SYSTEM_ZLIB=1" # version checks, but the system zlib is used anyway
     "USE_SYSTEM_P7ZIP=1"
-
-    "PCRE_INCL_PATH=${pcre2.dev}/include/pcre2.h"
+  ] ++ lib.optionals stdenv.isx86_64 [
+    # https://github.com/JuliaCI/julia-buildbot/blob/master/master/inventory.py
+    "JULIA_CPU_TARGET=generic;sandybridge,-xsaveopt,clone_all;haswell,-rdrnd,base(1)"
+  ] ++ lib.optionals stdenv.isAarch64 [
+    "JULIA_CPU_TERGET=generic;cortex-a57;thunderx2t99;armv8.2-a,crypto,fullfp16,lse,rdm"
   ];
 
   doInstallCheck = true;
diff --git a/pkgs/development/compilers/julia/patches/1.8/0001-skip-symlink-system-libraries.patch b/pkgs/development/compilers/julia/patches/1.8/0001-skip-symlink-system-libraries.patch
index a5519d96a9d26..01c32ae6d8e01 100644
--- a/pkgs/development/compilers/julia/patches/1.8/0001-skip-symlink-system-libraries.patch
+++ b/pkgs/development/compilers/julia/patches/1.8/0001-skip-symlink-system-libraries.patch
@@ -1,4 +1,4 @@
-From 1faa30525c9671ffd3a08901896b521a040d7e5c Mon Sep 17 00:00:00 2001
+From b2a58160fd194858267c433ae551f24840a0b3f4 Mon Sep 17 00:00:00 2001
 From: Nick Cao <nickcao@nichi.co>
 Date: Tue, 20 Sep 2022 18:42:08 +0800
 Subject: [PATCH 1/4] skip symlink system libraries
diff --git a/pkgs/development/compilers/julia/patches/1.8/0002-skip-building-doc.patch b/pkgs/development/compilers/julia/patches/1.8/0002-skip-building-doc.patch
index 64c0821eaba85..642d5613229f0 100644
--- a/pkgs/development/compilers/julia/patches/1.8/0002-skip-building-doc.patch
+++ b/pkgs/development/compilers/julia/patches/1.8/0002-skip-building-doc.patch
@@ -1,4 +1,4 @@
-From 05c008dcabaf94f5623f2f7e267005eef0a8c5fc Mon Sep 17 00:00:00 2001
+From ddf422a97973a1f4d2d4d32272396c7165580702 Mon Sep 17 00:00:00 2001
 From: Nick Cao <nickcao@nichi.co>
 Date: Tue, 20 Sep 2022 18:42:31 +0800
 Subject: [PATCH 2/4] skip building doc
@@ -8,10 +8,10 @@ Subject: [PATCH 2/4] skip building doc
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/Makefile b/Makefile
-index d38311dce..a775d36e1 100644
+index 57b595310..563be74c9 100644
 --- a/Makefile
 +++ b/Makefile
-@@ -227,7 +227,7 @@ define stringreplace
+@@ -229,7 +229,7 @@ define stringreplace
  endef
  
  
diff --git a/pkgs/development/compilers/julia/patches/1.8/0003-skip-failing-and-flaky-tests.patch b/pkgs/development/compilers/julia/patches/1.8/0003-skip-failing-and-flaky-tests.patch
new file mode 100644
index 0000000000000..ad3d78742a6e6
--- /dev/null
+++ b/pkgs/development/compilers/julia/patches/1.8/0003-skip-failing-and-flaky-tests.patch
@@ -0,0 +1,25 @@
+From ed596b33005a438109f0078ed0ba30ebe464b4b5 Mon Sep 17 00:00:00 2001
+From: Nick Cao <nickcao@nichi.co>
+Date: Tue, 20 Sep 2022 18:42:59 +0800
+Subject: [PATCH 3/4] skip failing and flaky tests
+
+---
+ test/Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/test/Makefile b/test/Makefile
+index 24e137a5b..553d9d095 100644
+--- a/test/Makefile
++++ b/test/Makefile
+@@ -23,7 +23,7 @@ default:
+ 
+ $(TESTS):
+ 	@cd $(SRCDIR) && \
+-	$(call PRINT_JULIA, $(call spawn,$(JULIA_EXECUTABLE)) --check-bounds=yes --startup-file=no --depwarn=error ./runtests.jl $@)
++	$(call PRINT_JULIA, $(call spawn,$(JULIA_EXECUTABLE)) --check-bounds=yes --startup-file=no --depwarn=error ./runtests.jl --skip MozillaCACerts_jll --skip NetworkOptions --skip Zlib_jll --skip GMP_jll --skip channels $@)
+ 
+ $(addprefix revise-, $(TESTS)): revise-% :
+ 	@cd $(SRCDIR) && \
+-- 
+2.38.1
+
diff --git a/pkgs/development/compilers/julia/patches/1.8/0003-skip-failing-tests.patch b/pkgs/development/compilers/julia/patches/1.8/0003-skip-failing-tests.patch
index ebf5729a5c0bf..337b1390a636d 100644
--- a/pkgs/development/compilers/julia/patches/1.8/0003-skip-failing-tests.patch
+++ b/pkgs/development/compilers/julia/patches/1.8/0003-skip-failing-tests.patch
@@ -1,4 +1,4 @@
-From 756d4e977f8f224e20effa82c612e5a9cc14d82e Mon Sep 17 00:00:00 2001
+From f91c8c6364eb321dd5e66fa443472fca6bcda7d6 Mon Sep 17 00:00:00 2001
 From: Nick Cao <nickcao@nichi.co>
 Date: Tue, 20 Sep 2022 18:42:59 +0800
 Subject: [PATCH 3/4] skip failing tests
@@ -8,7 +8,7 @@ Subject: [PATCH 3/4] skip failing tests
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/test/Makefile b/test/Makefile
-index 24e137a5b..c17ccea8a 100644
+index 24e137a5b..2b30ab392 100644
 --- a/test/Makefile
 +++ b/test/Makefile
 @@ -23,7 +23,7 @@ default:
@@ -16,7 +16,7 @@ index 24e137a5b..c17ccea8a 100644
  $(TESTS):
  	@cd $(SRCDIR) && \
 -	$(call PRINT_JULIA, $(call spawn,$(JULIA_EXECUTABLE)) --check-bounds=yes --startup-file=no --depwarn=error ./runtests.jl $@)
-+	$(call PRINT_JULIA, $(call spawn,$(JULIA_EXECUTABLE)) --check-bounds=yes --startup-file=no --depwarn=error ./runtests.jl --skip LibGit2_jll --skip MozillaCACerts_jll --skip NetworkOptions --skip nghttp2_jll --skip Zlib_jll --skip MbedTLS_jll $@)
++	$(call PRINT_JULIA, $(call spawn,$(JULIA_EXECUTABLE)) --check-bounds=yes --startup-file=no --depwarn=error ./runtests.jl --skip MozillaCACerts_jll --skip NetworkOptions --skip Zlib_jll --skip GMP_jll $@)
  
  $(addprefix revise-, $(TESTS)): revise-% :
  	@cd $(SRCDIR) && \
diff --git a/pkgs/development/compilers/julia/patches/1.8/0004-ignore-absolute-path-when-loading-library.patch b/pkgs/development/compilers/julia/patches/1.8/0004-ignore-absolute-path-when-loading-library.patch
index 2243565b394eb..b458f7fc29c84 100644
--- a/pkgs/development/compilers/julia/patches/1.8/0004-ignore-absolute-path-when-loading-library.patch
+++ b/pkgs/development/compilers/julia/patches/1.8/0004-ignore-absolute-path-when-loading-library.patch
@@ -1,4 +1,4 @@
-From c0e587f4c50bd7bedfe6e5102e9b47c9704fac9b Mon Sep 17 00:00:00 2001
+From 4bd87f2f3151ad07d311f7d33c2b890977aca93d Mon Sep 17 00:00:00 2001
 From: Nick Cao <nickcao@nichi.co>
 Date: Tue, 20 Sep 2022 18:43:15 +0800
 Subject: [PATCH 4/4] ignore absolute path when loading library