From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:59527) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ieJaz-00068h-87 for guix-patches@gnu.org; Mon, 09 Dec 2019 09:01:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ieJax-0008Bm-Hl for guix-patches@gnu.org; Mon, 09 Dec 2019 09:01:05 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:46828) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ieJaw-0008BW-Os for guix-patches@gnu.org; Mon, 09 Dec 2019 09:01:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ieJaw-0002yf-Ow for guix-patches@gnu.org; Mon, 09 Dec 2019 09:01:02 -0500 Subject: [bug#38546] [PATCH 1/3] gnu: julia: Set to JULIA_LOAD_PATH and JULIA_DEPOT_PATH variables. References: <87v9qpvbyr.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> In-Reply-To: <87v9qpvbyr.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> Resent-Message-ID: From: =?UTF-8?Q?Nicol=C3=B2?= Balzarotti Date: Thu, 10 Oct 2019 17:49:15 +0200 Message-ID: <87tv69vbt6.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> MIME-Version: 1.0 Content-Type: text/plain List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Guix Patches <38546@debbugs.gnu.org> gnu/packages/julia.scm | 146 +++++++++++++++++++++-------------------- 1 file changed, 75 insertions(+), 71 deletions(-) diff --git a/gnu/packages/julia.scm b/gnu/packages/julia.scm index 65a5e42beb..2516e7fa82 100644 --- a/gnu/packages/julia.scm +++ b/gnu/packages/julia.scm @@ -158,7 +158,7 @@ (define-public julia (package (name "julia") - (version "1.1.1") + (version "1.1.1") ;; Update also JULIA_LOAD_PATH with it (source (origin (method url-fetch) (uri (string-append @@ -229,77 +229,77 @@ ;; Some tests require a home directory to be set. (lambda _ (setenv "HOME" "/tmp") #t)) (add-after 'unpack 'hardcode-soname-map - ;; ./src/runtime_ccall.cpp creates a map from library names to paths - ;; using the output of "/sbin/ldconfig -p". Since ldconfig is not - ;; used in Guix, we patch runtime_ccall.cpp to contain a static map. - (lambda* (#:key inputs #:allow-other-keys) - (use-modules (ice-9 match)) - (substitute* "src/runtime_ccall.cpp" - ;; Patch out invocations of '/sbin/ldconfig' to avoid getting - ;; error messages about missing '/sbin/ldconfig' on Guix System. - (("popen\\(.*ldconfig.*\\);") - "NULL;\n") + ;; ./src/runtime_ccall.cpp creates a map from library names to paths + ;; using the output of "/sbin/ldconfig -p". Since ldconfig is not + ;; used in Guix, we patch runtime_ccall.cpp to contain a static map. + (lambda* (#:key inputs #:allow-other-keys) + (use-modules (ice-9 match)) + (substitute* "src/runtime_ccall.cpp" + ;; Patch out invocations of '/sbin/ldconfig' to avoid getting + ;; error messages about missing '/sbin/ldconfig' on Guix System. + (("popen\\(.*ldconfig.*\\);") + "NULL;\n") - ;; Populate 'sonameMap'. - (("jl_read_sonames.*;") - (string-join - (map (match-lambda - ((input libname soname) - (string-append - "sonameMap[\"" libname "\"] = " - "\"" (assoc-ref inputs input) "/lib/" soname "\";"))) - '(("libc" "libc" "libc.so.6") - ("pcre2" "libpcre2-8" "libpcre2-8.so") - ("mpfr" "libmpfr" "libmpfr.so") - ("openblas" "libblas" "libopenblas.so") - ("arpack-ng" "libarpack" "libarpack.so") - ("lapack" "liblapack" "liblapack.so") - ("libgit2" "libgit2" "libgit2.so") - ("gmp" "libgmp" "libgmp.so") - ("openspecfun" "libopenspecfun" "libopenspecfun.so") - ("fftw" "libfftw3" "libfftw3_threads.so") - ("fftwf" "libfftw3f" "libfftw3f_threads.so")))))) - (substitute* "base/math.jl" - (("const libm = Base.libm_name") - (string-append "const libm = \"" - (assoc-ref inputs "openlibm") - "/lib/libopenlibm.so" - "\"")) - (("const openspecfun = \"libopenspecfun\"") - (string-append "const openspecfun = \"" - (assoc-ref inputs "openspecfun") - "/lib/libopenspecfun.so" - "\""))) - #t)) + ;; Populate 'sonameMap'. + (("jl_read_sonames.*;") + (string-join + (map (match-lambda + ((input libname soname) + (string-append + "sonameMap[\"" libname "\"] = " + "\"" (assoc-ref inputs input) "/lib/" soname "\";"))) + '(("libc" "libc" "libc.so.6") + ("pcre2" "libpcre2-8" "libpcre2-8.so") + ("mpfr" "libmpfr" "libmpfr.so") + ("openblas" "libblas" "libopenblas.so") + ("arpack-ng" "libarpack" "libarpack.so") + ("lapack" "liblapack" "liblapack.so") + ("libgit2" "libgit2" "libgit2.so") + ("gmp" "libgmp" "libgmp.so") + ("openspecfun" "libopenspecfun" "libopenspecfun.so") + ("fftw" "libfftw3" "libfftw3_threads.so") + ("fftwf" "libfftw3f" "libfftw3f_threads.so")))))) + (substitute* "base/math.jl" + (("const libm = Base.libm_name") + (string-append "const libm = \"" + (assoc-ref inputs "openlibm") + "/lib/libopenlibm.so" + "\"")) + (("const openspecfun = \"libopenspecfun\"") + (string-append "const openspecfun = \"" + (assoc-ref inputs "openspecfun") + "/lib/libopenspecfun.so" + "\""))) + #t)) (add-before 'build 'fix-include-and-link-paths - (lambda* (#:key inputs #:allow-other-keys) - ;; LIBUTF8PROC is a linker flag, not a build target. It is - ;; included in the LIBFILES_* variable which is used as a - ;; collection of build targets and a list of libraries to link - ;; against. - (substitute* "src/flisp/Makefile" - (("\\$\\(BUILDDIR\\)/\\$\\(EXENAME\\): \\$\\(OBJS\\) \\$\\(LIBFILES_release\\)") - "$(BUILDDIR)/$(EXENAME): $(OBJS) $(LLT_release)") - (("\\$\\(BUILDDIR\\)/\\$\\(EXENAME\\)-debug: \\$\\(DOBJS\\) \\$\\(LIBFILES_debug\\)") - "$(BUILDDIR)/$(EXENAME)-debug: $(DOBJS) $(LLT_debug)")) + (lambda* (#:key inputs #:allow-other-keys) + ;; LIBUTF8PROC is a linker flag, not a build target. It is + ;; included in the LIBFILES_* variable which is used as a + ;; collection of build targets and a list of libraries to link + ;; against. + (substitute* "src/flisp/Makefile" + (("\\$\\(BUILDDIR\\)/\\$\\(EXENAME\\): \\$\\(OBJS\\) \\$\\(LIBFILES_release\\)") + "$(BUILDDIR)/$(EXENAME): $(OBJS) $(LLT_release)") + (("\\$\\(BUILDDIR\\)/\\$\\(EXENAME\\)-debug: \\$\\(DOBJS\\) \\$\\(LIBFILES_debug\\)") + "$(BUILDDIR)/$(EXENAME)-debug: $(DOBJS) $(LLT_debug)")) - ;; The REPL must be linked with libuv. - (substitute* "ui/Makefile" - (("JLDFLAGS \\+= ") - (string-append "JLDFLAGS += " - (assoc-ref %build-inputs "libuv") - "/lib/libuv.so "))) + ;; The REPL must be linked with libuv. + (substitute* "ui/Makefile" + (("JLDFLAGS \\+= ") + (string-append "JLDFLAGS += " + (assoc-ref %build-inputs "libuv") + "/lib/libuv.so "))) - (substitute* "base/Makefile" - (("\\$\\(build_includedir\\)/uv/errno.h") - (string-append (assoc-ref inputs "libuv") - "/include/uv/errno.h"))) - #t)) + (substitute* "base/Makefile" + (("\\$\\(build_includedir\\)/uv/errno.h") + (string-append (assoc-ref inputs "libuv") + "/include/uv/errno.h"))) + #t)) (add-before 'build 'replace-default-shell - (lambda _ - (substitute* "base/client.jl" - (("/bin/sh") (which "sh"))) - #t)) + (lambda _ + (substitute* "base/client.jl" + (("/bin/sh") (which "sh"))) + #t)) (add-after 'unpack 'hardcode-paths (lambda _ (substitute* "stdlib/InteractiveUtils/src/InteractiveUtils.jl" @@ -345,9 +345,9 @@ ;; platforms, e.g. when running "guix package --search=" (_ "MARCH=UNSUPPORTED")) - "CONFIG_SHELL=bash" ;needed to build bundled libraries - "USE_SYSTEM_DSFMT=0" ;not packaged for Guix and upstream has no - ;build system for a shared library. + "CONFIG_SHELL=bash" ;needed to build bundled libraries + "USE_SYSTEM_DSFMT=0" ;not packaged for Guix and upstream has no + ;build system for a shared library. "USE_SYSTEM_LAPACK=1" "USE_SYSTEM_BLAS=1" "USE_BLAS64=0" ;needed when USE_SYSTEM_BLAS=1 @@ -485,7 +485,11 @@ (native-search-paths (list (search-path-specification (variable "JULIA_LOAD_PATH") - (files (list "share/julia/packages/"))))) + (files (list "share/julia/packages/" + "share/julia/stdlib/v1.1/"))) + (search-path-specification + (variable "JULIA_DEPOT_PATH") + (files (list "share/julia/"))))) ;; Julia is not officially released for ARM and MIPS. ;; See https://github.com/JuliaLang/julia/issues/10639 (supported-systems '("i686-linux" "x86_64-linux" "aarch64-linux")) -- 2.24.0