Skip to content

Commit

Permalink
Merge #206327: julia_18: use more bundle libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
vcunat committed Dec 17, 2022
2 parents 52bb86f + 0fdda53 commit 2e80260
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 39 deletions.
44 changes: 13 additions & 31 deletions pkgs/development/compilers/julia/1.8.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,13 @@
, libwhich
, libxml2
, libunwind
, libgit2
, curl
, nghttp2
, mbedtls_2
, libssh2
, gmp
, mpfr
, suitesparse
, utf8proc
, zlib
, p7zip
, ncurses
, pcre2
}:

stdenv.mkDerivation rec {
Expand All @@ -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=";
Expand Down Expand Up @@ -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 ]);
Expand All @@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>
Date: Tue, 20 Sep 2022 18:42:08 +0800
Subject: [PATCH 1/4] skip symlink system libraries
Expand Down
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>
Date: Tue, 20 Sep 2022 18:42:31 +0800
Subject: [PATCH 2/4] skip building doc
Expand All @@ -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


Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
From ed596b33005a438109f0078ed0ba30ebe464b4b5 Mon Sep 17 00:00:00 2001
From: Nick Cao <[email protected]>
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

Original file line number Diff line number Diff line change
@@ -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 <[email protected]>
Date: Tue, 20 Sep 2022 18:42:59 +0800
Subject: [PATCH 3/4] skip failing tests
Expand All @@ -8,15 +8,15 @@ 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:

$(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) && \
Expand Down
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>
Date: Tue, 20 Sep 2022 18:43:15 +0800
Subject: [PATCH 4/4] ignore absolute path when loading library
Expand Down

0 comments on commit 2e80260

Please sign in to comment.