gnu: julia: Use libgit2-1.1 and prepare for parallel tests.
Commit e0e2316420
updated libgit2 to version 1.3.0, but julia seems to only
support 1.1.0 for now.
* gnu/packages/julia.scm (julia): Delete trailing #t.
[phases]{enable-parallel-tests}: New phase.
[inputs]: Use libgit2-1.1.
Reported-by: zimoun <zimon.toutoune@gmail.com>
master
parent
57c54bff35
commit
fd3fb596e5
|
@ -6,6 +6,7 @@
|
||||||
;;; Copyright © 2020 Tobias Geerinckx-Rice <me@tobias.gr>
|
;;; Copyright © 2020 Tobias Geerinckx-Rice <me@tobias.gr>
|
||||||
;;; Copyright © 2021 Jean-Baptiste Volatier <jbv@pm.me>
|
;;; Copyright © 2021 Jean-Baptiste Volatier <jbv@pm.me>
|
||||||
;;; Copyright © 2021 Simon Tournier <zimon.toutoune@gmail.com>
|
;;; Copyright © 2021 Simon Tournier <zimon.toutoune@gmail.com>
|
||||||
|
;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -190,8 +191,7 @@ libraries. It is also a bit like @code{ldd} and @code{otool -L}.")
|
||||||
(("(install: .*) \\$\\(BUILDROOT\\)/doc/_build/html/en/index.html" _ line)
|
(("(install: .*) \\$\\(BUILDROOT\\)/doc/_build/html/en/index.html" _ line)
|
||||||
(string-append line "\n"))
|
(string-append line "\n"))
|
||||||
(("src ui doc deps")
|
(("src ui doc deps")
|
||||||
"src ui deps"))
|
"src ui deps"))))
|
||||||
#t))
|
|
||||||
(add-after 'unpack 'use-system-libwhich
|
(add-after 'unpack 'use-system-libwhich
|
||||||
(lambda* (#:key inputs #:allow-other-keys)
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
;; don't build it
|
;; don't build it
|
||||||
|
@ -200,15 +200,13 @@ libraries. It is also a bit like @code{ldd} and @code{otool -L}.")
|
||||||
;; call our version
|
;; call our version
|
||||||
(substitute* "base/Makefile"
|
(substitute* "base/Makefile"
|
||||||
(("\\$\\$\\(build_depsbindir\\)/libwhich")
|
(("\\$\\$\\(build_depsbindir\\)/libwhich")
|
||||||
(search-input-file inputs "/bin/libwhich")))
|
(search-input-file inputs "/bin/libwhich")))))
|
||||||
#t))
|
|
||||||
(add-after 'unpack 'change-number-of-precompile-statements
|
(add-after 'unpack 'change-number-of-precompile-statements
|
||||||
(lambda _
|
(lambda _
|
||||||
;; Remove nss-certs drops the number of statements below 1200,
|
;; Remove nss-certs drops the number of statements below 1200,
|
||||||
;; causing the build to fail prematurely.
|
;; causing the build to fail prematurely.
|
||||||
(substitute* "contrib/generate_precompile.jl"
|
(substitute* "contrib/generate_precompile.jl"
|
||||||
(("1200") "1100"))
|
(("1200") "1100"))))
|
||||||
#t))
|
|
||||||
;; For some reason libquadmath is unavailable on this architecture.
|
;; For some reason libquadmath is unavailable on this architecture.
|
||||||
;; https://github.com/JuliaLang/julia/issues/41613
|
;; https://github.com/JuliaLang/julia/issues/41613
|
||||||
,@(if (target-aarch64?)
|
,@(if (target-aarch64?)
|
||||||
|
@ -250,8 +248,7 @@ libraries. It is also a bit like @code{ldd} and @code{otool -L}.")
|
||||||
(add-before 'build 'replace-default-shell
|
(add-before 'build 'replace-default-shell
|
||||||
(lambda _
|
(lambda _
|
||||||
(substitute* "base/client.jl"
|
(substitute* "base/client.jl"
|
||||||
(("/bin/sh") (which "sh")))
|
(("/bin/sh") (which "sh")))))
|
||||||
#t))
|
|
||||||
(add-before 'build 'shared-objects-paths
|
(add-before 'build 'shared-objects-paths
|
||||||
(lambda* (#:key inputs #:allow-other-keys)
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
(let ((jlpath
|
(let ((jlpath
|
||||||
|
@ -315,8 +312,17 @@ libraries. It is also a bit like @code{ldd} and @code{otool -L}.")
|
||||||
(to "suitesparse" "libsuitesparseconfig"))
|
(to "suitesparse" "libsuitesparseconfig"))
|
||||||
(((from "libumfpack")) (to "suitesparse" "libumfpack")))
|
(((from "libumfpack")) (to "suitesparse" "libumfpack")))
|
||||||
(substitute* (jlpath "Zlib")
|
(substitute* (jlpath "Zlib")
|
||||||
(((from "libz")) (to "zlib" "libz"))))
|
(((from "libz")) (to "zlib" "libz"))))))
|
||||||
#t))
|
(add-after 'unpack 'enable-parallel-tests
|
||||||
|
;; FIXME: julia fails at networking in the container and falls back
|
||||||
|
;; to a single worker, which causes the tests to not run in
|
||||||
|
;; parallel (see: https://github.com/JuliaLang/julia/issues/43205).
|
||||||
|
(lambda* (#:key parallel-build? #:allow-other-keys)
|
||||||
|
(setenv "JULIA_CPU_THREADS" (if parallel-build?
|
||||||
|
(number->string (parallel-job-count))
|
||||||
|
"1"))
|
||||||
|
(format #t "JULIA_CPU_THREADS environment variable set to ~a~%"
|
||||||
|
(getenv "JULIA_CPU_THREADS"))))
|
||||||
(add-after 'unpack 'adjust-test-suite
|
(add-after 'unpack 'adjust-test-suite
|
||||||
(lambda* (#:key inputs #:allow-other-keys)
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
(let ((pcre2 (assoc-ref inputs "pcre2"))
|
(let ((pcre2 (assoc-ref inputs "pcre2"))
|
||||||
|
@ -339,8 +345,7 @@ libraries. It is also a bit like @code{ldd} and @code{otool -L}.")
|
||||||
(substitute* "stdlib/SuiteSparse_jll/test/runtests.jl"
|
(substitute* "stdlib/SuiteSparse_jll/test/runtests.jl"
|
||||||
(("5004") ,(string-replace-substring
|
(("5004") ,(string-replace-substring
|
||||||
(version-major+minor
|
(version-major+minor
|
||||||
(package-version suitesparse)) "." "0")))
|
(package-version suitesparse)) "." "0"))))))
|
||||||
#t)))
|
|
||||||
(add-before 'check 'disable-broken-tests
|
(add-before 'check 'disable-broken-tests
|
||||||
(lambda _
|
(lambda _
|
||||||
;; disabling REPL tests because they require a stdin
|
;; disabling REPL tests because they require a stdin
|
||||||
|
@ -377,8 +382,7 @@ libraries. It is also a bit like @code{ldd} and @code{otool -L}.")
|
||||||
;(setenv "LC_ALL" "en_US.utf8")
|
;(setenv "LC_ALL" "en_US.utf8")
|
||||||
(substitute* "test/cmdlineargs.jl"
|
(substitute* "test/cmdlineargs.jl"
|
||||||
(("test v\\[3") "test_broken v[3")
|
(("test v\\[3") "test_broken v[3")
|
||||||
(("test isempty\\(v\\[3") "test_broken isempty(v[3"))
|
(("test isempty\\(v\\[3") "test_broken isempty(v[3"))))
|
||||||
#t))
|
|
||||||
(add-before 'install 'symlink-libraries
|
(add-before 'install 'symlink-libraries
|
||||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||||
(let ((link
|
(let ((link
|
||||||
|
@ -399,8 +403,7 @@ libraries. It is also a bit like @code{ldd} and @code{otool -L}.")
|
||||||
(link "zlib" "usr/lib/julia/" "libz\\.so")
|
(link "zlib" "usr/lib/julia/" "libz\\.so")
|
||||||
(link "libunwind" "usr/lib/julia/" "libunwind\\.so")
|
(link "libunwind" "usr/lib/julia/" "libunwind\\.so")
|
||||||
(symlink (string-append (assoc-ref inputs "p7zip") "/bin/7z")
|
(symlink (string-append (assoc-ref inputs "p7zip") "/bin/7z")
|
||||||
"usr/libexec/7z")
|
"usr/libexec/7z"))))
|
||||||
#t)))
|
|
||||||
(add-after 'install 'symlink-llvm-utf8proc
|
(add-after 'install 'symlink-llvm-utf8proc
|
||||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||||
(let* ((out (assoc-ref outputs "out"))
|
(let* ((out (assoc-ref outputs "out"))
|
||||||
|
@ -415,8 +418,7 @@ libraries. It is also a bit like @code{ldd} and @code{otool -L}.")
|
||||||
(find-files (string-append (assoc-ref inputs pkgname)
|
(find-files (string-append (assoc-ref inputs pkgname)
|
||||||
"/lib") pred)))))
|
"/lib") pred)))))
|
||||||
(link "llvm" "libLLVM-11jl\\.so")
|
(link "llvm" "libLLVM-11jl\\.so")
|
||||||
(link "utf8proc" "libutf8proc\\.so")
|
(link "utf8proc" "libutf8proc\\.so"))))
|
||||||
#t)))
|
|
||||||
(add-after 'install 'make-wrapper
|
(add-after 'install 'make-wrapper
|
||||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||||
(let* ((out (assoc-ref outputs "out"))
|
(let* ((out (assoc-ref outputs "out"))
|
||||||
|
@ -427,8 +429,7 @@ libraries. It is also a bit like @code{ldd} and @code{otool -L}.")
|
||||||
`("JULIA_LOAD_PATH" ":" prefix
|
`("JULIA_LOAD_PATH" ":" prefix
|
||||||
("" "$JULIA_LOAD_PATH"))
|
("" "$JULIA_LOAD_PATH"))
|
||||||
`("JULIA_DEPOT_PATH" ":" prefix
|
`("JULIA_DEPOT_PATH" ":" prefix
|
||||||
("" "$JULIA_DEPOT_PATH"))))
|
("" "$JULIA_DEPOT_PATH"))))))))
|
||||||
#t))))
|
|
||||||
#:make-flags
|
#:make-flags
|
||||||
(list
|
(list
|
||||||
(string-append "prefix=" (assoc-ref %outputs "out"))
|
(string-append "prefix=" (assoc-ref %outputs "out"))
|
||||||
|
@ -504,7 +505,7 @@ libraries. It is also a bit like @code{ldd} and @code{otool -L}.")
|
||||||
("gfortran:lib" ,gfortran "lib")
|
("gfortran:lib" ,gfortran "lib")
|
||||||
("gmp" ,gmp)
|
("gmp" ,gmp)
|
||||||
("lapack" ,lapack)
|
("lapack" ,lapack)
|
||||||
("libgit2" ,libgit2)
|
("libgit2" ,libgit2-1.1)
|
||||||
("libnghttp2" ,nghttp2 "lib")
|
("libnghttp2" ,nghttp2 "lib")
|
||||||
("libssh2" ,libssh2)
|
("libssh2" ,libssh2)
|
||||||
("libunwind" ,libunwind-julia)
|
("libunwind" ,libunwind-julia)
|
||||||
|
|
Reference in New Issue