summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario Rodas <marsam@users.noreply.github.com>2023-01-08 02:40:19 -0500
committerGitHub <noreply@github.com>2023-01-08 02:40:19 -0500
commit8c54d842d9544361aac5f5b212ba04e4089e8efe (patch)
tree58e5a7de15212f2125b68bd928084397f8eb23f3
parent8cdede807d4690342f798c9eb1542f25e7d09b6b (diff)
parentffc91f430204d36cb0f58bab3affcc1481c77a6f (diff)
Merge pull request #208702 from NickCao/julia-backport
[22.11] julia: backport various fixes and updates
-rw-r--r--pkgs/development/compilers/julia/1.8-bin.nix6
-rw-r--r--pkgs/development/compilers/julia/1.8.nix107
-rw-r--r--pkgs/development/compilers/julia/patches/1.8/0001-skip-building-doc.patch (renamed from pkgs/development/compilers/julia/patches/1.8/0002-skip-building-doc.patch)8
-rw-r--r--pkgs/development/compilers/julia/patches/1.8/0001-skip-symlink-system-libraries.patch32
-rw-r--r--pkgs/development/compilers/julia/patches/1.8/0002-skip-failing-and-flaky-tests.patch (renamed from pkgs/development/compilers/julia/patches/1.8/0003-skip-failing-tests.patch)8
-rw-r--r--pkgs/development/compilers/julia/patches/1.8/0004-ignore-absolute-path-when-loading-library.patch27
6 files changed, 33 insertions, 155 deletions
diff --git a/pkgs/development/compilers/julia/1.8-bin.nix b/pkgs/development/compilers/julia/1.8-bin.nix
index 325ed73e2d58..b72cb8f18743 100644
--- a/pkgs/development/compilers/julia/1.8-bin.nix
+++ b/pkgs/development/compilers/julia/1.8-bin.nix
@@ -2,16 +2,16 @@
stdenv.mkDerivation rec {
pname = "julia-bin";
- version = "1.8.3";
+ version = "1.8.4";
src = {
x86_64-linux = fetchurl {
url = "https://julialang-s3.julialang.org/bin/linux/x64/${lib.versions.majorMinor version}/julia-${version}-linux-x86_64.tar.gz";
- sha256 = "sha256-M8Owk1b/qiXTMxw2RrHy1LCZROj5P8uZSVeAG4u/WKk=";
+ sha256 = "sha256-8EJ6TXkQxH3Hwx9lun7Kr+27wOzrOcMgo3+jNZgAT9U=";
};
aarch64-linux = fetchurl {
url = "https://julialang-s3.julialang.org/bin/linux/aarch64/${lib.versions.majorMinor version}/julia-${version}-linux-aarch64.tar.gz";
- sha256 = "sha256-2/+xNKQTtxLUqOHujmZepV7bCGVxmhutmXkSPWQzrMk=";
+ sha256 = "sha256-3EeYwc6HaPo1ly6LFJyjqF/GnhB0tgmnKyz+1cSqcFA=";
};
}.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
diff --git a/pkgs/development/compilers/julia/1.8.nix b/pkgs/development/compilers/julia/1.8.nix
index f8b0daa1ace7..83e87bf4c2f2 100644
--- a/pkgs/development/compilers/julia/1.8.nix
+++ b/pkgs/development/compilers/julia/1.8.nix
@@ -4,55 +4,26 @@
, which
, python3
, gfortran
-, gcc
, cmake
, perl
, gnum4
-, libwhich
, libxml2
-, libunwind
-, libgit2
-, curl
-, nghttp2
-, mbedtls
-, libssh2
-, gmp
-, mpfr
-, suitesparse
-, utf8proc
-, zlib
-, p7zip
-, ncurses
-, pcre2
+, openssl
}:
stdenv.mkDerivation rec {
pname = "julia";
- version = "1.8.3";
+ version = "1.8.4";
src = fetchurl {
url = "https://github.com/JuliaLang/julia/releases/download/v${version}/julia-${version}-full.tar.gz";
- hash = "sha256-UraJWp1K0v422yYe6MTIzJISuDehL5MAL6r1N6IVH1A=";
+ hash = "sha256-HNAyJixcQgSKeBm8zWhOhDu7j2bPn/VsMViB6kMfADM=";
};
- patches =
- let
- path = name: "https://raw.githubusercontent.com/archlinux/svntogit-community/6fd126d089d44fdc875c363488a7c7435a223cec/trunk/${name}";
- in
- [
- (fetchurl {
- url = path "julia-hardcoded-libs.patch";
- sha256 = "sha256-kppSpVA7bRohd0wXDs4Jgct9ocHnpbeiiSz7ElFom1U=";
- })
- (fetchurl {
- url = path "julia-libunwind-1.6.patch";
- sha256 = "sha256-zqMh9+Fjgd15XuINe9Xtpk+bRTwB0T6WCWLrJyOQfiQ=";
- })
- ./patches/1.8/0001-skip-symlink-system-libraries.patch
- ./patches/1.8/0002-skip-building-doc.patch
- ./patches/1.8/0003-skip-failing-tests.patch
- ./patches/1.8/0004-ignore-absolute-path-when-loading-library.patch
- ];
+ patches = [
+ ./patches/1.8/0001-skip-building-doc.patch
+ ./patches/1.8/0002-skip-failing-and-flaky-tests.patch
+ ];
nativeBuildInputs = [
which
@@ -61,66 +32,38 @@ stdenv.mkDerivation rec {
cmake
perl
gnum4
- libwhich
];
buildInputs = [
libxml2
- libunwind
- libgit2
- curl
- nghttp2
- mbedtls
- libssh2
- gmp
- mpfr
- utf8proc
- zlib
- p7zip
- pcre2
+ openssl
];
- JULIA_RPATH = lib.makeLibraryPath (buildInputs ++ [ stdenv.cc.cc gfortran.cc ncurses ]);
-
dontUseCmakeConfigure = true;
postPatch = ''
patchShebangs .
'';
- LDFLAGS = "-Wl,-rpath,${JULIA_RPATH}";
-
makeFlags = [
"prefix=$(out)"
"USE_BINARYBUILDER=0"
- "USE_SYSTEM_CSL=1"
- "USE_SYSTEM_LLVM=0" # a patched version is required
- "USE_SYSTEM_LIBUNWIND=1"
- "USE_SYSTEM_PCRE=1"
- "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_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_CURL=1"
- "USE_SYSTEM_LIBGIT2=1"
- "USE_SYSTEM_PATCHELF=1"
- "USE_SYSTEM_LIBWHICH=1"
- "USE_SYSTEM_ZLIB=1"
- "USE_SYSTEM_P7ZIP=1"
-
- "PCRE_INCL_PATH=${pcre2.dev}/include/pcre2.h"
+ # workaround for https://github.com/JuliaLang/julia/issues/47989
+ "USE_INTEL_JITEVENTS=0"
+ ] ++ 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_TARGET=generic;cortex-a57;thunderx2t99;armv8.2-a,crypto,fullfp16,lse,rdm"
];
+ # remove forbidden reference to $TMPDIR
+ preFixup = ''
+ for file in libcurl.so libgmpxx.so; do
+ patchelf --shrink-rpath --allowed-rpath-prefixes ${builtins.storeDir} "$out/lib/julia/$file"
+ done
+ '';
+
doInstallCheck = true;
installCheckTarget = "testall";
@@ -131,12 +74,6 @@ stdenv.mkDerivation rec {
dontStrip = true;
- postFixup = ''
- for file in $out/bin/julia $out/lib/libjulia.so $out/lib/julia/libjulia-internal.so $out/lib/julia/libjulia-codegen.so; do
- patchelf --set-rpath "$out/lib:$out/lib/julia:${JULIA_RPATH}" $file
- done
- '';
-
enableParallelBuilding = true;
meta = with lib; {
diff --git a/pkgs/development/compilers/julia/patches/1.8/0002-skip-building-doc.patch b/pkgs/development/compilers/julia/patches/1.8/0001-skip-building-doc.patch
index 64c0821eaba8..3b507bf26d77 100644
--- a/pkgs/development/compilers/julia/patches/1.8/0002-skip-building-doc.patch
+++ b/pkgs/development/compilers/julia/patches/1.8/0001-skip-building-doc.patch
@@ -1,17 +1,17 @@
-From 05c008dcabaf94f5623f2f7e267005eef0a8c5fc Mon Sep 17 00:00:00 2001
+From ce73c82ebadeb2e358e1a8e244eef723ffa96c76 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
+Subject: [PATCH 1/2] skip building doc
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
-index d38311dce..a775d36e1 100644
+index 94df626014..418f6ff268 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/0001-skip-symlink-system-libraries.patch b/pkgs/development/compilers/julia/patches/1.8/0001-skip-symlink-system-libraries.patch
deleted file mode 100644
index a5519d96a9d2..000000000000
--- a/pkgs/development/compilers/julia/patches/1.8/0001-skip-symlink-system-libraries.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 1faa30525c9671ffd3a08901896b521a040d7e5c 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
-
----
- base/Makefile | 2 --
- 1 file changed, 2 deletions(-)
-
-diff --git a/base/Makefile b/base/Makefile
-index 23a9c4011..12f92aa05 100644
---- a/base/Makefile
-+++ b/base/Makefile
-@@ -181,7 +181,6 @@ $$(build_private_libdir)/$$(libname_$2):
- fi; \
- fi
- ifneq ($$(USE_SYSTEM_$1),0)
--SYMLINK_SYSTEM_LIBRARIES += symlink_$2
- endif
- endef
-
-@@ -265,7 +264,6 @@ $(build_private_libdir)/libLLVM.$(SHLIB_EXT):
- ln -sf "$$REALPATH" "$@"
- ifneq ($(USE_SYSTEM_LLVM),0)
- ifneq ($(USE_LLVM_SHLIB),0)
--SYMLINK_SYSTEM_LIBRARIES += symlink_libLLVM
- endif
- endif
-
---
-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/0002-skip-failing-and-flaky-tests.patch
index ebf5729a5c0b..966c805ad7ae 100644
--- a/pkgs/development/compilers/julia/patches/1.8/0003-skip-failing-tests.patch
+++ b/pkgs/development/compilers/julia/patches/1.8/0002-skip-failing-and-flaky-tests.patch
@@ -1,14 +1,14 @@
-From 756d4e977f8f224e20effa82c612e5a9cc14d82e Mon Sep 17 00:00:00 2001
+From 0e1fe51ce93847ac3c4de49a003d9762b2f3d7c6 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
+Subject: [PATCH 2/2] 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..c17ccea8a 100644
+index 24e137a5b1..e78f12da04 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 channels $@)
$(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
deleted file mode 100644
index 2243565b394e..000000000000
--- a/pkgs/development/compilers/julia/patches/1.8/0004-ignore-absolute-path-when-loading-library.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From c0e587f4c50bd7bedfe6e5102e9b47c9704fac9b 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
-
----
- cli/loader_lib.c | 4 +---
- 1 file changed, 1 insertion(+), 3 deletions(-)
-
-diff --git a/cli/loader_lib.c b/cli/loader_lib.c
-index 0301b6eed..5cbda61af 100644
---- a/cli/loader_lib.c
-+++ b/cli/loader_lib.c
-@@ -50,9 +50,7 @@ static void * load_library(const char * rel_path, const char * src_dir, int err)
- #endif
-
- char path[2*JL_PATH_MAX + 1] = {0};
-- strncat(path, src_dir, sizeof(path) - 1);
-- strncat(path, PATHSEPSTRING, sizeof(path) - 1);
-- strncat(path, rel_path, sizeof(path) - 1);
-+ strncat(path, basename, sizeof(path) - 1);
-
- #if defined(_OS_WINDOWS_)
- wchar_t wpath[2*JL_PATH_MAX + 1] = {0};
---
-2.38.1
-