From patchwork Thu Oct 10 15:49:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Nicol=C3=B2_Balzarotti?= X-Patchwork-Id: 16446 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 9B4EA1782A; Mon, 9 Dec 2019 14:01:27 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 09ECC177E5 for ; Mon, 9 Dec 2019 14:01:27 +0000 (GMT) Received: from localhost ([::1]:40524 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ieJbK-000690-GX for patchwork@mira.cbaines.net; Mon, 09 Dec 2019 09:01:26 -0500 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 X-Loop: help-debbugs@gnu.org 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-From: =?utf-8?q?Nicol=C3=B2?= Balzarotti Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 09 Dec 2019 14:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38546 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Guix Patches <38546@debbugs.gnu.org> Received: via spool by 38546-submit@debbugs.gnu.org id=B38546.157590004311363 (code B ref 38546); Mon, 09 Dec 2019 14:01:02 +0000 Received: (at 38546) by debbugs.gnu.org; 9 Dec 2019 14:00:43 +0000 Received: from localhost ([127.0.0.1]:52797 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ieJaR-0002we-OE for submit@debbugs.gnu.org; Mon, 09 Dec 2019 09:00:43 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:43562) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ieJaP-0002w9-Et for 38546@debbugs.gnu.org; Mon, 09 Dec 2019 09:00:30 -0500 Received: by mail-wr1-f68.google.com with SMTP id d16so16275824wre.10 for <38546@debbugs.gnu.org>; Mon, 09 Dec 2019 06:00:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=H7wc+w6tZQZL6th+Fvp0bJLzljuhSaRMH8S5/FfyG0M=; b=oDjZf64TAyn5e0+ZkBB6c+YApTKDKw0MYo4f0kmkZdb9kvTsz7NopJKEKPFFl5YVbh Q4bbItX6PPTsiYikARpuR+TXhR+gJNHO+IUjX6aULvBSlh/vMou6889FrnsLwo71NLel fovs7r/fyNG5J1QyCm1FeRWDliZVUIlnlYvvNLNQKHNPKTdFV0abfLfO7iW+t/lCukYh LupHFmDBU4E8FGjdqVp5dbY/gK8IBAVD7JnPdrboacWSthdp0B+dYcM1p3Q73dEJx4Px C1Ig36UQ7jgazMWjDs3K6+LuK8nqjn2f1K2E6yb74J/+q9QFpsS0rSOSU0TegNWxcmyu hlUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=H7wc+w6tZQZL6th+Fvp0bJLzljuhSaRMH8S5/FfyG0M=; b=C2rT9/3G7T/vghqcwkPjU2AG+38e9BWqHlfd/vgNih90viYlLRU2ChUjG+LW7hcrtB Cq00J6r6Uh6ge8nHu9dmkin601I83Vitg8snOy26kTcoYDKrdowNMQHcBBqcHLdGD8wS NPw69lS79ddSYHZtDq8hs9BSrNl+4SEx6pcunG3W7snpxQwLMasxOpxGRNZhkD3L59Gt Vq/M0wFsKcwwPsgpu4txdER40rOhR+wS40QiiW0PUMTV6TwP9zoQzPj8ahzZo8LB7aY6 UCGwrEK20/+lZ0sG+jDUO2MiZPgxmocouMOyAssFSSOzX8in/bwYMXytWew0Sq4AGO8R livQ== X-Gm-Message-State: APjAAAXf3WLYoyIED7RfjHVVffKT+baoGqTcd+xiK2Hq5nmz1JoKwLhG M3DHGY54tErfDMyiJLihWBLFO+lnFws= X-Google-Smtp-Source: APXvYqyG49gHGEmBDKk2oEcHRuaqK/I2Uej620LSzDoyUY2piDYiLb78jyJZi5YtmrAGo8rJ/WsLvg== X-Received: by 2002:a5d:61cf:: with SMTP id q15mr2351346wrv.231.1575900022922; Mon, 09 Dec 2019 06:00:22 -0800 (PST) Received: from guixSD (host1-200-dynamic.5-87-r.retail.telecomitalia.it. [87.5.200.1]) by smtp.gmail.com with ESMTPSA id s25sm13304054wmh.4.2019.12.09.06.00.22 for <38546@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Dec 2019 06:00:22 -0800 (PST) From: =?utf-8?q?Nicol=C3=B2?= Balzarotti X-Google-Original-From: nixo 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 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches 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"))