Package: guix-patches;
Reported by: Ludovic Courtès <ludo <at> gnu.org>
Date: Thu, 12 Sep 2024 13:24:01 UTC
Severity: normal
Tags: patch
To reply to this bug, email your comments to 73197 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
View this report as an mbox folder, status mbox, maintainer mbox
efraim <at> flashner.co.il, zimon.toutoune <at> gmail.com, guix-patches <at> gnu.org
:bug#73197
; Package guix-patches
.
(Thu, 12 Sep 2024 13:24:02 GMT) Full text and rfc822 format available.Ludovic Courtès <ludo <at> gnu.org>
:efraim <at> flashner.co.il, zimon.toutoune <at> gmail.com, guix-patches <at> gnu.org
.
(Thu, 12 Sep 2024 13:24:02 GMT) Full text and rfc822 format available.Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
From: Ludovic Courtès <ludo <at> gnu.org> To: guix-patches <at> gnu.org Cc: Ludovic Courtès <ludovic.courtes <at> inria.fr>, Philippe Virouleau <philippe.virouleau <at> inria.fr> Subject: [PATCH] gnu: julia: Update to 1.9.3. Date: Thu, 12 Sep 2024 15:22:50 +0200
From: Ludovic Courtès <ludovic.courtes <at> inria.fr> * gnu/packages/julia.scm (julia): Update to 1.9.3. [arguments]: Use gexps. [inputs, native-inputs]: Remove labels. * gnu/packages/llvm.scm (llvm-julia): Rename to… (llvm-14-julia): … this. Upgrade to 14.0.6-3. * gnu/packages/patches/julia-1.9-build-tweaks.patch: New file. * gnu/packages/patches/julia-Use-MPFR-4.2.patch: Remove. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. Co-authored-by: Philippe Virouleau <philippe.virouleau <at> inria.fr> Change-Id: I6ef35c6cd31741a7725b50364dd0f8fa6a0c6424 --- gnu/local.mk | 2 +- gnu/packages/julia.scm | 862 ++++++++++-------- gnu/packages/llvm.scm | 38 +- .../patches/julia-1.9-build-tweaks.patch | 152 +++ gnu/packages/patches/julia-Use-MPFR-4.2.patch | 228 ----- 5 files changed, 651 insertions(+), 631 deletions(-) create mode 100644 gnu/packages/patches/julia-1.9-build-tweaks.patch delete mode 100644 gnu/packages/patches/julia-Use-MPFR-4.2.patch Hello comrades! Here is an update of Julia adapted from: https://gitlab.inria.fr/guix-hpc/guix-hpc/-/commit/eb83e466fe0b9492216abc46da26ec3a89b0a946 Version 1.9.3 has been in the guix-hpc channel for a while. It’s not the latest version, not even the latest series, but it’s an improvement over what we have. Thoughts? Ludo’. diff --git a/gnu/local.mk b/gnu/local.mk index ed630041ff..76d58c8e38 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1586,8 +1586,8 @@ dist_patch_DATA = \ %D%/packages/patches/john-the-ripper-jumbo-with-gcc-11.patch \ %D%/packages/patches/json-c-0.13-CVE-2020-12762.patch \ %D%/packages/patches/json-c-0.12-CVE-2020-12762.patch \ + %D%/packages/patches/julia-1.9-build-tweaks.patch \ %D%/packages/patches/julia-SOURCE_DATE_EPOCH-mtime.patch \ - %D%/packages/patches/julia-Use-MPFR-4.2.patch \ %D%/packages/patches/libcall-ui-make-it-installable.patch \ %D%/packages/patches/libcamera-ipa_manager-disable-signature-verification.patch \ %D%/packages/patches/libcss-check-format.patch \ diff --git a/gnu/packages/julia.scm b/gnu/packages/julia.scm index 9668b3fd1e..5c7d900a09 100644 --- a/gnu/packages/julia.scm +++ b/gnu/packages/julia.scm @@ -28,6 +28,7 @@ (define-module (gnu packages julia) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix download) + #:use-module (guix gexp) #:use-module (guix utils) #:use-module (guix git-download) #:use-module (guix build-system gnu) @@ -142,412 +143,493 @@ (define-public libwhich (define-public julia (package (name "julia") - (version "1.8.3") - (source (origin - (method url-fetch) - (uri (string-append - "https://github.com/JuliaLang/julia/releases/download/v" - version "/julia-" version ".tar.gz")) - (sha256 - (base32 - "0jf8dr5j7y8cjnr65kn38xps5h9m2qvi8g1yd8qgiip5r87ld3ad")) - (patches (search-patches "julia-SOURCE_DATE_EPOCH-mtime.patch" - "julia-Use-MPFR-4.2.patch")))) + (version "1.9.3") + (source + (origin + (method url-fetch) + (uri (string-append + "https://github.com/JuliaLang/julia/releases/download/v" version + "/julia-" version ".tar.gz")) + (sha256 + (base32 "0788hbcr1v89crv2j3insy89lxs0zwjbxk9q73jpj4g7j26bszcd")) + (patches (search-patches "julia-SOURCE_DATE_EPOCH-mtime.patch" + "julia-1.9-build-tweaks.patch")))) (build-system gnu-build-system) (arguments - `(#:test-target "test" - #:modules ((ice-9 match) - (guix build gnu-build-system) - (guix build utils)) + (list #:test-target "test" + #:modules `((ice-9 match) + (guix build gnu-build-system) + (guix build utils)) - ;; The test suite takes many times longer than building and - ;; can easily fail on smaller machines when they run out of memory. - #:tests? ,(not (or (%current-target-system) - (target-aarch64?))) + ;; The test suite takes many times longer than building and + ;; can easily fail on smaller machines when they run out of memory. + #:tests? (not (or (%current-target-system) + (target-aarch64?))) - ;; Do not strip binaries to keep support for full backtraces. - ;; See https://github.com/JuliaLang/julia/issues/17831 - #:strip-binaries? #f + ;; Do not strip binaries to keep support for full backtraces. + ;; See https://github.com/JuliaLang/julia/issues/17831 + #:strip-binaries? #f - ;; The DSOs use $ORIGIN to refer to each other, but (guix build - ;; gremlin) doesn't support it yet, so skip this phase. - #:validate-runpath? #f + ;; The DSOs use $ORIGIN to refer to each other, but (guix build + ;; gremlin) doesn't support it yet, so skip this phase. + #:validate-runpath? #f - #:phases - (modify-phases %standard-phases - (delete 'configure) - (add-after 'unpack 'prepare-deps - (lambda* (#:key inputs #:allow-other-keys) - ;; needed by libwhich - (setenv "LD_LIBRARY_PATH" - (string-join (map (lambda (pkg) - (string-append (assoc-ref inputs pkg) - "/lib")) - '("curl" "dsfmt" - "gmp" "lapack" - "libssh2" "libnghttp2" "libgit2" - "libblastrampoline" - "mbedtls" "mpfr" - "openblas" "openlibm" "pcre2" - "suitesparse" "gfortran:lib")) - ":")))) - ;; FIXME: Building the documentation requires Julia packages that - ;; would be downloaded from the Internet. We should build them in a - ;; separate build phase. - (add-after 'unpack 'disable-documentation - (lambda _ - (substitute* "Makefile" - (("(install: .*) \\$\\(BUILDROOT\\)/doc/_build/html/en/index.html" _ line) - (string-append line "\n")) - (("src ui doc deps") - "src ui deps")))) - (add-after 'unpack 'activate-gnu-source-for-loader - (lambda _ - (substitute* "cli/Makefile" - (("LOADER_CFLAGS =") "LOADER_CFLAGS = -D_GNU_SOURCE")))) - ;; libquadmath is not available on all architectures. - ;; https://github.com/JuliaLang/julia/issues/41613 - (add-after 'unpack 'make-libquadmath-optional - (lambda _ - (substitute* "base/Makefile" - (("libquadmath,0") "libquadmath,0,ALLOW_FAILURE")))) - (add-before 'check 'set-home - ;; Some tests require a home directory to be set. - (lambda _ (setenv "HOME" "/tmp"))) - (add-before 'build 'fix-include-and-link-paths - (lambda* (#:key inputs #:allow-other-keys) - ;; The REPL must be linked with libuv. - (substitute* "cli/Makefile" - (("JLDFLAGS \\+= ") - (string-append "JLDFLAGS += " - (assoc-ref inputs "libuv") - "/lib/libuv.so "))))) - (add-before 'build 'replace-default-shell - (lambda* (#:key inputs #:allow-other-keys) - (substitute* "base/client.jl" - (("/bin/sh") (search-input-file inputs "/bin/sh"))))) - (add-before 'build 'shared-objects-paths - (lambda* (#:key inputs #:allow-other-keys) - (let ((jlpath - (lambda (pkgname) - (string-append - "stdlib/" pkgname "_jll/src/" pkgname "_jll.jl"))) - (from - (lambda (libname) - (string-append "const " libname " = .*\\.so"))) - (to - (lambda* (pkg libname #:optional libname_jl) + #:phases + #~(modify-phases %standard-phases + (delete 'configure) + (add-after 'unpack 'prepare-deps + (lambda* (#:key inputs #:allow-other-keys) + ;; needed by libwhich + (match inputs + (((labels . directories) ...) + (set-path-environment-variable + "LD_LIBRARY_PATH" + '("lib") directories))))) + (add-before 'check 'set-home + ;; Some tests require a home directory to be set. + (lambda _ + (setenv "HOME" "/tmp"))) + (add-before 'build 'fix-include-and-link-paths + (lambda* (#:key inputs #:allow-other-keys) + ;; The REPL must be linked with libuv. + (substitute* "cli/Makefile" + (("JLDFLAGS \\+= ") + (string-append "JLDFLAGS += " + (search-input-file inputs + "/lib/libuv.so") " "))))) + (add-before 'build 'fix-nested-dlopen + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "Make.inc" + ;; See the patch comment for the explanation, *must* be updated + ;; when updating julia. + (("GUIX_LIBUTF8PROC") + (search-input-file inputs "/lib/libutf8proc.a"))) + (substitute* "Makefile" + ;; See the patch comment for the explanation, *must* be updated + ;; when updating julia. + (("GUIX_LIBCHOLMOD") + (search-input-file inputs "/lib/libcholmod.so")) + (("GUIX_LIBSPQR") + (search-input-file inputs "/lib/libspqr.so")) + (("GUIX_LIBSC") + (search-input-file inputs + "/lib/libsuitesparseconfig.so")) + (("GUIX_LIBUMFPACK") + (search-input-file inputs "/lib/libumfpack.so"))))) + (add-before 'build 'replace-default-shell + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "base/client.jl" + (("/bin/sh") + (search-input-file inputs "/bin/sh"))))) + (add-before 'build 'shared-objects-paths + (lambda* (#:key inputs #:allow-other-keys) + (let ((jlpath (lambda (pkgname) + (string-append "stdlib/" pkgname + "_jll/src/" pkgname + "_jll.jl"))) + (jlbasepath (lambda (pkgname) + (string-append "base/" pkgname + ".jl"))) + (tolib (lambda (libname) + (search-input-file inputs + (string-append + "/lib/" libname + ".so")))) + (toquotedlib (lambda (libname) + (define file + (string-append "/lib/" + libname + ".so")) + (string-append "\"" + (search-input-file + inputs file) + "\""))) + (from (lambda (libname) + (string-append "const " libname + " = .*\\.so"))) + (to (lambda* (libname #:optional libname_jl) + (define file + (string-append "/lib/" libname ".so")) + + (string-append "const " + (or libname_jl libname) + " = \"" + (search-input-file + inputs file))))) + (substitute* "src/jitlayers.cpp" + (("libatomic.so") + (search-input-file inputs "/lib/libatomic.so"))) + (substitute* (list (jlbasepath "linking") + (jlpath "LLD")) + (("\"lld\"") + (string-append "\"" + (search-input-file inputs + "/bin/lld") + "\""))) + (substitute* (jlbasepath "pcre") + (("libpcre2-8") + (tolib "libpcre2-8"))) + (substitute* (jlbasepath "gmp") + (("libgmp.so.10") + (tolib "libgmp"))) + (substitute* (jlbasepath "mpfr") + (("libmpfr.so.6") + (tolib "libmpfr"))) + (substitute* (jlbasepath "irrationals") + ((":libmpfr") + (toquotedlib "libmpfr"))) + (substitute* "stdlib/Random/src/generation.jl" + ((":libmpfr") + (toquotedlib "libmpfr"))) + (substitute* "stdlib/Printf/src/Printf.jl" + (("\"libmpfr\"") + (toquotedlib "libmpfr"))) + (substitute* "stdlib/Random/src/DSFMT.jl" + ((":libdSFMT") + (toquotedlib "libdSFMT"))) + (for-each (lambda (file) + (substitute* file + ((":libgit2") + (toquotedlib "libgit2")))) + (find-files "stdlib/LibGit2/" "\\.jl$")) + (substitute* (jlpath "CompilerSupportLibraries") + (((from "libgomp")) + (to "libgomp")) + (((from "libgfortran")) + (string-append + "const libgfortran = string(\"" + (search-input-file inputs + "/lib/libgfortran.so")))) + (substitute* (jlpath "dSFMT") + (((from "libdSFMT")) + (to "libdSFMT"))) + (substitute* (jlpath "GMP") + (((from "libgmp")) + (to "libgmp")) + (((from "libgmpxx")) + (to "libgmpxx"))) + (substitute* (jlpath "libLLVM") + (((from "libLLVM")) + (to "libLLVM"))) + (substitute* (jlbasepath "binaryplatforms") + (("libLLVM-14jl") + (tolib "libLLVM-14jl"))) + (substitute* (jlpath "LibCURL") + (((from "libcurl")) + (to "libcurl"))) + (substitute* (jlpath "LibGit2") + (((from "libgit2")) + (to "libgit2"))) + (substitute* (jlpath "LibSSH2") + (((from "libssh2")) + (to "libssh2"))) + (substitute* (jlpath "LibUV") + (((from "libuv")) + (to "libuv"))) + (substitute* (jlpath "LibUnwind") + (((from "libunwind")) + (to "libunwind"))) + (substitute* (jlpath "MPFR") + (((from "libmpfr")) + (to "libmpfr"))) + (substitute* (jlpath "MbedTLS") + (((from "libmbedcrypto")) + (to "libmbedcrypto")) + (((from "libmbedtls")) + (to "libmbedtls")) + (((from "libmbedx509")) + (to "libmbedx509"))) + (substitute* (jlpath "nghttp2") + (((from "libnghttp2")) + (to "libnghttp2"))) + (substitute* (jlpath "OpenBLAS") + (("libgfortran.so") + (tolib "libgfortran")) + (((from "libopenblas")) + #$@(if (target-x86-64?) + `((to "libopenblas64_" "libopenblas")) + `((to "libopenblas"))))) + (substitute* (jlpath "OpenLibm") + (((from "libopenlibm")) + (to "libopenlibm"))) + (substitute* (jlpath "PCRE2") + (((from "libpcre2_8")) + (to "libpcre2-8" "libpcre2_8"))) + (substitute* (jlpath "SuiteSparse") + (((from "libamd")) + (to "libamd")) + (((from "libbtf")) + (to "libbtf")) + (((from "libcamd")) + (to "libcamd")) + (((from "libccolamd")) + (to "libccolamd")) + (((from "libcholmod")) + (to "libcholmod")) + (((from "libcolamd")) + (to "libcolamd")) + (((from "libklu")) + (to "libklu")) + (((from "libldl")) + (to "libldl")) + (((from "librbio")) + (to "librbio")) + (((from "libspqr")) + (to "libspqr")) + (((from "libsuitesparse")) + (to "libsuitesparse")) + (((from "libsuitesparseconfig")) + (to "libsuitesparseconfig")) + (((from "libumfpack")) + (to "libumfpack"))) + (substitute* (jlpath "Zlib") + (((from "libz")) + (to "libz"))) + (substitute* (jlpath "libblastrampoline") + (("libblastrampoline\\.so") + (search-input-file inputs + "/lib/libblastrampoline.so")))))) + (add-before 'build 'use-ssl-cert-file + (lambda _ + ;; We must adapt MozillaCACerts to use SSL_CERT_FILE. + (substitute* "stdlib/MozillaCACerts_jll/src/MozillaCACerts_jll.jl" + (("global cacert = .*") (string-append - "const " (or libname_jl libname) " = \"" - (assoc-ref inputs pkg) "/lib/" libname ".so")))) - (substitute* (jlpath "CompilerSupportLibraries") - (((from "libgfortran")) - (string-append "const libgfortran = string(\"" - (search-input-file inputs "/lib/libgfortran.so")))) - (substitute* (jlpath "dSFMT") - (((from "libdSFMT")) (to "dsfmt" "libdSFMT"))) - (substitute* (jlpath "GMP") - (((from "libgmp")) (to "gmp" "libgmp")) - (((from "libgmpxx")) (to "gmp" "libgmpxx"))) - (substitute* (jlpath "libLLVM") - (((from "libLLVM")) (to "llvm" "libLLVM"))) - (substitute* (jlpath "LibCURL") - (((from "libcurl")) (to "curl" "libcurl"))) - (substitute* (jlpath "LibGit2") - (((from "libgit2")) (to "libgit2" "libgit2"))) - (substitute* (jlpath "LibSSH2") - (((from "libssh2")) (to "libssh2" "libssh2"))) - (substitute* (jlpath "LibUV") - (((from "libuv")) (to "libuv" "libuv"))) - (substitute* (jlpath "LibUnwind") - (((from "libunwind")) (to "libunwind" "libunwind"))) - (substitute* (jlpath "MPFR") - (((from "libmpfr")) (to "mpfr" "libmpfr"))) - (substitute* (jlpath "MbedTLS") - (((from "libmbedcrypto")) (to "mbedtls" "libmbedcrypto")) - (((from "libmbedtls")) (to "mbedtls" "libmbedtls")) - (((from "libmbedx509")) (to "mbedtls" "libmbedx509"))) - (substitute* (jlpath "nghttp2") - (((from "libnghttp2")) (to "libnghttp2" "libnghttp2"))) - (substitute* (jlpath "OpenBLAS") - (((from "libopenblas")) - ,@(if (target-x86-64?) - `((to "openblas" "libopenblas64_" "libopenblas")) - `((to "openblas" "libopenblas"))))) - (substitute* (jlpath "OpenLibm") - (((from "libopenlibm")) (to "openlibm" "libopenlibm"))) - (substitute* (jlpath "PCRE2") - (((from "libpcre2_8")) (to "pcre2" "libpcre2-8" "libpcre2_8"))) - (substitute* (jlpath "SuiteSparse") - (((from "libamd")) (to "suitesparse" "libamd")) - (((from "libbtf")) (to "suitesparse" "libbtf")) - (((from "libcamd")) (to "suitesparse" "libcamd")) - (((from "libccolamd")) (to "suitesparse" "libccolamd")) - (((from "libcholmod")) (to "suitesparse" "libcholmod")) - (((from "libcolamd")) (to "suitesparse" "libcolamd")) - (((from "libklu")) (to "suitesparse" "libklu")) - (((from "libldl")) (to "suitesparse" "libldl")) - (((from "librbio")) (to "suitesparse" "librbio")) - (((from "libspqr")) (to "suitesparse" "libspqr")) - (((from "libsuitesparse")) (to "suitesparse" "libsuitesparse")) - (((from "libsuitesparseconfig")) - (to "suitesparse" "libsuitesparseconfig")) - (((from "libumfpack")) (to "suitesparse" "libumfpack"))) - (substitute* (jlpath "Zlib") - (((from "libz")) (to "zlib" "libz"))) - (substitute* (jlpath "libblastrampoline") - (("libblastrampoline\\.so") - (search-input-file inputs "/lib/libblastrampoline.so")))))) - (add-before 'build 'use-ssl-cert-file - (lambda _ - ;; We must adapt MozillaCACerts to use SSL_CERT_FILE. - (substitute* "stdlib/MozillaCACerts_jll/src/MozillaCACerts_jll.jl" - (("global cacert = .*") - (string-append - "global cacert = get(ENV, \"SSL_CERT_FILE\"," - ;; our fallback location. - "\"/etc/ssl/certs/ca-certificates.crt\")\n"))))) - (add-after 'unpack 'enable-parallel-tests - (lambda* (#:key parallel-tests? #:allow-other-keys) - (when parallel-tests? - (setenv "JULIA_TEST_USE_MULTIPLE_WORKERS" "true")))) - (add-after 'unpack 'adjust-test-suite - (lambda* (#:key inputs #:allow-other-keys) - (substitute* "test/spawn.jl" - (("shcmd = `sh`") (string-append "shcmd = `" (which "sh") "`"))) - ;; Some tests only check to see if the input is the correct version. - (substitute* "stdlib/PCRE2_jll/test/runtests.jl" - (("10.40.0") ,(package-version (this-package-input "pcre2")))) - (substitute* "stdlib/MbedTLS_jll/test/runtests.jl" - (("2.28.0") ,(package-version (this-package-input "mbedtls")))) - (substitute* "stdlib/MPFR_jll/test/runtests.jl" - (("4.1.0") ,(package-version (this-package-input "mpfr")))) - (substitute* "stdlib/GMP_jll/test/runtests.jl" - (("6.2.1") ,(package-version (this-package-input "gmp")))) - (substitute* "stdlib/LibGit2_jll/test/runtests.jl" - (("1.3.0") ,(package-version (this-package-input "libgit2")))) - (substitute* "stdlib/nghttp2_jll/test/runtests.jl" - (("1.48.0") ,(package-version (this-package-input "libnghttp2")))) - (substitute* "stdlib/Zlib_jll/test/runtests.jl" - (("1.2.12") ,(package-version (this-package-input "zlib")))) - (substitute* "stdlib/SuiteSparse_jll/test/runtests.jl" - (("5010") ,(string-replace-substring - (version-major+minor - (package-version - (this-package-input "suitesparse"))) "." "0"))))) - (add-before 'check 'disable-broken-tests - (lambda _ - ;; disabling REPL tests because they require a stdin - ;; There are some read-only precompile issues in the 1.6 series. - ;; https://github.com/JuliaLang/julia/pull/41614 - ;; https://github.com/JuliaLang/julia/issues/41156 - (substitute* "test/choosetests.jl" - (("\"cmdlineargs\",") "") - (("\"precompile\",") "")) - ;; Dates/io tests fail on master when networking is unavailable - ;; https://github.com/JuliaLang/julia/issues/34655 - (substitute* "stdlib/Dates/test/io.jl" - (("using Dates") "import Dates + "global cacert = get(ENV, \"SSL_CERT_FILE\"," + ;; our fallback location. + "\"/etc/ssl/certs/ca-certificates.crt\")\n"))))) + (add-after 'unpack 'enable-parallel-tests + (lambda* (#:key parallel-tests? #:allow-other-keys) + (when parallel-tests? + (setenv "JULIA_TEST_USE_MULTIPLE_WORKERS" "true")))) + (add-after 'unpack 'adjust-test-suite + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "test/spawn.jl" + (("shcmd = `sh`") + (string-append "shcmd = `" + (which "sh") "`"))) + + ;; Some tests only check to see if the input is the correct version. + (substitute* "stdlib/PCRE2_jll/test/runtests.jl" + (("10\\.42\\.0") + #$(package-version (this-package-input "pcre2")))) + (substitute* "stdlib/MbedTLS_jll/test/runtests.jl" + (("2\\.28\\.2") + #$(package-version (this-package-input "mbedtls-apache")))) + (substitute* "stdlib/MPFR_jll/test/runtests.jl" + (("4\\.1\\.1") + #$(package-version (this-package-input "mpfr")))) + (substitute* "stdlib/GMP_jll/test/runtests.jl" + (("6\\.2\\.1") + #$(package-version (this-package-input "gmp")))) + (substitute* "stdlib/LibGit2_jll/test/runtests.jl" + (("1\\.5\\.0") + #$(package-version (this-package-input "libgit2")))) + (substitute* "stdlib/nghttp2_jll/test/runtests.jl" + (("1\\.48\\.0") + #$(package-version (this-package-input "nghttp2")))) + (substitute* "stdlib/Zlib_jll/test/runtests.jl" + (("1\\.2\\.13") + #$(package-version (this-package-input "zlib")))) + (substitute* "stdlib/SuiteSparse_jll/test/runtests.jl" + (("5010") + #$(string-replace-substring + (version-major+minor + (package-version + (this-package-input "suitesparse"))) "." "0"))))) + (add-before 'check 'disable-broken-tests + (lambda* (#:key inputs #:allow-other-keys) + ;; disabling REPL tests because they require a stdin + ;; There are some read-only precompile issues in the 1.6 series. + ;; https://github.com/JuliaLang/julia/pull/41614 + ;; https://github.com/JuliaLang/julia/issues/41156 + (substitute* "test/choosetests.jl" + (("\"cmdlineargs\",") + "") + (("\"precompile\",") + "")) + ;; Distributed test with remote execution + (substitute* "usr/share/julia/stdlib/v1.9/Distributed/test/distributed_exec.jl" + (("using Test,") + "exit()\n")) + ;; Dates/io tests fail on master when networking is unavailable + ;; https://github.com/JuliaLang/julia/issues/34655 + (substitute* "stdlib/Dates/test/io.jl" + (("using Dates") + "import Dates using Dates: @dateformat_str, Date, DateTime, DateFormat, Time")) - ;; julia embeds a certificate, we are not doing that - (substitute* "stdlib/MozillaCACerts_jll/test/runtests.jl" - (("@test isfile\\(MozillaCACerts_jll.cacert\\)") - "@test_broken isfile(MozillaCACerts_jll.cacert)")) - ;; since certificate is not present some tests are failing in network option - (substitute* "usr/share/julia/stdlib/v1.8/NetworkOptions/test/runtests.jl" - (("@test isfile\\(bundled_ca_roots\\(\\)\\)") - "@test_broken isfile(bundled_ca_roots())") - (("@test ispath\\(ca_roots_path\\(\\)\\)") - "@test_broken ispath(ca_roots_path())") - (("@test ca_roots_path\\(\\) \\!= bundled_ca_roots\\(\\)") - "@test_broken ca_roots_path() != bundled_ca_roots()")) - ;; WARNING: failed to select UTF-8 encoding, using ASCII - ;; Using 'setlocale' doesn't affect the test failures. - ;(setlocale LC_ALL "en_US.utf8") - ;(setenv "LC_ALL" "en_US.utf8") - (substitute* "test/cmdlineargs.jl" - (("test v\\[3") "test_broken v[3") - (("test isempty\\(v\\[3") "test_broken isempty(v[3")) - ;; These test(s) randomly fails because they depend on CPU. - (substitute* "test/math.jl" - ;; @test_broken cannot be used because if the test randomly - ;; passes, then it also raises an error. - (("@test isinf\\(log1p\\(-one\\(T\\)\\)\\)") - " ")) + ;; julia embeds a certificate, we are not doing that + (substitute* "stdlib/MozillaCACerts_jll/test/runtests.jl" + (("@test isfile\\(MozillaCACerts_jll.cacert\\)") + "@test_broken isfile(MozillaCACerts_jll.cacert)")) + ;; since certificate is not present some tests are failing in network option + (substitute* "usr/share/julia/stdlib/v1.9/NetworkOptions/test/runtests.jl" + (("@test isfile\\(bundled_ca_roots\\(\\)\\)") + "@test_broken isfile(bundled_ca_roots())") + (("@test ispath\\(ca_roots_path\\(\\)\\)") + "@test_broken ispath(ca_roots_path())") + (("@test ca_roots_path\\(\\) \\!= bundled_ca_roots\\(\\)") + "@test_broken ca_roots_path() != bundled_ca_roots()")) + ;; WARNING: failed to select UTF-8 encoding, using ASCII + ;; Using 'setlocale' doesn't affect the test failures. + ;; (setlocale LC_ALL "en_US.utf8") + ;; (setenv "LC_ALL" "en_US.utf8") + (substitute* "test/cmdlineargs.jl" + (("test v\\[3") + "test_broken v[3") + (("test isempty\\(v\\[3") + "test_broken isempty(v[3")) + ;; These test(s) randomly fails because they depend on CPU. + (substitute* "test/math.jl" + ;; @test_broken cannot be used because if the test randomly + ;; passes, then it also raises an error. + (("@test isinf\\(log1p\\(-one\\(T\\)\\)\\)") + " ")) - ;; These are new test failures for 1.8: - ;; This test passes on some architectures and fails on others. - (substitute* "stdlib/LinearAlgebra/test/lu.jl" - (("@test String") "@test_skip String")) + ;; These are new test failures for 1.8: + ;; This test passes on some architectures and fails on others. + (substitute* "stdlib/LinearAlgebra/test/lu.jl" + (("@test String") + "@test_skip String")) - (substitute* "stdlib/InteractiveUtils/test/runtests.jl" - (("@test !occursin\\(\"Environment") - "@test_broken !occursin(\"Environment") - (("@test occursin\\(\"Environment") - "@test_broken occursin(\"Environment")) - (substitute* "usr/share/julia/stdlib/v1.8/Statistics/test/runtests.jl" - (("@test cov\\(A") "@test_skip cov(A") - (("@test isfinite") "@test_skip isfinite")) - ;; LoadError: SuiteSparse threads test failed with nthreads == 4 - (substitute* "usr/share/julia/stdlib/v1.8/SuiteSparse/test/runtests.jl" - (("Base\\.USE_GPL_LIBS") "false")) - ;; Got exception outside of a @test - ;; LinearAlgebra.LAPACKException(16) - ;; eliminate all the test bits. - (substitute* "stdlib/LinearAlgebra/test/schur.jl" - (("f = schur\\(A, B\\)") "f = schur(A, A)") - (("@test f\\.Q\\*f\\.S\\*f\\.Z'.*") "\n") - (("@test f\\.Q\\*f\\.T\\*f\\.Z'.*") "\n")) - (substitute* "test/threads.jl" - (("@test success") "@test_broken success")))) - ;; Doesn't this just mean they weren't linked correctly? - (add-after 'install 'symlink-missing-libraries - (lambda* (#:key inputs outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (link - (lambda (pkgname pred) - (map (lambda (file) - (unless (file-exists? - (string-append out "/lib/julia/" - (basename file))) - (symlink file (string-append out "/lib/julia/" - (basename file))))) - (find-files (string-append (assoc-ref inputs pkgname) - "/lib") pred))))) - (link "libunwind" "libunwind\\.so") - (link "llvm" "libLLVM-13jl\\.so") - (link "utf8proc" "libutf8proc\\.so") - (link "zlib" "libz\\.so")))) - (add-after 'install 'make-wrapper - (lambda* (#:key inputs outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (bin (string-append out "/bin")) - (program "julia")) - (with-directory-excursion bin - (wrap-program program - `("JULIA_LOAD_PATH" ":" prefix - ("" "$JULIA_LOAD_PATH")) - `("JULIA_DEPOT_PATH" ":" prefix - ("" "$JULIA_DEPOT_PATH")))))))) - #:make-flags - (list - "VERBOSE=1" ;; more helpful logging of what make is doing - (string-append "prefix=" (assoc-ref %outputs "out")) + (substitute* "usr/share/julia/stdlib/v1.9/Statistics/test/runtests.jl" + (("@test cov\\(A") + "@test_skip cov(A") + (("@test isfinite") + "@test_skip isfinite")) + ;; LoadError: SuiteSparse threads test failed with nthreads == 4 + (substitute* "usr/share/julia/stdlib/v1.9/SuiteSparse/test/runtests.jl" + (("Base\\.USE_GPL_LIBS") + "false")) + ;; Got exception outside of a @test + ;; LinearAlgebra.LAPACKException(16) + ;; eliminate all the test bits. + (substitute* "stdlib/LinearAlgebra/test/schur.jl" + (("f = schur\\(A, B\\)") + "f = schur(A, A)") + (("@test f\\.Q\\*f\\.S\\*f\\.Z'.*") + "\n") + (("@test f\\.Q\\*f\\.T\\*f\\.Z'.*") + "\n")))) + ;; Doesn't this just mean they weren't linked correctly? + (add-after 'install 'symlink-missing-libraries + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (link (lambda (pkgname pred) + (map (lambda (file) + (unless (file-exists? (string-append + out + "/lib/julia/" + (basename + file))) + (symlink file + (string-append + out + "/lib/julia/" + (basename file))))) + (find-files (string-append (assoc-ref + inputs + pkgname) + "/lib") pred))))) + (link "libunwind-julia" "libunwind\\.so") + (link "llvm" "libLLVM-14jl\\.so") + (link "gmp" "libgmp\\.so.10") + (link "mpfr" "libmpfr\\.so.6") + (link "zlib" "libz\\.so")))) + (add-after 'install 'make-wrapper + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin")) + (program "julia")) + (with-directory-excursion bin + (wrap-program program + `("JULIA_LOAD_PATH" ":" prefix + ("" "$JULIA_LOAD_PATH")) + `("JULIA_DEPOT_PATH" ":" prefix + ("" "$JULIA_DEPOT_PATH")))))))) - ;; Passing the MARCH or JULIA_CPU_TARGET flag is necessary to build - ;; binary substitutes for the supported architectures. See also - ;; https://docs.julialang.org/en/v1/devdocs/sysimg/#Specifying-multiple-system-image-targets - ,(match (or (%current-target-system) - (%current-system)) - ("x86_64-linux" - ;; These are the flags that upstream uses for their binaries. - "JULIA_CPU_TARGET=generic;generic,-cx16,clone_all;sandybridge,-xsaveopt,clone_all;haswell,-rdrnd,base(1)") - ("i686-linux" "MARCH=pentium4") - ("armhf-linux" "JULIA_CPU_TARGET=armv7-a,neon") - ("powerpc64le-linux" "JULIA_CPU_TARGET=pwr8") - ;; Prevent errors when querying this package on unsupported - ;; platforms, e.g. when running "guix package --search=" - ;; and also of targeting the builder's architecture. - (_ "JULIA_CPU_TARGET=generic")) + #:make-flags + #~(list (string-append "prefix=" + (assoc-ref %outputs "out")) - "CONFIG_SHELL=bash -x" ; needed to build bundled libraries - "USE_BINARYBUILDER=0" - ;; list (and order!) of "USE_SYSTEM_*" is here: - ;; https://github.com/JuliaLang/julia/blob/v1.8.2/Make.inc - "USE_SYSTEM_CSL=1" - "USE_SYSTEM_LLVM=1" - "USE_SYSTEM_LIBUNWIND=1" - "USE_SYSTEM_PCRE=1" - "USE_SYSTEM_OPENLIBM=1" - "USE_SYSTEM_DSFMT=1" - "USE_SYSTEM_LIBBLASTRAMPOLINE=1" - "USE_SYSTEM_BLAS=1" - "USE_SYSTEM_LAPACK=1" - "USE_SYSTEM_GMP=1" - "USE_SYSTEM_MPFR=1" - "USE_SYSTEM_LIBSUITESPARSE=1" - "USE_SYSTEM_LIBUV=1" - "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" + ;; Passing the MARCH or JULIA_CPU_TARGET flag is necessary to build + ;; binary substitutes for the supported architectures. See also + ;; https://docs.julialang.org/en/v1/devdocs/sysimg/#Specifying-multiple-system-image-targets + #$(match (or (%current-target-system) + (%current-system)) + ("x86_64-linux" + ;; These are the flags that upstream uses for their binaries. + "JULIA_CPU_TARGET=generic;generic,-cx16,clone_all;sandybridge,-xsaveopt,clone_all;haswell,-rdrnd,base(1)") + ("i686-linux" "MARCH=pentium4") + ("armhf-linux" + "JULIA_CPU_TARGET=armv7-a,neon") + ("powerpc64le-linux" + "JULIA_CPU_TARGET=pwr8") + ;; Prevent errors when querying this package on unsupported + ;; platforms, e.g. when running "guix package --search=" + ;; and also of targeting the builder's architecture. + (_ "JULIA_CPU_TARGET=generic")) - "USE_LLVM_SHLIB=1" + "CONFIG_SHELL=bash -x" ;needed to build bundled libraries + (string-append "CC=" + #$(cc-for-target)) - "NO_GIT=1" ; build from release tarball. - "USE_GPL_LIBS=1" ; proudly + #$@(if (target-x86-64?) + `("USE_BLAS64=1" + "LIBBLAS=-lopenblas64_" + "LIBBLASNAME=libopenblas64_") + `("USE_BLAS64=0" "LIBBLAS=-lopenblas" + "LIBBLASNAME=libopenblas")) - ,@(if (target-x86-64?) - `("USE_BLAS64=1" - "LIBBLAS=-lopenblas64_" - "LIBBLASNAME=libopenblas64_") - `("USE_BLAS64=0" - "LIBBLAS=-lopenblas" - "LIBBLASNAME=libopenblas")) - - (string-append "UTF8PROC_INC=" - (assoc-ref %build-inputs "utf8proc") - "/include") - ;; Make.inc expects a static library for libuv. - (string-append "LIBUV=" - (assoc-ref %build-inputs "libuv") - "/lib/libuv.a") - (string-append "LIBUV_INC=" - (assoc-ref %build-inputs "libuv") - "/include")))) - (inputs - `(("bash-minimal" ,bash-minimal) - ("coreutils" ,coreutils) ; for bindings to "mkdir" and the like - ("curl" ,curl-ssh) - ("gfortran" ,gfortran) - ;; required for libgcc_s.so - ("gfortran:lib" ,gfortran "lib") - ("gmp" ,gmp) - ("lapack" ,lapack) - ("libblastrampoline" ,libblastrampoline) - ("libgit2" ,libgit2-1.3) - ("libnghttp2" ,nghttp2 "lib") - ("libssh2" ,libssh2) - ("libunwind" ,libunwind-julia) - ("libuv" ,libuv-julia) - ("llvm" ,llvm-julia) - ("mbedtls" ,mbedtls-lts) - ("mpfr" ,mpfr) - ,@(if (target-x86-64?) - `(("openblas" ,openblas-ilp64)) - `(("openblas" ,openblas))) - ("openlibm" ,openlibm) - ("p7zip" ,p7zip) - ("pcre2" ,pcre2) - ("suitesparse" ,suitesparse) - ("utf8proc" ,utf8proc-2.7.0) - ("wget" ,wget) - ("which" ,which) - ("zlib" ,zlib) - ;; Find dependencies versions here: - ;; https://raw.githubusercontent.com/JuliaLang/julia/v1.6.0/deps/Versions.make - ("dsfmt" ,dsfmt) - ("libwhich" ,libwhich))) - (native-inputs - `(("openssl" ,openssl) - ("perl" ,perl) - ("patchelf" ,patchelf) - ("pkg-config" ,pkg-config) - ("python" ,python))) + (string-append "UTF8PROC_INC=" + (assoc-ref %build-inputs "utf8proc") + "/include") + ;; Make.inc expects a static library for libuv. + (string-append "LIBUV=" + (search-input-file %build-inputs + "/lib/libuv.a")) + (string-append "LIBUV_INC=" + (dirname + (search-input-file + %build-inputs "/include/uv.h")))))) + (inputs (list coreutils ;for bindings to "mkdir" and the like + curl-ssh + gfortran + `(,gfortran "lib") ;required for libgcc_s.so + gmp + lapack + libblastrampoline + libgit2-1.5 + `(,nghttp2 "lib") + libssh2 + libunwind-julia + libuv-julia + llvm-14-julia + lld-14 + mbedtls-apache + mpfr + (if (target-x86-64?) openblas-ilp64 openblas) + openlibm + p7zip + pcre2 + suitesparse + utf8proc-2.7.0 + wget + which + zlib + ;; Find dependencies versions here: + ;; https://raw.githubusercontent.com/JuliaLang/julia/v1.6.0/deps/Versions.make + dsfmt + libwhich)) + (native-inputs (list openssl perl patchelf pkg-config python)) (native-search-paths - (list (search-path-specification - (variable "JULIA_LOAD_PATH") - (files (list "share/julia/loadpath/"))) - (search-path-specification - (variable "JULIA_DEPOT_PATH") - (files (list "share/julia/"))) - $SSL_CERT_FILE)) + (list (search-path-specification + (variable "JULIA_LOAD_PATH") + (files (list "share/julia/loadpath/"))) + (search-path-specification + (variable "JULIA_DEPOT_PATH") + (files (list "share/julia/"))) + $SSL_CERT_FILE)) ;; Julia only officially supports some of our platforms: ;; https://julialang.org/downloads/#supported_platforms (supported-systems '("i686-linux" "x86_64-linux" "aarch64-linux")) diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm index fd2e815fe0..671aee059e 100644 --- a/gnu/packages/llvm.scm +++ b/gnu/packages/llvm.scm @@ -1,7 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2014, 2016, 2018 Eric Bavier <bavier <at> member.fsf.org> ;;; Copyright © 2015 Mark H Weaver <mhw <at> netris.org> -;;; Copyright © 2015, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo <at> gnu.org> +;;; Copyright © 2015, 2017-2021, 2024 Ludovic Courtès <ludo <at> gnu.org> ;;; Copyright © 2016 Dennis Mungai <dmngaie <at> gmail.com> ;;; Copyright © 2016, 2018, 2019, 2020, 2021, 2023 Ricardo Wurmus <rekado <at> elephly.net> ;;; Copyright © 2017 Roel Janssen <roel <at> gnu.org> @@ -2264,22 +2264,36 @@ (define-public wllvm LLVM bitcode files.") (license license:expat))) -(define-public llvm-julia +(define-public llvm-14-julia (package - (inherit llvm-13) + (inherit llvm-14) + (version "14.0.6-3-julia") + (source + (origin + (method git-fetch) + (uri (git-reference (url "https://github.com/JuliaLang/llvm-project") + (commit "julia-14.0.6-3"))) + (file-name (git-file-name "llvm-project-julia" "14.0.6-3")) + (sha256 + (base32 + "16ynl9g4paksvglk6asfxdr15gy21bzvsjdkqb1msbcnkz2x610x")))) (arguments - (substitute-keyword-arguments (package-arguments llvm-13) - ((#:configure-flags flags ''()) + (substitute-keyword-arguments (package-arguments llvm-14) + ((#:configure-flags flags + ''()) + ; FIXME: I think we should basically duplicate + ; https://github.com/JuliaLang/julia/blob/master/deps/llvm.mk #~(cons* "-DLLVM_BUILD_LLVM_DYLIB=ON" "-DLLVM_LINK_LLVM_DYLIB=ON" - ;; "-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=NVPTX" - "-DLLVM_VERSION_SUFFIX:STRING=jl" ; Perhaps not needed. - #$(string-append "-DLLVM_TARGETS_TO_BUILD=" + "-DLLVM_SHLIB_SYMBOL_VERSION:STRING=JL_LLVM_14.0" + "-DLLVM_VERSION_SUFFIX:STRING=jl" ;Perhaps not needed. + #$(string-append "-DLLVM_TARGETS_TO_BUILD=NVPTX;AMDGPU;" (system->llvm-target)) - (delete "-DBUILD_SHARED_LIBS:BOOL=TRUE" #$flags))) - ((#:build-type _) "Release"))) - (properties `((hidden? . #t) - ,@(package-properties llvm-13))))) + (delete "-DBUILD_SHARED_LIBS:BOOL=TRUE" + #$flags))) + ((#:build-type _) + "Release"))) + (properties `((hidden? . #t) ,@(package-properties llvm-14))))) (define llvm-cling ;; To determine which version of LLVM a given release of Cling should use, diff --git a/gnu/packages/patches/julia-1.9-build-tweaks.patch b/gnu/packages/patches/julia-1.9-build-tweaks.patch new file mode 100644 index 0000000000..25f220b012 --- /dev/null +++ b/gnu/packages/patches/julia-1.9-build-tweaks.patch @@ -0,0 +1,152 @@ +Adjust the Julia 1.9 build system to unbundle libraries and otherwise fix things +here and there. + +diff --git a/Make.inc b/Make.inc +index 5bbb52617a..7e1215a2de 100644 +--- a/Make.inc ++++ b/Make.inc +@@ -40,33 +40,39 @@ OPENBLAS_USE_THREAD:=1 + # Flags for using libraries available on the system instead of building them. + # Please read the notes around usage of SYSTEM flags in README.md + # Issues resulting from use of SYSTEM versions will generally not be accepted. +-USE_SYSTEM_CSL:=0 +-USE_SYSTEM_LLVM:=0 +-USE_SYSTEM_LIBUNWIND:=0 ++USE_SYSTEM_CSL:=1 ++USE_SYSTEM_LLVM:=1 ++USE_SYSTEM_LIBUNWIND:=1 + DISABLE_LIBUNWIND:=0 +-USE_SYSTEM_PCRE:=0 ++USE_SYSTEM_PCRE:=1 + USE_SYSTEM_LIBM:=0 +-USE_SYSTEM_OPENLIBM:=0 ++USE_SYSTEM_OPENLIBM:=1 + UNTRUSTED_SYSTEM_LIBM:=0 +-USE_SYSTEM_DSFMT:=0 +-USE_SYSTEM_LIBBLASTRAMPOLINE:=0 +-USE_SYSTEM_BLAS:=0 +-USE_SYSTEM_LAPACK:=0 +-USE_SYSTEM_GMP:=0 +-USE_SYSTEM_MPFR:=0 +-USE_SYSTEM_LIBSUITESPARSE:=0 +-USE_SYSTEM_LIBUV:=0 +-USE_SYSTEM_UTF8PROC:=0 +-USE_SYSTEM_MBEDTLS:=0 +-USE_SYSTEM_LIBSSH2:=0 +-USE_SYSTEM_NGHTTP2:=0 +-USE_SYSTEM_CURL:=0 +-USE_SYSTEM_LIBGIT2:=0 +-USE_SYSTEM_PATCHELF:=0 +-USE_SYSTEM_LIBWHICH:=0 +-USE_SYSTEM_ZLIB:=0 +-USE_SYSTEM_P7ZIP:=0 +-USE_SYSTEM_LLD:=0 ++USE_SYSTEM_DSFMT:=1 ++USE_SYSTEM_LIBBLASTRAMPOLINE:=1 ++USE_SYSTEM_BLAS:=1 ++USE_SYSTEM_LAPACK:=1 ++USE_SYSTEM_GMP:=1 ++USE_SYSTEM_MPFR:=1 ++USE_SYSTEM_LIBSUITESPARSE:=1 ++USE_SYSTEM_LIBUV:=1 ++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 ++USE_SYSTEM_LLD:=1 ++ ++# Guix override ++USE_INTEL_JITEVENTS:=0 ++USE_PERF_JITEVENTS:=0 ++USE_BINARYBUILDER:=0 ++ + + # Link to the LLVM shared library + USE_LLVM_SHLIB := 1 +@@ -1124,7 +1130,8 @@ else + endif + + ifeq ($(USE_SYSTEM_UTF8PROC), 1) +- LIBUTF8PROC := -lutf8proc ++ # Point to the static lib in Guix ++ LIBUTF8PROC := GUIX_LIBUTF8PROC + UTF8PROC_INC := $(LOCALBASE)/include + else + LIBUTF8PROC := $(build_libdir)/libutf8proc.a +diff --git a/Makefile b/Makefile +index ef0ade09e2..6b9177df60 100644 +--- a/Makefile ++++ b/Makefile +@@ -11,7 +11,8 @@ all: debug release + # sort is used to remove potential duplicates + DIRS := $(sort $(build_bindir) $(build_depsbindir) $(build_libdir) $(build_private_libdir) $(build_libexecdir) $(build_includedir) $(build_includedir)/julia $(build_sysconfdir)/julia $(build_datarootdir)/julia $(build_datarootdir)/julia/stdlib $(build_man1dir)) + ifneq ($(BUILDROOT),$(JULIAHOME)) +-BUILDDIRS := $(BUILDROOT) $(addprefix $(BUILDROOT)/,base src src/flisp src/support src/clangsa cli doc deps stdlib test test/clangsa test/embedding test/gcext test/llvmpasses) ++# FIXME: do not build doc yet ++BUILDDIRS := $(BUILDROOT) $(addprefix $(BUILDROOT)/,base src src/flisp src/support src/clangsa cli deps stdlib test test/clangsa test/embedding test/gcext test/llvmpasses) + BUILDDIRMAKE := $(addsuffix /Makefile,$(BUILDDIRS)) $(BUILDROOT)/sysimage.mk + DIRS := $(DIRS) $(BUILDDIRS) + $(BUILDDIRMAKE): | $(BUILDDIRS) +@@ -64,6 +65,16 @@ julia-deps: | $(DIRS) $(build_datarootdir)/julia/base $(build_datarootdir)/julia + # `julia-stdlib` depends on `julia-deps` so that the fake JLL stdlibs can copy in their Artifacts.toml files. + julia-stdlib: | $(DIRS) julia-deps + @$(MAKE) $(QUIET_MAKE) -C $(BUILDROOT)/stdlib ++ # These files are checked-out during the build phase, but need to be fixed ++ # before the actual build, therefore we sed with a variable we'll fix before ++ # the build phase. It's twisted but it's the only working way I could find. ++ # The " are important to avoid double substitution when doing 'make' then ++ # 'make check'. ++ sed -i 's|"libcholmod"|"GUIX_LIBCHOLMOD"|' usr/share/julia/stdlib/v1.9/SparseArrays/src/solvers/cholmod.jl ++ sed -i 's|:libsuitesparseconfig|"GUIX_LIBSC"|' usr/share/julia/stdlib/v1.9/SparseArrays/src/solvers/cholmod.jl ++ sed -i 's|:libcholmod|"GUIX_LIBCHOLMOD"|' usr/share/julia/stdlib/v1.9/SparseArrays/src/solvers/LibSuiteSparse.jl ++ sed -i 's|:libspqr|"GUIX_LIBSPQR"|' usr/share/julia/stdlib/v1.9/SparseArrays/src/solvers/LibSuiteSparse.jl ++ sed -i 's|:libumfpack|"GUIX_LIBUMFPACK"|' usr/share/julia/stdlib/v1.9/SparseArrays/src/solvers/LibSuiteSparse.jl + + julia-base: julia-deps $(build_sysconfdir)/julia/startup.jl $(build_man1dir)/julia.1 $(build_datarootdir)/julia/julia-config.jl + @$(MAKE) $(QUIET_MAKE) -C $(BUILDROOT)/base +@@ -236,7 +247,9 @@ define stringreplace + endef + + +-install: $(build_depsbindir)/stringreplace $(BUILDROOT)/doc/_build/html/en/index.html ++# Guix FIXME: building the doc requires internet. We should build them in a ++# separate build phase. ++install: $(build_depsbindir)/stringreplace # $(BUILDROOT)/doc/_build/html/en/index.html + @$(MAKE) $(QUIET_MAKE) $(JULIA_BUILD_MODE) + @for subdir in $(bindir) $(datarootdir)/julia/stdlib/$(VERSDIR) $(docdir) $(man1dir) $(includedir)/julia $(libdir) $(private_libdir) $(sysconfdir) $(private_libexecdir); do \ + mkdir -p $(DESTDIR)$$subdir; \ +diff --git a/base/Makefile b/base/Makefile +index 0ea0359c8c..9cee86aeec 100644 +--- a/base/Makefile ++++ b/base/Makefile +@@ -239,7 +239,10 @@ endif + ifneq (,$(LIBGFORTRAN_VERSION)) + $(eval $(call symlink_system_library,CSL,libgfortran,$(LIBGFORTRAN_VERSION))) + endif +-$(eval $(call symlink_system_library,CSL,libquadmath,0)) ++ ++# libquadmath is not available on all architectures. ++# https://github.com/JuliaLang/julia/issues/41613 ++$(eval $(call symlink_system_library,CSL,libquadmath,0,ALLOW_FAILURE)) + $(eval $(call symlink_system_library,CSL,libstdc++,6)) + # We allow libssp, libatomic and libgomp to fail as they are not available on all systems + $(eval $(call symlink_system_library,CSL,libssp,0,ALLOW_FAILURE)) +diff --git a/cli/Makefile b/cli/Makefile +index 7ba238e0de..6540f6384a 100644 +--- a/cli/Makefile ++++ b/cli/Makefile +@@ -7,7 +7,7 @@ include $(JULIAHOME)/deps/llvm-ver.make + + HEADERS := $(addprefix $(SRCDIR)/,jl_exports.h loader.h) $(addprefix $(JULIAHOME)/src/,julia_fasttls.h support/platform.h support/dirpath.h jl_exported_data.inc jl_exported_funcs.inc) + +-LOADER_CFLAGS = $(JCFLAGS) -I$(BUILDROOT)/src -I$(JULIAHOME)/src -I$(JULIAHOME)/src/support -I$(build_includedir) -ffreestanding ++LOADER_CFLAGS = -D_GNU_SOURCE $(JCFLAGS) -I$(BUILDROOT)/src -I$(JULIAHOME)/src -I$(JULIAHOME)/src/support -I$(build_includedir) -ffreestanding + LOADER_LDFLAGS = $(JLDFLAGS) -ffreestanding -L$(build_shlibdir) -L$(build_libdir) + + ifeq ($(OS),WINNT) diff --git a/gnu/packages/patches/julia-Use-MPFR-4.2.patch b/gnu/packages/patches/julia-Use-MPFR-4.2.patch deleted file mode 100644 index 73a395c89e..0000000000 --- a/gnu/packages/patches/julia-Use-MPFR-4.2.patch +++ /dev/null @@ -1,228 +0,0 @@ -This patch backports part of Julia upstream commit: - - 1e5fdb29f8858f3244f6aff116ee12e4c8247f3a - Author: Simon Byrne <simon.byrne <at> gmail.com> - AuthorDate: Tue Jan 10 14:52:36 2023 -0800 - Commit: GitHub <noreply <at> github.com> - CommitDate: Tue Jan 10 17:52:36 2023 -0500 - - update MPFR to 4.2.0 (#48165) - - Co-authored-by: Mosè Giordano <giordano <at> users.noreply.github.com> - - 6 files changed, 112 insertions(+), 79 deletions(-) - base/mpfr.jl | 34 ++++++++++++++-- - deps/checksums/mpfr | 68 ++++++++++++++++---------------- - deps/mpfr.version | 2 +- - stdlib/MPFR_jll/Project.toml | 2 +- - stdlib/MPFR_jll/test/runtests.jl | 2 +- - test/math.jl | 83 +++++++++++++++++++++------------------- - - -diff -ur julia-1.8.3-orig/base/mpfr.jl julia-1.8.3-patch/base/mpfr.jl ---- julia-1.8.3-orig/base/mpfr.jl 2023-04-13 17:50:58.394891391 +0200 -+++ julia-1.8.3-patch/base/mpfr.jl 2023-04-13 20:42:52.551833467 +0200 -@@ -16,7 +16,8 @@ - cosh, sinh, tanh, sech, csch, coth, acosh, asinh, atanh, lerpi, - cbrt, typemax, typemin, unsafe_trunc, floatmin, floatmax, rounding, - setrounding, maxintfloat, widen, significand, frexp, tryparse, iszero, -- isone, big, _string_n, decompose -+ isone, big, _string_n, decompose, minmax, -+ sinpi, cospi, sincospi, sind, cosd, tand, asind, acosd, atand - - import ..Rounding: rounding_raw, setrounding_raw - -@@ -745,7 +746,7 @@ - end - - # Functions for which NaN results are converted to DomainError, following Base --for f in (:sin, :cos, :tan, :sec, :csc, :acos, :asin, :atan, :acosh, :asinh, :atanh) -+for f in (:sin, :cos, :tan, :sec, :csc, :acos, :asin, :atan, :acosh, :asinh, :atanh, :sinpi, :cospi) - @eval begin - function ($f)(x::BigFloat) - isnan(x) && return x -@@ -756,6 +757,7 @@ - end - end - end -+sincospi(x::BigFloat) = (sinpi(x), cospi(x)) - - function atan(y::BigFloat, x::BigFloat) - z = BigFloat() -@@ -763,6 +765,32 @@ - return z - end - -+# degree functions -+for f in (:sin, :cos, :tan) -+ @eval begin -+ function ($(Symbol(f,:d)))(x::BigFloat) -+ isnan(x) && return x -+ z = BigFloat() -+ ccall(($(string(:mpfr_,f,:u)), :libmpfr), Int32, (Ref{BigFloat}, Ref{BigFloat}, Culong, MPFRRoundingMode), z, x, 360, ROUNDING_MODE[]) -+ isnan(z) && throw(DomainError(x, "NaN result for non-NaN input.")) -+ return z -+ end -+ function ($(Symbol(:a,f,:d)))(x::BigFloat) -+ isnan(x) && return x -+ z = BigFloat() -+ ccall(($(string(:mpfr_a,f,:u)), :libmpfr), Int32, (Ref{BigFloat}, Ref{BigFloat}, Culong, MPFRRoundingMode), z, x, 360, ROUNDING_MODE[]) -+ isnan(z) && throw(DomainError(x, "NaN result for non-NaN input.")) -+ return z -+ end -+ end -+end -+function atand(y::BigFloat, x::BigFloat) -+ z = BigFloat() -+ ccall((:mpfr_atan2u, :libmpfr), Int32, (Ref{BigFloat}, Ref{BigFloat}, Ref{BigFloat}, Culong, MPFRRoundingMode), z, y, x, 360, ROUNDING_MODE[]) -+ return z -+end -+ -+ - # Utility functions - ==(x::BigFloat, y::BigFloat) = ccall((:mpfr_equal_p, :libmpfr), Int32, (Ref{BigFloat}, Ref{BigFloat}), x, y) != 0 - <=(x::BigFloat, y::BigFloat) = ccall((:mpfr_lessequal_p, :libmpfr), Int32, (Ref{BigFloat}, Ref{BigFloat}), x, y) != 0 -@@ -1018,7 +1046,7 @@ - isfinite(x) || return string(Float64(x)) - _prettify_bigfloat(string_mpfr(x, fmt)) - end --_string(x::BigFloat) = _string(x, "%.Re") -+_string(x::BigFloat) = _string(x, "%Re") - _string(x::BigFloat, k::Integer) = _string(x, "%.$(k)Re") - - string(b::BigFloat) = _string(b) -diff -ur julia-1.8.3-orig/test/math.jl julia-1.8.3-patch/test/math.jl ---- julia-1.8.3-orig/test/math.jl 2023-04-13 17:50:58.382891276 +0200 -+++ julia-1.8.3-patch/test/math.jl 2023-04-13 21:13:55.377279761 +0200 -@@ -411,47 +411,51 @@ - @test rad2deg(pi + (pi/3)*im) ≈ 180 + 60im - end - -+# ensure zeros are signed the same -+⩲(x,y) = typeof(x) == typeof(y) && x == y && signbit(x) == signbit(y) -+⩲(x::Tuple, y::Tuple) = length(x) == length(y) && all(map(⩲,x,y)) -+ - @testset "degree-based trig functions" begin -- @testset "$T" for T = (Float32,Float64,Rational{Int}) -+ @testset "$T" for T = (Float32,Float64,Rational{Int},BigFloat) - fT = typeof(float(one(T))) - fTsc = typeof( (float(one(T)), float(one(T))) ) - for x = -400:40:400 -- @test sind(convert(T,x))::fT ≈ convert(fT,sin(pi/180*x)) atol=eps(deg2rad(convert(fT,x))) -- @test cosd(convert(T,x))::fT ≈ convert(fT,cos(pi/180*x)) atol=eps(deg2rad(convert(fT,x))) -+ @test sind(convert(T,x))::fT ≈ sin(pi*convert(fT,x)/180) atol=eps(deg2rad(convert(fT,x))) -+ @test cosd(convert(T,x))::fT ≈ cos(pi*convert(fT,x)/180) atol=eps(deg2rad(convert(fT,x))) - - s,c = sincosd(convert(T,x)) -- @test s::fT ≈ convert(fT,sin(pi/180*x)) atol=eps(deg2rad(convert(fT,x))) -- @test c::fT ≈ convert(fT,cos(pi/180*x)) atol=eps(deg2rad(convert(fT,x))) -+ @test s::fT ≈ sin(pi*convert(fT,x)/180) atol=eps(deg2rad(convert(fT,x))) -+ @test c::fT ≈ cos(pi*convert(fT,x)/180) atol=eps(deg2rad(convert(fT,x))) - end - @testset "sind" begin -- @test sind(convert(T,0.0))::fT === zero(fT) -- @test sind(convert(T,180.0))::fT === zero(fT) -- @test sind(convert(T,360.0))::fT === zero(fT) -- T != Rational{Int} && @test sind(convert(T,-0.0))::fT === -zero(fT) -- @test sind(convert(T,-180.0))::fT === -zero(fT) -- @test sind(convert(T,-360.0))::fT === -zero(fT) -+ @test sind(convert(T,0.0))::fT ⩲ zero(fT) -+ @test sind(convert(T,180.0))::fT ⩲ zero(fT) -+ @test sind(convert(T,360.0))::fT ⩲ zero(fT) -+ T != Rational{Int} && @test sind(convert(T,-0.0))::fT ⩲ -zero(fT) -+ @test sind(convert(T,-180.0))::fT ⩲ -zero(fT) -+ @test sind(convert(T,-360.0))::fT ⩲ -zero(fT) - if T <: AbstractFloat - @test isnan(sind(T(NaN))) - end - end - @testset "cosd" begin -- @test cosd(convert(T,90))::fT === zero(fT) -- @test cosd(convert(T,270))::fT === zero(fT) -- @test cosd(convert(T,-90))::fT === zero(fT) -- @test cosd(convert(T,-270))::fT === zero(fT) -+ @test cosd(convert(T,90))::fT ⩲ zero(fT) -+ @test cosd(convert(T,270))::fT ⩲ zero(fT) -+ @test cosd(convert(T,-90))::fT ⩲ zero(fT) -+ @test cosd(convert(T,-270))::fT ⩲ zero(fT) - if T <: AbstractFloat - @test isnan(cosd(T(NaN))) - end - end - @testset "sincosd" begin -- @test sincosd(convert(T,-360))::fTsc === ( -zero(fT), one(fT) ) -- @test sincosd(convert(T,-270))::fTsc === ( one(fT), zero(fT) ) -- @test sincosd(convert(T,-180))::fTsc === ( -zero(fT), -one(fT) ) -- @test sincosd(convert(T, -90))::fTsc === ( -one(fT), zero(fT) ) -- @test sincosd(convert(T, 0))::fTsc === ( zero(fT), one(fT) ) -- @test sincosd(convert(T, 90))::fTsc === ( one(fT), zero(fT) ) -- @test sincosd(convert(T, 180))::fTsc === ( zero(fT), -one(fT) ) -- @test sincosd(convert(T, 270))::fTsc === ( -one(fT), zero(fT) ) -+ @test sincosd(convert(T,-360))::fTsc ⩲ ( -zero(fT), one(fT) ) -+ @test sincosd(convert(T,-270))::fTsc ⩲ ( one(fT), zero(fT) ) -+ @test sincosd(convert(T,-180))::fTsc ⩲ ( -zero(fT), -one(fT) ) -+ @test sincosd(convert(T, -90))::fTsc ⩲ ( -one(fT), zero(fT) ) -+ @test sincosd(convert(T, 0))::fTsc ⩲ ( zero(fT), one(fT) ) -+ @test sincosd(convert(T, 90))::fTsc ⩲ ( one(fT), zero(fT) ) -+ @test sincosd(convert(T, 180))::fTsc ⩲ ( zero(fT), -one(fT) ) -+ @test sincosd(convert(T, 270))::fTsc ⩲ ( -one(fT), zero(fT) ) - if T <: AbstractFloat - @test_throws DomainError sincosd(T(Inf)) - @test all(isnan.(sincosd(T(NaN)))) -@@ -463,22 +467,22 @@ - "sincospi" => (x->sincospi(x)[1], x->sincospi(x)[2]) - ) - @testset "pi * $x" for x = -3:0.3:3 -- @test sinpi(convert(T,x))::fT ≈ convert(fT,sin(pi*x)) atol=eps(pi*convert(fT,x)) -- @test cospi(convert(T,x))::fT ≈ convert(fT,cos(pi*x)) atol=eps(pi*convert(fT,x)) -+ @test sinpi(convert(T,x))::fT ≈ sin(pi*convert(fT,x)) atol=eps(pi*convert(fT,x)) -+ @test cospi(convert(T,x))::fT ≈ cos(pi*convert(fT,x)) atol=eps(pi*convert(fT,x)) - end - -- @test sinpi(convert(T,0.0))::fT === zero(fT) -- @test sinpi(convert(T,1.0))::fT === zero(fT) -- @test sinpi(convert(T,2.0))::fT === zero(fT) -- T != Rational{Int} && @test sinpi(convert(T,-0.0))::fT === -zero(fT) -- @test sinpi(convert(T,-1.0))::fT === -zero(fT) -- @test sinpi(convert(T,-2.0))::fT === -zero(fT) -+ @test sinpi(convert(T,0.0))::fT ⩲ zero(fT) -+ @test sinpi(convert(T,1.0))::fT ⩲ zero(fT) -+ @test sinpi(convert(T,2.0))::fT ⩲ zero(fT) -+ T != Rational{Int} && @test sinpi(convert(T,-0.0))::fT ⩲ -zero(fT) -+ @test sinpi(convert(T,-1.0))::fT ⩲ -zero(fT) -+ @test sinpi(convert(T,-2.0))::fT ⩲ -zero(fT) - @test_throws DomainError sinpi(convert(T,Inf)) - -- @test cospi(convert(T,0.5))::fT === zero(fT) -- @test cospi(convert(T,1.5))::fT === zero(fT) -- @test cospi(convert(T,-0.5))::fT === zero(fT) -- @test cospi(convert(T,-1.5))::fT === zero(fT) -+ @test cospi(convert(T,0.5))::fT ⩲ zero(fT) -+ @test cospi(convert(T,1.5))::fT ⩲ zero(fT) -+ @test cospi(convert(T,-0.5))::fT ⩲ zero(fT) -+ @test cospi(convert(T,-1.5))::fT ⩲ zero(fT) - @test_throws DomainError cospi(convert(T,Inf)) - end - @testset "Check exact values" begin -@@ -489,8 +493,8 @@ - @test sincospi(one(T)/convert(T,6))[1] == 0.5 - @test_throws DomainError sind(convert(T,Inf)) - @test_throws DomainError cosd(convert(T,Inf)) -- T != Float32 && @test cospi(one(T)/convert(T,3)) == 0.5 -- T != Float32 && @test sincospi(one(T)/convert(T,3))[2] == 0.5 -+ fT == Float64 && @test isapprox(cospi(one(T)/convert(T,3)), 0.5) -+ fT == Float64 && @test isapprox(sincospi(one(T)/convert(T,3))[2], 0.5) - T == Rational{Int} && @test sinpi(5//6) == 0.5 - T == Rational{Int} && @test sincospi(5//6)[1] == 0.5 - end -@@ -538,8 +542,8 @@ - end - end - end -- @test @inferred(sinc(0//1)) === 1.0 -- @test @inferred(cosc(0//1)) === -0.0 -+ @test @inferred(sinc(0//1)) ⩲ 1.0 -+ @test @inferred(cosc(0//1)) ⩲ -0.0 - - # test right before/after thresholds of Taylor series - @test sinc(0.001) ≈ 0.999998355066745 rtol=1e-15 base-commit: f5449685143be0805a8a9b54ddecee94e368c6e9 -- 2.46.0
guix-patches <at> gnu.org
:bug#73197
; Package guix-patches
.
(Mon, 16 Sep 2024 07:52:02 GMT) Full text and rfc822 format available.Message #8 received at 73197 <at> debbugs.gnu.org (full text, mbox):
From: Efraim Flashner <efraim <at> flashner.co.il> To: Ludovic Courtès <ludo <at> gnu.org> Cc: 73197 <at> debbugs.gnu.org, Ludovic Courtès <ludovic.courtes <at> inria.fr>, Philippe Virouleau <philippe.virouleau <at> inria.fr>, Simon Tournier <zimon.toutoune <at> gmail.com> Subject: Re: [bug#73197] [PATCH] gnu: julia: Update to 1.9.3. Date: Mon, 16 Sep 2024 10:50:22 +0300
[Message part 1 (text/plain, inline)]
On Thu, Sep 12, 2024 at 03:22:50PM +0200, Ludovic Courtès wrote: > From: Ludovic Courtès <ludovic.courtes <at> inria.fr> > > * gnu/packages/julia.scm (julia): Update to 1.9.3. > [arguments]: Use gexps. > [inputs, native-inputs]: Remove labels. > * gnu/packages/llvm.scm (llvm-julia): Rename to… > (llvm-14-julia): … this. Upgrade to 14.0.6-3. > * gnu/packages/patches/julia-1.9-build-tweaks.patch: New file. > * gnu/packages/patches/julia-Use-MPFR-4.2.patch: Remove. > * gnu/local.mk (dist_patch_DATA): Adjust accordingly. > > Co-authored-by: Philippe Virouleau <philippe.virouleau <at> inria.fr> > Change-Id: I6ef35c6cd31741a7725b50364dd0f8fa6a0c6424 > --- > gnu/local.mk | 2 +- > gnu/packages/julia.scm | 862 ++++++++++-------- > gnu/packages/llvm.scm | 38 +- > .../patches/julia-1.9-build-tweaks.patch | 152 +++ > gnu/packages/patches/julia-Use-MPFR-4.2.patch | 228 ----- > 5 files changed, 651 insertions(+), 631 deletions(-) > create mode 100644 gnu/packages/patches/julia-1.9-build-tweaks.patch > delete mode 100644 gnu/packages/patches/julia-Use-MPFR-4.2.patch > > Hello comrades! > > Here is an update of Julia adapted from: > > https://gitlab.inria.fr/guix-hpc/guix-hpc/-/commit/eb83e466fe0b9492216abc46da26ec3a89b0a946 > > Version 1.9.3 has been in the guix-hpc channel for a while. It’s not > the latest version, not even the latest series, but it’s an improvement > over what we have. > > Thoughts? > > Ludo’. I tested it out on my machines and it built without problems on x86_64 and aarch64. However, I was unable to compile the julia packages we have when there were some julia inputs. Do we want to add it in as julia-next, and then we can continue pushing the version forward and working on the package build failures separately? -- Efraim Flashner <efraim <at> flashner.co.il> רנשלפ םירפא GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted
[signature.asc (application/pgp-signature, inline)]
guix-patches <at> gnu.org
:bug#73197
; Package guix-patches
.
(Mon, 16 Sep 2024 09:48:01 GMT) Full text and rfc822 format available.Message #11 received at 73197 <at> debbugs.gnu.org (full text, mbox):
From: Ludovic Courtès <ludo <at> gnu.org> To: Efraim Flashner <efraim <at> flashner.co.il> Cc: 73197 <at> debbugs.gnu.org, Philippe Virouleau <philippe.virouleau <at> inria.fr>, Simon Tournier <zimon.toutoune <at> gmail.com> Subject: Re: [bug#73197] [PATCH] gnu: julia: Update to 1.9.3. Date: Mon, 16 Sep 2024 11:47:02 +0200
Hey Efraim, Efraim Flashner <efraim <at> flashner.co.il> skribis: > I tested it out on my machines and it built without problems on x86_64 > and aarch64. However, I was unable to compile the julia packages we have > when there were some julia inputs. > > Do we want to add it in as julia-next, and then we can continue pushing > the version forward and working on the package build failures separately? Oh, good question. I was hoping to get some testing from ci.guix.gnu.org but it hasn’t happened yet (I added a jobset but apparently that didn’t work). I would hope we can migrate straight to 1.9, but if that’s too tricky, I agree we should follow the plan you describe. Let me take a look at those failure to see how bad it is. Thanks, Ludo’.
guix-patches <at> gnu.org
:bug#73197
; Package guix-patches
.
(Fri, 20 Sep 2024 16:12:04 GMT) Full text and rfc822 format available.Message #14 received at 73197 <at> debbugs.gnu.org (full text, mbox):
From: Simon Tournier <zimon.toutoune <at> gmail.com> To: Ludovic Courtès <ludo <at> gnu.org>, Efraim Flashner <efraim <at> flashner.co.il> Cc: 73197 <at> debbugs.gnu.org, Philippe Virouleau <philippe.virouleau <at> inria.fr> Subject: Re: [bug#73197] [PATCH] gnu: julia: Update to 1.9.3. Date: Fri, 20 Sep 2024 17:29:41 +0200
Hi Ludo, On lun., 16 sept. 2024 at 11:47, Ludovic Courtès <ludo <at> gnu.org> wrote: > I would hope we can migrate straight to 1.9, but if that’s too tricky, I > agree we should follow the plan you describe. > > Let me take a look at those failure to see how bad it is. I would suggest to have julia-next. And some ’package-with-julia’ transformation similar as package-with-python or package-with-ocaml. Somehow, that’s always painful to upgrade Julia because of the Julia world rebuild and some (more than some?) package breakages. That way it would easier to have the CI following the branch team-julia where regular package would go, as well as julia-next upgrade. And the manifest could build both set of packages (julia and julia-next) using the transformation. Users willing stable just install ’julia’ and ’julia-’ packages. Adventurous users install ’julia-next’ and ’julia-*-next’. WDYT? Cheers, simon
guix-patches <at> gnu.org
:bug#73197
; Package guix-patches
.
(Sun, 22 Sep 2024 07:26:02 GMT) Full text and rfc822 format available.Message #17 received at 73197 <at> debbugs.gnu.org (full text, mbox):
From: Efraim Flashner <efraim <at> flashner.co.il> To: Simon Tournier <zimon.toutoune <at> gmail.com> Cc: 73197 <at> debbugs.gnu.org, Ludovic Courtès <ludo <at> gnu.org>, Philippe Virouleau <philippe.virouleau <at> inria.fr> Subject: Re: [bug#73197] [PATCH] gnu: julia: Update to 1.9.3. Date: Sun, 22 Sep 2024 10:24:03 +0300
[Message part 1 (text/plain, inline)]
On Fri, Sep 20, 2024 at 05:29:41PM +0200, Simon Tournier wrote: > Hi Ludo, > > On lun., 16 sept. 2024 at 11:47, Ludovic Courtès <ludo <at> gnu.org> wrote: > > > I would hope we can migrate straight to 1.9, but if that’s too tricky, I > > agree we should follow the plan you describe. > > > > Let me take a look at those failure to see how bad it is. > > I would suggest to have julia-next. > > And some ’package-with-julia’ transformation similar as > package-with-python or package-with-ocaml. > > Somehow, that’s always painful to upgrade Julia because of the Julia > world rebuild and some (more than some?) package breakages. > > That way it would easier to have the CI following the branch team-julia > where regular package would go, as well as julia-next upgrade. And the > manifest could build both set of packages (julia and julia-next) using > the transformation. > > Users willing stable just install ’julia’ and ’julia-’ packages. > Adventurous users install ’julia-next’ and ’julia-*-next’. > > WDYT? The problem is that the julia-build-system needs to be adapted to the newer versions of Julia. IMO the benefit of having Julia and Julia-next is that the julia-* packages are packaged, but those needing a newer version of Julia can still get it from Guix. Then when we adapt the julia-build-system we can deprecate julia-next, or have it point to the next release. -- Efraim Flashner <efraim <at> flashner.co.il> רנשלפ םירפא GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted
[signature.asc (application/pgp-signature, inline)]
guix-patches <at> gnu.org
:bug#73197
; Package guix-patches
.
(Mon, 06 Jan 2025 15:45:02 GMT) Full text and rfc822 format available.Message #20 received at 73197 <at> debbugs.gnu.org (full text, mbox):
From: Simon Tournier <zimon.toutoune <at> gmail.com> To: Efraim Flashner <efraim <at> flashner.co.il> Cc: 73197 <at> debbugs.gnu.org, Ludovic Courtès <ludo <at> gnu.org>, Philippe Virouleau <philippe.virouleau <at> inria.fr> Subject: Re: [bug#73197] [PATCH] gnu: julia: Update to 1.9.3. Date: Mon, 06 Jan 2025 16:43:23 +0100
Hi, I am resuming this patch. And I would like to have it merge before the end of this month. In other words, I would like to mention this update in the Guix HPC annual report. On Sun, 22 Sep 2024 at 10:24, Efraim Flashner <efraim <at> flashner.co.il> wrote: >> > Let me take a look at those failure to see how bad it is. Could we have a julia-team branch and that branch built by CI? It would help by saving some resources. From my numbers, ~230 Julia packages fail. Over ~300 packages. >> I would suggest to have julia-next. [...] >> Users willing stable just install ’julia’ and ’julia-’ packages. >> Adventurous users install ’julia-next’ and ’julia-*-next’. > The problem is that the julia-build-system needs to be adapted to the > newer versions of Julia. Yes, you have the same with all *-next “compilers” applied to their packages: emacs-next, ghc-next, guile-next or python-next. Somehow, there is no guarantee that the python-build-system works equally for both python and python-next, and there is no guarantee neither that python-* packages build with python-next as Python “compiler”. Somehow, there is the stable and the adventurous. :-) Well, let keep that aside and let rediscuss it again for Julia 1.10 or 1.11 and let focus on making Julia 1.9.3 the default. Please note that we already have a Julia package that’s half packaged: julia-precompiletools. The test suite fails because the julia-build-system has not been adapted yet. :-) Cheers, simon
guix-patches <at> gnu.org
:bug#73197
; Package guix-patches
.
(Wed, 08 Jan 2025 10:45:01 GMT) Full text and rfc822 format available.Message #23 received at 73197 <at> debbugs.gnu.org (full text, mbox):
From: Ludovic Courtès <ludovic.courtes <at> inria.fr> To: Simon Tournier <zimon.toutoune <at> gmail.com> Cc: 73197 <at> debbugs.gnu.org, Efraim Flashner <efraim <at> flashner.co.il>, Philippe Virouleau <philippe.virouleau <at> inria.fr> Subject: Re: [bug#73197] [PATCH] gnu: julia: Update to 1.9.3. Date: Wed, 08 Jan 2025 11:44:08 +0100
Hello, Simon Tournier <zimon.toutoune <at> gmail.com> skribis: > I am resuming this patch. And I would like to have it merge before the > end of this month. In other words, I would like to mention this update > in the Guix HPC annual report. Excellent. :-) > Could we have a julia-team branch and that branch built by CI? It would > help by saving some resources. This branch is built already: <https://ci.guix.gnu.org/jobset/julia-upgrade>. > From my numbers, ~230 Julia packages fail. Over ~300 packages. [...] >> The problem is that the julia-build-system needs to be adapted to the >> newer versions of Julia. To be clear, the build failures here have to do with JULIA_LOAD_PATH or JULIA_DEPOT_PATH somehow not being set to the right value. (That’s why roughly packages with no dependency other than Julia build fine, while those that depend on other julia-* packages fails to build.) I’ve rebased the branch and added debugging helpers I was using. Protip: when fiddling with the ‘julia’ package, use ‘--without-tests=julia’. :-) HTH! Ludo’.
guix-patches <at> gnu.org
:bug#73197
; Package guix-patches
.
(Mon, 13 Jan 2025 18:32:01 GMT) Full text and rfc822 format available.Message #26 received at 73197 <at> debbugs.gnu.org (full text, mbox):
From: Simon Tournier <zimon.toutoune <at> gmail.com> To: Ludovic Courtès <ludovic.courtes <at> inria.fr> Cc: 73197 <at> debbugs.gnu.org, Efraim Flashner <efraim <at> flashner.co.il>, Philippe Virouleau <philippe.virouleau <at> inria.fr> Subject: Re: [bug#73197] [PATCH] gnu: julia: Update to 1.9.3. Date: Mon, 13 Jan 2025 19:31:16 +0100
Hi Ludo, On Wed, 08 Jan 2025 at 11:44, Ludovic Courtès <ludovic.courtes <at> inria.fr> wrote: > This branch is built already: > <https://ci.guix.gnu.org/jobset/julia-upgrade>. Thanks, cool! >>> The problem is that the julia-build-system needs to be adapted to the >>> newer versions of Julia. > > To be clear, the build failures here have to do with JULIA_LOAD_PATH or > JULIA_DEPOT_PATH somehow not being set to the right value. (That’s why > roughly packages with no dependency other than Julia build fine, while > those that depend on other julia-* packages fails to build.) It appears to me more complicated than only JULIA_LOAD_PATH and/or JULIA_DEPOT_PATH. When I sent the email, I also was thinking something in this area. Then it took me some time to understand what’s wrong. :-) For the record, it’s about base/loading.jl: --8<---------------cut here---------------start------------->8--- try toplevel_load[] = false # perform the search operation to select the module file require intends to load - path = locate_package(pkg) + path = locate_package(pkg, env) if path === nothing throw(ArgumentError(""" Package $pkg is required but does not seem to be installed: --8<---------------cut here---------------end--------------->8--- My debugging session if someone has a good fix for that. :-) Well, I instructed the ’precompile’ phase of the julia-build-system in order to better see; here the trace: --8<---------------cut here---------------start------------->8--- starting phase `precompile' (init)JULIA_DEPOT_PATH: "/gnu/store/acvkqdyipdrsa5jrzb185ch37iyliw13-julia-1.9.3/share/julia/:/gnu/store/iiykv7r9ckygxlz0qb9aag5zv317ffz9-julia-constructionbase-1.3.0/share/julia/" (init)JULIA_LOAD_PATH: "/gnu/store/iiykv7r9ckygxlz0qb9aag5zv317ffz9-julia-constructionbase-1.3.0/share/julia/loadpath/" JULIA_DEPOT_PATH: "/gnu/store/acvkqdyipdrsa5jrzb185ch37iyliw13-julia-1.9.3/share/julia/:/gnu/store/iiykv7r9ckygxlz0qb9aag5zv317ffz9-julia-constructionbase-1.3.0/share/julia/:/gnu/store/p6iq6pkc04lj8c43n5a2s058s3ng6rkc-julia-unitful-1.12.2/share/julia/" JULIA_LOAD_PATH: "/gnu/store/p6iq6pkc04lj8c43n5a2s058s3ng6rkc-julia-unitful-1.12.2/share/julia/loadpath/:/gnu/store/iiykv7r9ckygxlz0qb9aag5zv317ffz9-julia-constructionbase-1.3.0/share/julia/loadpath/" (before)DEPOT_PATH: ["/homeless-shelter/.julia", "/gnu/store/acvkqdyipdrsa5jrzb185ch37iyliw13-julia-1.9.3/local/share/julia", "/gnu/store/acvkqdyipdrsa5jrzb185ch37iyliw13-julia-1.9.3/share/julia", "/gnu/store/acvkqdyipdrsa5jrzb185ch37iyliw13-julia-1.9.3/share/julia/", "/gnu/store/iiykv7r9ckygxlz0qb9aag5zv317ffz9-julia-constructionbase-1.3.0/share/julia/", "/gnu/store/p6iq6pkc04lj8c43n5a2s058s3ng6rkc-julia-unitful-1.12.2/share/julia/"] (before)LOAD_PATH: ["@", "@v#.#", "@stdlib", "/gnu/store/p6iq6pkc04lj8c43n5a2s058s3ng6rkc-julia-unitful-1.12.2/share/julia/loadpath/", "/gnu/store/iiykv7r9ckygxlz0qb9aag5zv317ffz9-julia-constructionbase-1.3.0/share/julia/loadpath/"] IDENTIFY_PACKAGE_ENV: (ConstructionBase [187b0558-2788-49d3-abe0-74a17ed4e7c9], "/gnu/store/iiykv7r9ckygxlz0qb9aag5zv317ffz9-julia-constructionbase-1.3.0/share/julia/loadpath/") LOCATE_PACKAGE: /gnu/store/iiykv7r9ckygxlz0qb9aag5zv317ffz9-julia-constructionbase-1.3.0/share/julia/loadpath/ConstructionBase/src/ConstructionBase.jl DEPOT_PATH: ["/gnu/store/p6iq6pkc04lj8c43n5a2s058s3ng6rkc-julia-unitful-1.12.2/share/julia/", "/homeless-shelter/.julia", "/gnu/store/acvkqdyipdrsa5jrzb185ch37iyliw13-julia-1.9.3/local/share/julia", "/gnu/store/acvkqdyipdrsa5jrzb185ch37iyliw13-julia-1.9.3/share/julia", "/gnu/store/acvkqdyipdrsa5jrzb185ch37iyliw13-julia-1.9.3/share/julia/", "/gnu/store/iiykv7r9ckygxlz0qb9aag5zv317ffz9-julia-constructionbase-1.3.0/share/julia/"] LOAD_PATH: ["/gnu/store/p6iq6pkc04lj8c43n5a2s058s3ng6rkc-julia-unitful-1.12.2/share/julia/environments/v1.9/Project.toml", "/gnu/store/acvkqdyipdrsa5jrzb185ch37iyliw13-julia-1.9.3/share/julia/stdlib/v1.9", "/gnu/store/p6iq6pkc04lj8c43n5a2s058s3ng6rkc-julia-unitful-1.12.2/share/julia/loadpath/", "/gnu/store/iiykv7r9ckygxlz0qb9aag5zv317ffz9-julia-constructionbase-1.3.0/share/julia/loadpath/"] PKG: Unitful [1986cc42-f94f-5a68-af5c-568840ba703d] ENV: /gnu/store/p6iq6pkc04lj8c43n5a2s058s3ng6rkc-julia-unitful-1.12.2/share/julia/loadpath/ PATH: /gnu/store/p6iq6pkc04lj8c43n5a2s058s3ng6rkc-julia-unitful-1.12.2/share/julia/loadpath/Unitful/src/Unitful.jl PKG: ConstructionBase [187b0558-2788-49d3-abe0-74a17ed4e7c9] ENV: /gnu/store/p6iq6pkc04lj8c43n5a2s058s3ng6rkc-julia-unitful-1.12.2/share/julia/loadpath/ PATH: nothing ERROR: LoadError: ArgumentError: Package ConstructionBase [187b0558-2788-49d3-abe0-74a17ed4e7c9] is required but does not seem to be installed: - Run `Pkg.instantiate()` to install all recorded dependencies. --8<---------------cut here---------------end--------------->8--- Indeed, it cannot find ’ConstructionBase’ under the “environment” of ’Unitful’ although it clearly appears both via LOAD_PATH (JULIA_LOAD_PATH) and DEPOT_PATH (JULIA_DEPOT_PATH). Well, Julia package management is designed to have one central place (usually ~/.julia), arf! I will try to be creative if no one beats me. :-) To be continued… Cheers, simon
guix-patches <at> gnu.org
:bug#73197
; Package guix-patches
.
(Fri, 14 Feb 2025 18:09:01 GMT) Full text and rfc822 format available.Message #29 received at 73197 <at> debbugs.gnu.org (full text, mbox):
From: Simon Tournier <zimon.toutoune <at> gmail.com> To: Ludovic Courtès <ludovic.courtes <at> inria.fr> Cc: 73197 <at> debbugs.gnu.org, Efraim Flashner <efraim <at> flashner.co.il>, Philippe Virouleau <philippe.virouleau <at> inria.fr> Subject: Re: [bug#73197] [PATCH] gnu: julia: Update to 1.9.3. Date: Fri, 14 Feb 2025 16:22:15 +0100
[Message part 1 (text/plain, inline)]
Hi, On Mon, 13 Jan 2025 at 19:31, Simon Tournier <zimon.toutoune <at> gmail.com> wrote: > For the record, it’s about base/loading.jl: > > --8<---------------cut here---------------start------------->8--- > try > toplevel_load[] = false > # perform the search operation to select the module file require intends to load > - path = locate_package(pkg) > + path = locate_package(pkg, env) > if path === nothing > throw(ArgumentError(""" > Package $pkg is required but does not seem to be installed: > --8<---------------cut here---------------end--------------->8--- Welcome to a debugging session using the most advanced technique: print! :-) Attached the base/loading.jl with many ’println’. Well, that’s very interesting because it seems related to some Julia internals. Somehow, the order of LOAD_PATH matters! In all the dance, the code enters once and it founds it! --8<---------------cut here---------------start------------->8--- ENTRY _require: Call locate_package( ConstructionBase [187b0558-2788-49d3-abe0-74a17ed4e7c9] , /gnu/store/garmz1dz382ib25p2ckl0kj9rjay4xd4-julia-unitful-1.12.2/share/julia/loadpath/ ) [...] RESULT _require: path = /gnu/store/yg4bz2kb7dqb6haaj0v7hj4mrd8rn27l-julia-constructionbase-1.3.0/share/julia/loadpath/ConstructionBase/src/ConstructionBase.jl --8<---------------cut here---------------end--------------->8--- Then, it enters later with the same call… And bang! --8<---------------cut here---------------start------------->8--- ENTRY _require: Call locate_package( ConstructionBase [187b0558-2788-49d3-abe0-74a17ed4e7c9] , /gnu/store/garmz1dz382ib25p2ckl0kj9rjay4xd4-julia-unitful-1.12.2/share/julia/loadpath/ ) [...] RESULT _require: path = nothing ERROR: LoadError: ArgumentError: Package ConstructionBase [187b0558-2788-49d3-abe0-74a17ed4e7c9] is required but does not seem to be installed: - Run `Pkg.instantiate()` to install all recorded dependencies. --8<---------------cut here---------------end--------------->8--- What’s different? The call loops over load_path(), something like: --8<---------------cut here---------------start------------->8--- locate_package_env: START LOOP; over load_path() = ["/gnu/store/garmz1dz382ib25p2ckl0kj9rjay4xd4-julia-unitful-1.12.2/share/julia/environments/v1.9/Project.toml", "/gnu/store/cp0fbzd4j1znnp4fjpsknap0ksnp2xk1-julia-1.9.3/share/julia/stdlib/v1.9", "/gnu/store/yg4bz2kb7dqb6haaj0v7hj4mrd8rn27l-julia-constructionbase-1.3.0/share/julia/loadpath/", "/gnu/store/garmz1dz382ib25p2ckl0kj9rjay4xd4-julia-unitful-1.12.2/share/julia/loadpath/"] locate_package_env: loop = 1 locate_package_env: env = /gnu/store/garmz1dz382ib25p2ckl0kj9rjay4xd4-julia-unitful-1.12.2/share/julia/environments/v1.9/Project.toml locate_package_env: path = nothing locate_package_env: loop = 2 locate_package_env: env = /gnu/store/cp0fbzd4j1znnp4fjpsknap0ksnp2xk1-julia-1.9.3/share/julia/stdlib/v1.9 locate_package_env: path = nothing locate_package_env: loop = 3 locate_package_env: env = /gnu/store/yg4bz2kb7dqb6haaj0v7hj4mrd8rn27l-julia-constructionbase-1.3.0/share/julia/loadpath/ locate_package_env: path = /gnu/store/yg4bz2kb7dqb6haaj0v7hj4mrd8rn27l-julia-constructionbase-1.3.0/share/julia/loadpath/ConstructionBase/src/ConstructionBase.jl --8<---------------cut here---------------end--------------->8--- And for the second case, tandam! --8<---------------cut here---------------start------------->8--- locate_package_env: START LOOP; over load_path() = ["/tmp/.julia/environments/v1.9/Project.toml", "/gnu/store/cp0fbzd4j1znnp4fjpsknap0ksnp2xk1-julia-1.9.3/share/julia/stdlib/v1.9", "/gnu/store/garmz1dz382ib25p2ckl0kj9rjay4xd4-julia-unitful-1.12.2/share/julia/loadpath/", "/gnu/store/yg4bz2kb7dqb6haaj0v7hj4mrd8rn27l-julia-constructionbase-1.3.0/share/julia/loadpath/"] locate_package_env: loop = 1 locate_package_env: env = /tmp/.julia/environments/v1.9/Project.toml locate_package_env: path = nothing locate_package_env: loop = 2 locate_package_env: env = /gnu/store/cp0fbzd4j1znnp4fjpsknap0ksnp2xk1-julia-1.9.3/share/julia/stdlib/v1.9 locate_package_env: path = nothing locate_package_env: loop = 3 locate_package_env: env = /gnu/store/garmz1dz382ib25p2ckl0kj9rjay4xd4-julia-unitful-1.12.2/share/julia/loadpath/ locate_package_env: path = nothing locate_package_env: BREAK: /gnu/store/garmz1dz382ib25p2ckl0kj9rjay4xd4-julia-unitful-1.12.2/share/julia/loadpath/ == /gnu/store/garmz1dz382ib25p2ckl0kj9rjay4xd4-julia-unitful-1.12.2/share/julia/loadpath/ locate_package_env: : loading_extension = false locate_package_env: : precompiling_extension = false locate_package_env: END LOOP locate_package_env: pkg = ConstructionBase [187b0558-2788-49d3-abe0-74a17ed4e7c9] locate_package_env: Sys.STDLIB = /gnu/store/cp0fbzd4j1znnp4fjpsknap0ksnp2xk1-julia-1.9.3/share/julia/stdlib/v1.9 locate_package_env: Call manifest_uuid_path( /gnu/store/cp0fbzd4j1znnp4fjpsknap0ksnp2xk1-julia-1.9.3/share/julia/stdlib/v1.9 , ConstructionBase [187b0558-2788-49d3-abe0-74a17ed4e7c9] ) locate_package_env: mbypath = nothing String? false locate_package_env: RETURN: path = nothing ; env = /gnu/store/garmz1dz382ib25p2ckl0kj9rjay4xd4-julia-unitful-1.12.2/share/julia/loadpath/ locate_package: RETURN: nothing _require: Post locate_package( ConstructionBase [187b0558-2788-49d3-abe0-74a17ed4e7c9] , /gnu/store/garmz1dz382ib25p2ckl0kj9rjay4xd4-julia-unitful-1.12.2/share/julia/loadpath/ ) RESULT _require: path = nothing --8<---------------cut here---------------end--------------->8--- The attentive reader notes that load_path() is a list of 4 elements –the last contains what we want– but a test breaks the loop. Well, I do not know the details about the reasons of all that. Maybe something worth to ask upstream. :-) Well, I’ll (force) push shortly a trivial fix to the branch wip-julia-upgrade. Cheers, simon PS: For the record, some elements: 1. Checkout wip-julia-upgrade 2. cp $(./pre-inst-env guix build julia -S) /tmp/ 3. Uncompress the source and copy (e.g., /home/simon/tmp/julia-1.9.3) 4. Tweak the base/loading.jl file (and other as base/initdefs.jl) 5. Use this source with: (source (local-file "/home/simon/tmp/julia-1.9.3" #:recursive? #t)) 6. guix shell -CPNWD guix --expose=/home/simon/tmp/=/home/simon/tmp/ 7. Build: ./pre-inst-env guix build --no-grafts --without-tests=julia julia 8. Tweak guix/build-system/julia-build-system.scm 9. Loop ./pre-inst-env guix build --no-grafts --without-tests=julia julia-unitful Hope that helps. --
[loading.diff (text/x-diff, inline)]
--- /tmp/julia-1.9.3/base/loading.jl 1970-01-01 01:00:01.000000000 +0100 +++ /home/simon/tmp/julia-1.9.3/base/loading.jl 2025-02-14 15:38:59.879047968 +0100 @@ -391,6 +391,7 @@ identify_package(name::String) = _nothing_or_first(identify_package_env(name)) function locate_package_env(pkg::PkgId, stopenv::Union{String, Nothing}=nothing) + println("locate_package_env: ARGS: ", pkg, " , ", stopenv) cache = LOADING_CACHE[] if cache !== nothing pathenv = get(cache.located, (pkg, stopenv), nothing) @@ -399,6 +400,7 @@ path = nothing env′ = nothing if pkg.uuid === nothing + println("locate_package_env: Case: nothing... TODO") for env in load_path() env′ = env # look for the toplevel pkg `pkg.name` in this entry @@ -418,9 +420,18 @@ end end else + println("locate_package_env: pkg = ", pkg) + println("locate_package_env: START LOOP; over load_path() = ", load_path()) + #println("locate_package_env: number of loop", length(load_path)) + loop = 1 for env in load_path() + println("locate_package_env: loop = ", loop) + println("locate_package_env: env = ", env) env′ = env + println("locate_package_env: Call manifest_uuid_path( ", env, " , ", pkg, " )") path = manifest_uuid_path(env, pkg) + println("locate_package_env: Post path = manifest_uuid_path( ", env, " , ", pkg, " )") + println("locate_package_env: path = ", path) # missing is used as a sentinel to stop looking further down in envs if path === missing path = nothing @@ -431,14 +442,27 @@ @goto done end if !(loading_extension || precompiling_extension) + stopenv == env && println("locate_package_env: BREAK: ", stopenv, " == ", env) + stopenv == env && println("locate_package_env: : loading_extension = ", loading_extension) + stopenv == env && println("locate_package_env: : precompiling_extension = ", precompiling_extension) stopenv == env && break end + loop = loop + 1 end + println("locate_package_env: END LOOP; No more env") # Allow loading of stdlibs if the name/uuid are given # e.g. if they have been explicitly added to the project/manifest + println("locate_package_env: pkg = ", pkg) + println("locate_package_env: Sys.STDLIB = ", Sys.STDLIB) + println("locate_package_env: Call manifest_uuid_path( ", Sys.STDLIB, " , ", pkg, " )") mbypath = manifest_uuid_path(Sys.STDLIB, pkg) + println("locate_package_env: Post mbypath = manifest_uuid_path( ", Sys.STDLIB, " , ", pkg, " )") + println("locate_package_env: mbypath = ", mbypath, " String? ", mbypath isa String) if mbypath isa String + println("locate_package_env: Call entry_path( ", mbypath, " , ", pkg.name, " )") path = entry_path(mbypath, pkg.name) + println("locate_package_env: Post path = entry_path( ", mbypath, " , ", pkg.name, " )") + println("locate_package_env: path = ", path) @goto done end end @@ -446,6 +470,7 @@ if cache !== nothing cache.located[(pkg, stopenv)] = path, env′ end + println("locate_package_env: RETURN: path = ", path, " ; env = ", env′) return path, env′ end @@ -464,7 +489,11 @@ ``` """ function locate_package(pkg::PkgId, stopenv::Union{String, Nothing}=nothing)::Union{Nothing,String} - _nothing_or_first(locate_package_env(pkg, stopenv)) + println("locate_package: ARGS: ", pkg, " , ", stopenv) + println("locate_package: Call locate_package_env(", pkg, " , ", stopenv, " )") + ret = _nothing_or_first(locate_package_env(pkg, stopenv)) + println("locate_package: RETURN: ", ret) + return ret end """ @@ -581,9 +610,14 @@ # - `path`: the path of an explicit project file function env_project_file(env::String)::Union{Bool,String} @lock require_lock begin + println("env_project_file: ARGS: ", env) cache = LOADING_CACHE[] if cache !== nothing + println("env_project_file: cache = ", cache) + println("env_project_file: cache.env_project_file = ", cache.env_project_file) project_file = get(cache.env_project_file, env, nothing) + println("env_project_file: project_file = ", project_file) + project_file === nothing || println("env_project_file: RETURN: ", project_file) project_file === nothing || return project_file end if isdir(env) @@ -596,6 +630,7 @@ if cache !== nothing cache.env_project_file[env] = project_file end + println("env_project_file: RETURN: ", project_file) return project_file end end @@ -651,20 +686,31 @@ end function manifest_uuid_path(env::String, pkg::PkgId)::Union{Nothing,String,Missing} + println("manifest_uuid_path: ARGS: ", env, " , ", pkg) + println("manifest_uuid_path: Call env_project_file( ", env, " )") project_file = env_project_file(env) + println("manifest_uuid_path: Post project_file = env_project_file( ", env, " )") + println("manifest_uuid_path: project_file = ", project_file, " String? ", project_file isa String) if project_file isa String proj = project_file_name_uuid(project_file, pkg.name) if proj == pkg # if `pkg` matches the project, return the project itself - return project_file_path(project_file) + ret = project_file_path(project_file) + println("manifest_uuid_path: RETURN: (1) ", ret) + return end mby_ext = project_file_ext_path(project_file, pkg.name) + mby_ext === nothing || println("manifest_uuid_path: RETURN: (2) ", mby_ext) mby_ext === nothing || return mby_ext # look for manifest file and `where` stanza - return explicit_manifest_uuid_path(project_file, pkg) + ret = explicit_manifest_uuid_path(project_file, pkg) + println("manifest_uuid_path: RETURN: (3) ", ret) + return ret elseif project_file # if env names a directory, search it - return implicit_manifest_uuid_path(env, pkg) + ret = implicit_manifest_uuid_path(env, pkg) + println("manifest_uuid_path: RETURN: (4) ", ret) + return ret end return nothing end @@ -1758,6 +1804,7 @@ # Returns `nothing` or the new(ish) module function _require(pkg::PkgId, env=nothing) + println("_require: ARGS: ", pkg, " , ", env) assert_havelock(require_lock) # handle recursive calls to require loading = get(package_locks, pkg, false) @@ -1772,7 +1819,10 @@ try toplevel_load[] = false # perform the search operation to select the module file require intends to load + println("ENTRY _require: Call locate_package( ", pkg, " , ", env, " )") path = locate_package(pkg, env) + println("_require: Post locate_package( ", pkg, " , ", env, " )") + println("RESULT _require: path = ", path) if path === nothing throw(ArgumentError(""" Package $pkg is required but does not seem to be installed:
guix-patches <at> gnu.org
:bug#73197
; Package guix-patches
.
(Fri, 14 Feb 2025 21:13:02 GMT) Full text and rfc822 format available.Message #32 received at 73197 <at> debbugs.gnu.org (full text, mbox):
From: zimoun <zimon.toutoune <at> gmail.com> To: Ludovic Courtès <ludovic.courtes <at> inria.fr> Cc: 73197 <at> debbugs.gnu.org, Efraim Flashner <efraim <at> flashner.co.il>, Philippe Virouleau <philippe.virouleau <at> inria.fr> Subject: Status wip-julia-update (was Re: bug#73197: [PATCH] gnu: julia: Update to 1.9.3.) Date: Fri, 14 Feb 2025 22:10:07 +0100
Hi, On Fri, 14 Feb 2025 at 16:22, Simon Tournier <zimon.toutoune <at> gmail.com> wrote: > Well, I’ll (force) push shortly a trivial fix to the branch > wip-julia-upgrade. I did. \o/ And waiting the rebuild by ci.guix, I’m rebuilding some on my own. And I obverse weird behaviour… For example, on the top of 5f31ce18b3. --8<---------------cut here---------------start------------->8--- $ ./pre-inst-env guix build --no-grafts \ --without-tests=julia-argcheck \ --without-tests=julia-documenter \ --without-tests=julia-genericschur \ --without-tests=julia-static \ --without-tests=julia-statsbase \ --without-tests=julia-infinity \ --without-tests=julia-pycall \ --without-tests=julia-http \ --without-tests=julia-staticarrays \ --without-tests=julia-finitedifferences \ julia-benchmarktools /gnu/store/pdj7ilvyh4i96jd5av97vrlghpxc25ni-julia-benchmarktools-1.3.2 --8<---------------cut here---------------end--------------->8--- So far, so good! Here all ’without-tests’ are packages that need to be updated or need a fix in their test suite–e.g., one test fails because hardware or other as it happens time to time with Julia packages. Now, let do the same but using the ’julia’ package without its own tests. It should be pass, no? --8<---------------cut here---------------start------------->8--- $ ./pre-inst-env guix build --no-grafts \ --without-tests=julia-argcheck \ --without-tests=julia-documenter \ --without-tests=julia-genericschur \ --without-tests=julia-static \ --without-tests=julia-statsbase \ --without-tests=julia-infinity \ --without-tests=julia-pycall \ --without-tests=julia-http \ --without-tests=julia-staticarrays \ --without-tests=julia-finitedifferences \ --without-tests=julia \ julia-benchmarktools starting phase `precompile' ERROR: LoadError: ArgumentError: Package Parsers [69de0a69-1ddd-5017-9359-2bf0b02dc9f0] is required but does not seem to be installed: - Run `Pkg.instantiate()` to install all recorded dependencies. --8<---------------cut here---------------end--------------->8--- Euh, I’m probably doing wrong something somewhere… But it does not jump to my eyes what. Any idea? For the record, here the path: $ guix graph --path julia-benchmarktools julia-parsers julia-benchmarktools <at> 1.3.2 julia-json <at> 0.21.3 julia-parsers <at> 2.2.4 And note that julia-parsers is propagated by julia-json then julia-benchmarktools propagates julia-json. Therefore, the full ’julia’ package finds julia-parsers but not all the same except running the ’check’ phase of julia’. What do I miss about package transformation? That’s said, it’s weird behaviour because I also observe the converse: something that passes using --without-tests=julia but fails with full ’julia’. Bah… my creativity starts to be lacking… Cheers, simon PS: What about Nix? 1. I don’t clearly understand what they do. 2. So much Julia code… Hum, I’m not convinced that’s the way… https://github.com/NixOS/nixpkgs/tree/master/pkgs/development/julia-modules https://github.com/NixOS/nixpkgs/tree/master/pkgs/development/compilers/julia
guix-patches <at> gnu.org
:bug#73197
; Package guix-patches
.
(Tue, 18 Feb 2025 22:32:02 GMT) Full text and rfc822 format available.Message #35 received at 73197 <at> debbugs.gnu.org (full text, mbox):
From: alexis <at> praga.dev To: zimoun <zimon.toutoune <at> gmail.com> Cc: 73197 <at> debbugs.gnu.org, Ludovic Courtès <ludovic.courtes <at> inria.fr>, Efraim Flashner <efraim <at> flashner.co.il>, Philippe Virouleau <philippe.virouleau <at> inria.fr> Subject: Re: [bug#73197] Status wip-julia-update (was Re: bug#73197: [PATCH] gnu: julia: Update to 1.9.3.) Date: Tue, 18 Feb 2025 23:30:59 +0100
[Message part 1 (text/plain, inline)]
Dear Simon, Thanks for working on this ! I've tried to follow the nix install process. Here are some (incomplete) notes. For brievity's sake, only the Zlib package will be shown in the files below. 1. A list of dependencies is stored into a YAML: 8<----------------------------------------------------------------------- cat /nix/store/3c8lw0flmvvl5hlkc8c7xcwvwj1kbzp2-julia-package-closure.yml - name: Zlib_jll uuid: 83775a58-1f1d-513f-b197-d71354ab007a version: 1.2.13+0 depends_on: "Libdl": "8f399da3-3557-5675-b5ff-fb832c97cbdb" 8<----------------------------------------------------------------------- 2. Each dependency is a derivation and transformed into a git repo 8<----------------------------------------------------------------------- building '/nix/store/icap989di414ax9zpq1b07ca4szn1v6j-Zlib_jll.jl-866bc71.drv'... exporting https://github.com/JuliaBinaryWrappers/Zlib_jll.jl.git (rev 866bc7103cfb6233c35d6f1b2c6bd23ef9f6fe5f) into /nix/store/pi31a0w9xm3qych5yfdw3mg93sxl41rq-Zlib_jll.jl-866bc71 Initialized empty Git repository in /nix/store/pi31a0w9xm3qych5yfdw3mg93sxl41rq-Zlib_jll.jl-866bc71/.git/ remote: Enumerating objects: 26, done. remote: Counting objects: 100% (7/7), done. remote: Compressing objects: 100% (6/6), done. remote: Total 26 (delta 1), reused 1 (delta 1), pack-reused 19 (from 1) Unpacking objects: 100% (26/26), 5.55 KiB | 1.85 MiB/s, done. From https://github.com/JuliaBinaryWrappers/Zlib_jll.jl * branch 866bc7103cfb6233c35d6f1b2c6bd23ef9f6fe5f -> FETCH_HEAD Switched to a new branch 'fetchgit' removing `.git'... 8<----------------------------------------------------------------------- 3. Package location are overriden, first into a JSON 8<----------------------------------------------------------------------- $ cat /nix/store/nf666fq31xz8f7hx9qi9ygicf4hdfx4i-Overrides.json "uuid-83775a58-1f1d-513f-b197-d71354ab007a": { "Zlib": { "path": "/nix/store/6d4hpjr4f04zq9090kd9kkffa9j2q7gj-Zlib", "sha1": "b86177a36c8ba482120ab766b6670177dffd72f3" } }, 8<----------------------------------------------------------------------- 4. ... then in a TOML 8<----------------------------------------------------------------------- $ cat /nix/store/gnwl6k320mv0pnb8hpcdww40hypp3i7f-Overrides.toml b86177a36c8ba482120ab766b6670177dffd72f3 = "/nix/store/6d4hpjr4f04zq9090kd9kkffa9j2q7gj-Zlib" 8<----------------------------------------------------------------------- 5. A local registry is created. Somewhere, the following code is run 8<----------------------------------------------------------------------- Pkg.Registry.add(Pkg.RegistrySpec(path=\"/nix/store/p5dy9z5869qnmmawsid5dcy1nqy1k5sn-minimal-julia-registry`. 8<----------------------------------------------------------------------- The registry looks like this: 8<----------------------------------------------------------------------- $ tree /nix/store/p5dy9z5869qnmmawsid5dcy1nqy1k5sn-minimal-julia-registry ├── A │ ├── ArrowTypes │ │ ├── Compat.toml │ │ ├── Deps.toml │ │ ├── Package.toml │ │ └── Versions.toml 8<----------------------------------------------------------------------- with Compat.toml 8<----------------------------------------------------------------------- ["1-1.1"] julia = "1.3.0-1" ["1.2-2"] julia = "1" 8<----------------------------------------------------------------------- with Deps.toml 8<----------------------------------------------------------------------- [1-2] UUIDs = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" ["2.1-2"] Sockets = "6462fe0b-24de-5631-8697-dd941f90decc" 8<----------------------------------------------------------------------- with Package.toml 8<----------------------------------------------------------------------- name = "ArrowTypes" uuid = "31f734f8-188a-4ce0-8406-c8a06bd891cd" repo = "file:///nix/store/ndqz9cikh67hqwxh4l7vji07764p4xpk-julia-ArrowTypes-2.3.0" subdir = "src/ArrowTypes" ["2.3.0"] git-tree-sha1 = "404265cd8128a2515a81d5eae16de90fdef05101" 8<----------------------------------------------------------------------- 6. I'm not sure how the registry is used at this step so here the log output if you can make sense out of it 8<----------------------------------------------------------------------- Copying registry from `/nix/store/p5dy9z5869qnmmawsid5dcy1nqy1k5sn-minimal-julia-registry` Copied registry `General` to `/nix/store/ap871sp56qx74k4hz2nlnjvpys8pdh7j-julia-depot/depot/registries/General` Adding packages: CSV Resolving package versions... Cloning [e2d170a0-9d28-54be-80f0-106bbe20a464] DataValueInterfaces from file:///nix/store/0gdzfghqzs56ilzb9dx239fij4hny9i3-julia-DataValueInterfaces-1.0.0 Installed DataValueInterfaces ───────── v1.0.0 ... Updating `/nix/store/ap871sp56qx74k4hz2nlnjvpys8pdh7j-julia-depot/project/Project.toml` [336ed68f] + CSV v0.10.14 Updating `/nix/store/ap871sp56qx74k4hz2nlnjvpys8pdh7j-julia-depot/project/Manifest.toml` Removing registry `General` from /nix/store/ap871sp56qx74k4hz2nlnjvpys8pdh7j-julia-depot/depot/registries/General building '/nix/store/0k35snxa68lrkap77s376gqx8ppxr8yn-julia-1.9.4-env.drv'... 8<----------------------------------------------------------------------- Hope that helps, Alexis
[Message part 2 (text/html, inline)]
guix-patches <at> gnu.org
:bug#73197
; Package guix-patches
.
(Thu, 20 Feb 2025 11:03:02 GMT) Full text and rfc822 format available.Message #38 received at 73197 <at> debbugs.gnu.org (full text, mbox):
From: Simon Tournier <zimon.toutoune <at> gmail.com> To: alexis <at> praga.dev Cc: 73197 <at> debbugs.gnu.org, Ludovic Courtès <ludovic.courtes <at> inria.fr>, Efraim Flashner <efraim <at> flashner.co.il>, Philippe Virouleau <philippe.virouleau <at> inria.fr> Subject: Re: [bug#73197] Status wip-julia-update (was Re: bug#73197: [PATCH] gnu: julia: Update to 1.9.3.) Date: Thu, 20 Feb 2025 12:02:16 +0100
Hi Alexis, On Tue, 18 Feb 2025 at 23:30, Alexis Praga via Guix-patches via <guix-patches <at> gnu.org> wrote: > I've tried to follow the nix install > process. Here are some (incomplete) notes. Thanks! It helps. > 5. A local registry is created. Somewhere, the following code is run On Monday, I thought about something like that. However, I’m note sure that one package can write to another outputs than its own. Something to check… My idea was to create a “local” registry per package containing all the requirements. Relying heavily on symbolic links, as profile does. Today, it works that way: --8<---------------cut here---------------start------------->8--- $ tree -L 2 $(guix build julia-zygote)/share/julia /gnu/store/n64x6qrxy7b2lci9aar3pv6kikp1rgan-julia-zygote-0.6.41/share/julia ├── compiled │ └── v1.8 ├── loadpath │ └── Zygote └── packages └── Zygote --8<---------------cut here---------------end--------------->8--- where julia-zygote contains this definition: (propagated-inputs (list julia-abstractffts julia-chainrules julia-chainrulescore julia-diffrules julia-fillarrays julia-forwarddiff julia-irtools julia-logexpfunctions julia-macrotools julia-nanmath julia-requires julia-specialfunctions julia-zygoterules)) In other words, when running the ’check’ phase, we setup the LOAD_PATH and DEPOT_PATH via the environment variable JULIA_{LOAD,DEPOT}_PATH. However, stuff changed with v1.9 as explained here [1]. Maybe I’m missing something with all that. My current understanding: tweaking these environment variables will not be enough. Now, let enter inside “guix shell julia-zygote”: --8<---------------cut here---------------start------------->8--- $ tree -L 2 $GUIX_ENVIRONMENT/share/julia /gnu/store/asis32i2wf3jr9854nh1yxjf6fsipk62-profile/share/julia ├── compiled │ └── v1.8 ├── loadpath │ ├── AbstractFFTs -> /gnu/store/hlnlr2xkd06mrcg72v7ilynqv36z9xqi-julia-abstractffts-1.0.1/share/julia/loadpath/AbstractFFTs │ ├── Aqua -> /gnu/store/jb4vzsn12nbfqyr8inhz2a570fv56x4i-julia-aqua-0.5.5/share/julia/loadpath/Aqua │ ├── Calculus -> /gnu/store/k2ghzcx087sssllkk1b3c8xxjwbr3n43-julia-calculus-0.5.1/share/julia/loadpath/Calculus │ ├── ChainRules -> /gnu/store/sj99c9z4siq87qhmix0xr5yyzkcphg80-julia-chainrules-1.35.0/share/julia/loadpath/ChainRules │ ├── ChainRulesCore -> /gnu/store/h09v7lvgahl7rx95aj0rz92hc34xpmpn-julia-chainrulescore-1.12.2/share/julia/loadpath/ChainRulesCore [...] │ ├── StaticArrays -> /gnu/store/xn3jfkssqa0lggnrr3qkaicvawyn4wda-julia-staticarrays-1.2.13/share/julia/loadpath/StaticArrays │ ├── Zygote -> /gnu/store/n64x6qrxy7b2lci9aar3pv6kikp1rgan-julia-zygote-0.6.41/share/julia/loadpath/Zygote │ └── ZygoteRules -> /gnu/store/ska4a8nxxl9qmv1hgb4ah5147lngq588-julia-zygoterules-0.2.2/share/julia/loadpath/ZygoteRules └── packages ├── AbstractFFTs -> /gnu/store/hlnlr2xkd06mrcg72v7ilynqv36z9xqi-julia-abstractffts-1.0.1/share/julia/packages/AbstractFFTs ├── Aqua -> /gnu/store/jb4vzsn12nbfqyr8inhz2a570fv56x4i-julia-aqua-0.5.5/share/julia/packages/Aqua ├── Calculus -> /gnu/store/k2ghzcx087sssllkk1b3c8xxjwbr3n43-julia-calculus-0.5.1/share/julia/packages/Calculus ├── ChainRules -> /gnu/store/sj99c9z4siq87qhmix0xr5yyzkcphg80-julia-chainrules-1.35.0/share/julia/packages/ChainRules ├── ChainRulesCore -> /gnu/store/h09v7lvgahl7rx95aj0rz92hc34xpmpn-julia-chainrulescore-1.12.2/share/julia/packages/ChainRulesCore [...] ├── StaticArrays -> /gnu/store/xn3jfkssqa0lggnrr3qkaicvawyn4wda-julia-staticarrays-1.2.13/share/julia/packages/StaticArrays ├── Zygote -> /gnu/store/n64x6qrxy7b2lci9aar3pv6kikp1rgan-julia-zygote-0.6.41/share/julia/packages/Zygote └── ZygoteRules -> /gnu/store/ska4a8nxxl9qmv1hgb4ah5147lngq588-julia-zygoterules-0.2.2/share/julia/packages/ZygoteRules 65 directories, 0 files --8<---------------cut here---------------end--------------->8--- My idea is to do the same at least for the ’check’ phase, Thanks again for trying with Nix. It helps! I’ll read again all these details, food for creativity. ;-) Cheers, simon 1: [bug#73197] [PATCH] gnu: julia: Update to 1.9.3. Simon Tournier <zimon.toutoune <at> gmail.com> Mon, 13 Jan 2025 19:31:16 +0100 id:87bjwa4lcb.fsf <at> gmail.com https://issues.guix.gnu.org/73197 https://issues.guix.gnu.org/msgid/87bjwa4lcb.fsf <at> gmail.com https://yhetil.org/guix/87bjwa4lcb.fsf <at> gmail.com
guix-patches <at> gnu.org
:bug#73197
; Package guix-patches
.
(Thu, 20 Feb 2025 23:11:02 GMT) Full text and rfc822 format available.Message #41 received at 73197 <at> debbugs.gnu.org (full text, mbox):
From: alexis <at> praga.dev To: Simon Tournier <zimon.toutoune <at> gmail.com> Cc: 73197 <at> debbugs.gnu.org, Ludovic Courtès <ludovic.courtes <at> inria.fr>, Efraim Flashner <efraim <at> flashner.co.il>, Philippe Virouleau <philippe.virouleau <at> inria.fr> Subject: Re: [bug#73197] Status wip-julia-update (was Re: bug#73197: [PATCH] gnu: julia: Update to 1.9.3.) Date: Fri, 21 Feb 2025 00:10:02 +0100
Hi Simon, As a follow-up, here's how nix uses the local depot. It wraps julia by setting the following variable to subfolders of the "meta" derivation 1. JULIA_DEPOT_PATH to ~/.julia and the local depot home/alex/.julia:/nix/store/ap871sp56qx74k4hz2nlnjvpys8pdh7j-julia-depot/depot 2. JULIA_PROJECT_PATH to a custom project /nix/store/ap871sp56qx74k4hz2nlnjvpys8pdh7j-julia-depot/project 3. JULIA_LOAD_PATH to the Project.toml @:/nix/store/ap871sp56qx74k4hz2nlnjvpys8pdh7j-julia-depot/project/Project.toml:@v#.#:@stdlib (not sure what the weird characters are about, like '@') The depot itself has the following structure - source code in clones/ with UUID - compiled library in compiled - source code in packages/ with package name (again !) ❯ tree /nix/store/ap871sp56qx74k4hz2nlnjvpys8pdh7j-julia-depot/depot/ -L 2 /nix/store/ap871sp56qx74k4hz2nlnjvpys8pdh7j-julia-depot/depot/ ├── artifacts │ └── Overrides.toml ├── clones ├── 944b1d66-785c-5afd-91f1-9de20f533193 │ ├── LICENSE.md │ ├── Project.toml │ ├── README.md │ ├── src │ │ ├── CodecZlib.jl │ │ ├── compression.jl │ │ ├── decompression.jl │ │ └── libz.jl │ └── test │ ├── abra.gz │ ├── foo.txt.gz │ └── runtests.jl │ ── [...] |── compiled | └── v1.9 | ├── CodecZlib | │ ├── 1TI30_fZ84u.ji | │ └── 1TI30_fZ84u.so | ├── [...] ├── logs │ └── manifest_usage.toml ├── packages │ ├── CodecZlib | └── Ndt0H | ├── LICENSE.md | ├── Project.toml | ├── README.md | ├── src | │ ├── CodecZlib.jl | │ ├── compression.jl | │ ├── decompression.jl | │ └── libz.jl | └── test | ├── abra.gz | ├── foo.txt.gz | └── runtests.jl | └── [...] | ├── registries └── scratchspaces └── 44cfe95a-1eb2-52ea-b672-e2afdf69b78f Finally, the project itself has a TOML file defining the package we want to install (in my case CSV) and the Manifest.toml for this package (I think) ❯ tree /nix/store/ap871sp56qx74k4hz2nlnjvpys8pdh7j-julia-depot/project/ /nix/store/ap871sp56qx74k4hz2nlnjvpys8pdh7j-julia-depot/project/ ├── Manifest.toml └── Project.toml ❯ cat /nix/store/ap871sp56qx74k4hz2nlnjvpys8pdh7j-julia-depot/project/Project.toml [deps] CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b" ❯ head -n 10 /nix/store/ap871sp56qx74k4hz2nlnjvpys8pdh7j-julia-depot/project/Manifest.toml # This file is machine-generated - editing it directly is not advised julia_version = "1.9.4" manifest_format = "2.0" project_hash = "de8e0bb32b50d890eb0519dc7725e6a1f422aa74" [[deps.Artifacts]] uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" [[deps.Base64]] Hope that helps, Alexis
guix-patches <at> gnu.org
:bug#73197
; Package guix-patches
.
(Wed, 05 Mar 2025 14:00:02 GMT) Full text and rfc822 format available.Message #44 received at 73197 <at> debbugs.gnu.org (full text, mbox):
From: Simon Tournier <zimon.toutoune <at> gmail.com> To: Ludovic Courtès <ludovic.courtes <at> inria.fr> Cc: 73197 <at> debbugs.gnu.org, Efraim Flashner <efraim <at> flashner.co.il>, Philippe Virouleau <philippe.virouleau <at> inria.fr> Subject: Re: [bug#73197] Status wip-julia-update (was Re: bug#73197: [PATCH] gnu: julia: Update to 1.9.3.) Date: Wed, 05 Mar 2025 14:59:10 +0100
Hi, On Fri, 14 Feb 2025 at 22:10, zimoun <zimon.toutoune <at> gmail.com> wrote: > Bah… my creativity starts to be lacking… Unexpected failures by Cuirass?! For the record, if we consider the last evaluation [1] of the branch wip-julia-upgrade on the top of 5f31c [2], Cuirass reports this failure [3] about julia-abstractffts. --8<---------------cut here---------------start------------->8--- starting phase `check' running tests from '/gnu/store/w5iqv2y9yg12plyks3ppywyvq2ffirl8-julia-abstractffts-1.0.1/share/julia/loadpath/AbstractFFTs/test/runtests.jl' ERROR: LoadError: ArgumentError: Package ConstructionBase [187b0558-2788-49d3-abe0-74a17ed4e7c9] is required but does not seem to be installed: - Run `Pkg.instantiate()` to install all recorded dependencies. Stacktrace: --8<---------------cut here---------------end--------------->8--- Hum?! What do I miss? Cuirass says the derivation and the output are: /gnu/store/pyvn3lmxizbhyvh29h8ladx8ycpsxbi6-julia-abstractffts-1.0.1.drv /gnu/store/w5iqv2y9yg12plyks3ppywyvq2ffirl8-julia-abstractffts-1.0.1 And on my local machine, using Guix 056910e, it just builds and the ’check’ phase just passes. --8<---------------cut here---------------start------------->8--- $ guix build --check \ /gnu/store/pyvn3lmxizbhyvh29h8ladx8ycpsxbi6-julia-abstractffts-1.0.1.drv The following derivation will be built: /gnu/store/pyvn3lmxizbhyvh29h8ladx8ycpsxbi6-julia-abstractffts-1.0.1.drv building /gnu/store/pyvn3lmxizbhyvh29h8ladx8ycpsxbi6-julia-abstractffts-1.0.1.drv... starting phase `separate-from-pid1' build process now running as PID 18 phase `separate-from-pid1' succeeded after 0.0 seconds [...] starting phase `check' running tests from '/gnu/store/w5iqv2y9yg12plyks3ppywyvq2ffirl8-julia-abstractffts-1.0.1/share/julia/loadpath/AbstractFFTs/test/runtests.jl' Test Summary: | Pass Total Time rfft sizes | 5 5 0.2s Test Summary: | Pass Total Time Custom Plan | 4 4 0.5s Test Summary: | Pass Total Time Shift functions | 14 14 0.3s Test Summary: | Pass Total Time FFT Frequencies | 67 67 0.7s Test Summary: | Pass Total Time normalization | 1 1 0.0s phase `check' succeeded after 13.2 seconds starting phase `patch-shebangs' phase `patch-shebangs' succeeded after 0.0 seconds starting phase `strip' phase `strip' succeeded after 0.0 seconds starting phase `validate-runpath' phase `validate-runpath' succeeded after 0.0 seconds starting phase `validate-documentation-location' phase `validate-documentation-location' succeeded after 0.0 seconds starting phase `delete-info-dir-file' phase `delete-info-dir-file' succeeded after 0.0 seconds starting phase `patch-dot-desktop-files' phase `patch-dot-desktop-files' succeeded after 0.0 seconds starting phase `make-dynamic-linker-cache' phase `make-dynamic-linker-cache' succeeded after 0.0 seconds starting phase `install-license-files' installing 1 license files from '.' phase `install-license-files' succeeded after 0.0 seconds starting phase `reset-gzip-timestamps' phase `reset-gzip-timestamps' succeeded after 0.0 seconds starting phase `compress-documentation' phase `compress-documentation' succeeded after 0.0 seconds guix build: error: derivation `/gnu/store/pyvn3lmxizbhyvh29h8ladx8ycpsxbi6-julia-abstractffts-1.0.1.drv' may not be deterministic: output `/gnu/store/w5iqv2y9yg12plyks3ppywyvq2ffirl8-julia-abstractffts-1.0.1' differs --8<---------------cut here---------------end--------------->8--- The non-deterministic is expected; another story. What could be twisted? How is it possible? Cheers, simon 1: https://ci.guix.gnu.org/eval/2041608 2: https://git.savannah.gnu.org/cgit/guix.git/log/?id=5f31ce18b3655264e3d101eada5382bf22ac1cfa 3: https://ci.guix.gnu.org/build/9309544/details
guix-patches <at> gnu.org
:bug#73197
; Package guix-patches
.
(Fri, 07 Mar 2025 23:22:02 GMT) Full text and rfc822 format available.Message #47 received at 73197 <at> debbugs.gnu.org (full text, mbox):
From: Ludovic Courtès <ludo <at> gnu.org> To: Simon Tournier <zimon.toutoune <at> gmail.com> Cc: 73197 <at> debbugs.gnu.org, Efraim Flashner <efraim <at> flashner.co.il>, Philippe Virouleau <philippe.virouleau <at> inria.fr> Subject: Re: [bug#73197] Status wip-julia-update (was Re: bug#73197: [PATCH] gnu: julia: Update to 1.9.3.) Date: Sat, 08 Mar 2025 00:20:51 +0100
Hello, Simon Tournier <zimon.toutoune <at> gmail.com> skribis: > And on my local machine, using Guix 056910e, it just builds and the > ’check’ phase just passes. > > $ guix build --check \ > /gnu/store/pyvn3lmxizbhyvh29h8ladx8ycpsxbi6-julia-abstractffts-1.0.1.drv It fails on my laptop just like <https://ci.guix.gnu.org/build/9309544/details> shows: --8<---------------cut here---------------start------------->8--- starting phase `check' running tests from '/gnu/store/w5iqv2y9yg12plyks3ppywyvq2ffirl8-julia-abstractffts-1.0.1/share/julia/loadpath/AbstractFFTs/test/runtests.jl' ERROR: LoadError: ArgumentError: Package ConstructionBase [187b0558-2788-49d3-abe0-74a17ed4e7c9] is required but does not seem to be installed: - Run `Pkg.instantiate()` to install all recorded dependencies. --8<---------------cut here---------------end--------------->8--- If you don’t get that failure on your own machine, perhaps there’s something non-deterministic here? I wouldn’t expect this type of error to be non-deterministic, but who knows. Tricky! Ludo’.
guix-patches <at> gnu.org
:bug#73197
; Package guix-patches
.
(Fri, 11 Apr 2025 10:19:02 GMT) Full text and rfc822 format available.Message #50 received at 73197 <at> debbugs.gnu.org (full text, mbox):
From: Ludovic Courtès <ludovic.courtes <at> inria.fr> To: Simon Tournier <zimon.toutoune <at> gmail.com> Cc: alexis <at> praga.dev, 73197 <at> debbugs.gnu.org, Efraim Flashner <efraim <at> flashner.co.il>, Philippe Virouleau <philippe.virouleau <at> inria.fr> Subject: Re: [bug#73197] Status wip-julia-update (was Re: bug#73197: [PATCH] gnu: julia: Update to 1.9.3.) Date: Fri, 11 Apr 2025 12:11:05 +0200
Hey Simon, Did you get a chance to work on this terrible Julia upgrade? :-) Cheers, Ludo’.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.