From patchwork Sun Aug 7 02:47:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Efraim Flashner X-Patchwork-Id: 41321 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 BA01A27BBEA; Sun, 7 Aug 2022 03:48:11 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id C172B27BBE9 for ; Sun, 7 Aug 2022 03:48:10 +0100 (BST) Received: from localhost ([::1]:57946 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oKWKn-0003Qj-TE for patchwork@mira.cbaines.net; Sat, 06 Aug 2022 22:48:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37640) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oKWKg-0003QT-56 for guix-patches@gnu.org; Sat, 06 Aug 2022 22:48:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:46004) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oKWKf-0004LO-SP for guix-patches@gnu.org; Sat, 06 Aug 2022 22:48:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oKWKf-0007zX-P8 for guix-patches@gnu.org; Sat, 06 Aug 2022 22:48:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#56807] [PATCH] [WIP] Update Julia to 1.8.0 Resent-From: Efraim Flashner Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 07 Aug 2022 02:48:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56807 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Akira Kyle Cc: 56807@debbugs.gnu.org Received: via spool by 56807-submit@debbugs.gnu.org id=B56807.165984044230543 (code B ref 56807); Sun, 07 Aug 2022 02:48:01 +0000 Received: (at 56807) by debbugs.gnu.org; 7 Aug 2022 02:47:22 +0000 Received: from localhost ([127.0.0.1]:35749 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oKWK2-0007wX-07 for submit@debbugs.gnu.org; Sat, 06 Aug 2022 22:47:22 -0400 Received: from mail-qt1-f172.google.com ([209.85.160.172]:33708) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oKWJz-0007wK-NG for 56807@debbugs.gnu.org; Sat, 06 Aug 2022 22:47:20 -0400 Received: by mail-qt1-f172.google.com with SMTP id u12so4545410qtk.0 for <56807@debbugs.gnu.org>; Sat, 06 Aug 2022 19:47:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date:sender:from:to :cc; bh=PMWquWy3lrFnki/drCRB8E7aL3Q3DLmudTCPalKmuIQ=; b=lFJUz3OSI3b9LT5/JHGxyTp4eZwbds8hlLzwuza+o41KIGfmEYJHaBXiv7pNKqtHLS ufdGMC+EkktpVUpQXsP29um5Lcn51Nz7z6P5DPUlroMGiVEzlvpjZXl31u/G5QaVsah+ WwUMlyzHuGbAPXuW0Kc4ec73aMI0wAECRDsNRO5ORnitcMMG8GYsTFHj0wsXOXmlJa4S TNY7SmuIbltgAwcr/gzxz9raMkEtHNQHVW0IR1rJCPMFMLsh8Q1wfJtJZZflaxo1wJsW YTc1UKsxYegDjNpeCiiZYNKMwsFgrXXRIjJXz/WIl7EEjqw+7Lwvqi8J/a7tP8RnQjGi 54sQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date:sender :x-gm-message-state:from:to:cc; bh=PMWquWy3lrFnki/drCRB8E7aL3Q3DLmudTCPalKmuIQ=; b=UlvSeAlf80C0LPJWl8SmBaKxqPgEdH+bXDA7jH4JlpgS/3OIyKyQFbUSKztMgFT530 Tuv9bAlVyd5yLsTK+8XM6Bn6Qba1HNTVZB8gX5vKjx8MK2qg+TmE+wzcj6F0KzqsR5SE lyIl7P6AFZdAIWQe/UDcMz3QaPoKa/1AKTZfovxPV7RDL1+EioU6hI+2/S9Hywp31W8N M5R1VblCXE/N3Pwnon7cC01wM2Dg5Ukt6d2pgkwFhF/06Ic6a8eyAnCIA3UvVHXtzmeL z9jy+G8gcDdYdMw5fQYkxrQPgdKghmcj8Bfvy1zSxogaCgjQHmbo0yt55gwgSelq+FCH l5Rw== X-Gm-Message-State: ACgBeo3a6/b2JMh806HG3qi0+bkBPCcFDqc0usiBHFenmX6OnSvmYtzy yJQzJblopwCE5LT1wR9LVyOVLY2K/EKyDg9G X-Google-Smtp-Source: AA6agR4pO5AEuXa0RENxxQFsxjcGlgJtS/uFDDNwp2k6ct5FeCa/BBep1tHukBDQkLdyc2bUEFqNtw== X-Received: by 2002:ac8:59c5:0:b0:342:eda8:fdfe with SMTP id f5-20020ac859c5000000b00342eda8fdfemr3233551qtf.575.1659840433878; Sat, 06 Aug 2022 19:47:13 -0700 (PDT) Received: from localhost (ool-ad022d7f.dyn.optonline.net. [173.2.45.127]) by smtp.gmail.com with ESMTPSA id v19-20020a05620a441300b006b5f7d0d0b6sm6603082qkp.4.2022.08.06.19.47.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 06 Aug 2022 19:47:12 -0700 (PDT) Date: Sun, 7 Aug 2022 05:47:09 +0300 From: Efraim Flashner Message-ID: Mail-Followup-To: Efraim Flashner , Akira Kyle , 56807@debbugs.gnu.org References: <87y1wd6f1z.fsf@akirakyle.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <87y1wd6f1z.fsf@akirakyle.com> X-PGP-Key-ID: 0x41AAE7DCCA3D8351 X-PGP-Key: https://flashner.co.il/~efraim/efraim_flashner.asc X-PGP-Fingerprint: A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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 I started with your patch and made a few changes on top of it. I haven't started looking into the test suite yet. diff --git a/gnu/packages/julia.scm b/gnu/packages/julia.scm index 68d6d7316d..738a4389b1 100644 --- a/gnu/packages/julia.scm +++ b/gnu/packages/julia.scm @@ -179,10 +179,10 @@ (define-public julia "/lib")) '("curl" "dsfmt" "gmp" "lapack" + "libblastrampoline" "libssh2" "libnghttp2" "libgit2" - "mbedtls" "mpfr" - "openblas" "openblas" "libblastrampoline" - "openlibm" "pcre2" + "mbedtls-apache" "mpfr" + "openblas" "openlibm" "pcre2" "suitesparse" "gfortran:lib")) ":")))) ;; FIXME: Building the documentation requires Julia packages that @@ -211,12 +211,11 @@ (define-public julia "base/Makefile") ((".*libquadmath.*") "")) (substitute* "Makefile" - (("libquadmath ") "")) - #t))) + (("libquadmath ") ""))))) '()) (add-before 'check 'set-home ;; Some tests require a home directory to be set. - (lambda _ (setenv "HOME" "/tmp") #t)) + (lambda _ (setenv "HOME" "/tmp"))) (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 @@ -273,9 +272,9 @@ (define-public julia (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"))) + (((from "libmbedcrypto")) (to "mbedtls-apache" "libmbedcrypto")) + (((from "libmbedtls")) (to "mbedtls-apache" "libmbedtls")) + (((from "libmbedx509")) (to "mbedtls-apache" "libmbedx509"))) (substitute* (jlpath "nghttp2") (((from "libnghttp2")) (to "libnghttp2" "libnghttp2"))) (substitute* (jlpath "OpenBLAS") @@ -313,27 +312,22 @@ (define-public julia (getenv "JULIA_CPU_THREADS")))) (add-after 'unpack 'adjust-test-suite (lambda* (#:key inputs #:allow-other-keys) - (let ((pcre2 (assoc-ref inputs "pcre2")) - (mbedtls-julia (assoc-ref inputs "mbedtls")) - (mpfr (assoc-ref inputs "mpfr")) - (gmp (assoc-ref inputs "gmp")) - (nghttp2 (assoc-ref inputs "libnghttp2")) - (suitesparse (assoc-ref inputs "suitesparse"))) - ;; Some tests only check to see if the input is the correct version. - (substitute* "stdlib/PCRE2_jll/test/runtests.jl" - (("10.36.0") ,(package-version pcre2))) - (substitute* "stdlib/MbedTLS_jll/test/runtests.jl" - (("2.28.0") ,(package-version mbedtls-apache))) - (substitute* "stdlib/MPFR_jll/test/runtests.jl" - (("4.1.0") ,(package-version mpfr))) - (substitute* "stdlib/GMP_jll/test/runtests.jl" - (("6.2.0") ,(package-version gmp))) - (substitute* "stdlib/nghttp2_jll/test/runtests.jl" - (("1.41.0") ,(package-version nghttp2))) - (substitute* "stdlib/SuiteSparse_jll/test/runtests.jl" - (("5004") ,(string-replace-substring - (version-major+minor - (package-version suitesparse)) "." "0")))))) + ;; 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-apache")))) + (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/nghttp2_jll/test/runtests.jl" + (("1.47.0") ,(package-version (this-package-input "libnghttp2")))) + (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 @@ -418,7 +412,7 @@ (define-public julia (basename file))))) (find-files (string-append (assoc-ref inputs pkgname) "/lib") pred))))) - (link "llvm" "libLLVM-11jl\\.so") + (link "llvm" "libLLVM-13jl\\.so") (link "utf8proc" "libutf8proc\\.so")))) (add-after 'install 'make-wrapper (lambda* (#:key inputs outputs #:allow-other-keys) @@ -465,7 +459,7 @@ (define-public julia "USE_SYSTEM_LAPACK=1" "USE_SYSTEM_GMP=1" "USE_SYSTEM_MPFR=1" - "USE_SYSTEM_LIBBLASTRAMPOLINE:=1" + "USE_SYSTEM_LIBBLASTRAMPOLINE=1" "USE_SYSTEM_LIBSUITESPARSE=1" "USE_SYSTEM_LIBUV=1" "USE_SYSTEM_UTF8PROC=1" @@ -475,7 +469,7 @@ (define-public julia "USE_SYSTEM_CURL=1" "USE_SYSTEM_LIBGIT2=1" "USE_SYSTEM_PATCHELF=1" - "USE_SYSTEM_LIBWHICH:=1" + "USE_SYSTEM_LIBWHICH=1" "USE_SYSTEM_ZLIB=1" "USE_SYSTEM_P7ZIP=1" "VERBOSE=1" @@ -508,21 +502,23 @@ (define-public julia ("gfortran:lib" ,gfortran "lib") ("gmp" ,gmp) ("lapack" ,lapack) - ("libgit2" ,libgit2-1.1) + ("libblastrampoline" ,libblastrampoline) + ;("libgit2" ,libgit2-1.1) + ("libgit2" ,libgit2) ("libnghttp2" ,nghttp2 "lib") ("libssh2" ,libssh2) ("libunwind" ,libunwind-julia) ("libuv" ,libuv-julia) - ("llvm" ,llvm-13) - ("mbedtls" ,mbedtls-apache) + ("llvm" ,llvm-julia) + ("mbedtls-apache" ,mbedtls-apache) ("mpfr" ,mpfr) ("openblas" ,openblas) - ("libblastrampoline" ,libblastrampoline) ("openlibm" ,openlibm) ("p7zip" ,p7zip) ("pcre2" ,pcre2) ("suitesparse" ,suitesparse) - ("utf8proc" ,utf8proc-2.6.1) + ;("utf8proc" ,utf8proc-2.6.1) + ("utf8proc" ,utf8proc) ("wget" ,wget) ("which" ,which) ("zlib" ,zlib) diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm index 2d6274b33a..b7cdcc03f5 100644 --- a/gnu/packages/llvm.scm +++ b/gnu/packages/llvm.scm @@ -60,7 +60,6 @@ (define-module (gnu packages llvm) #:use-module (gnu packages bootstrap) ;glibc-dynamic-linker #:use-module (gnu packages check) ;python-lit #:use-module (gnu packages compression) - #:use-module (gnu packages julia) ;julia-patch #:use-module (gnu packages libedit) #:use-module (gnu packages libffi) #:use-module (gnu packages lua) @@ -591,9 +590,8 @@ (define-public llvm-14 '()) "-DCMAKE_SKIP_BUILD_RPATH=FALSE" "-DCMAKE_BUILD_WITH_INSTALL_RPATH=FALSE" + "-DBUILD_SHARED_LIBS:BOOL=TRUE" "-DLLVM_ENABLE_FFI:BOOL=TRUE" - "-DLLVM_BUILD_LLVM_DYLIB=ON" - "-DLLVM_LINK_LLVM_DYLIB=ON" "-DLLVM_REQUIRES_RTTI=1" ;for some third-party utilities "-DLLVM_INSTALL_UTILS=ON") ;needed for rustc ;; Don't use '-g' during the build, to save space. @@ -1925,6 +1923,23 @@ (define-public ocaml-llvm-9 (make-ocaml-llvm llvm-9)) (define-public ocaml-llvm-10 (make-ocaml-llvm llvm-10)) (define-public ocaml-llvm-11 (make-ocaml-llvm llvm-11)) +(define-public llvm-julia + (package + (inherit llvm-13) + (arguments + (substitute-keyword-arguments (package-arguments llvm-13) + ((#:configure-flags flags ''()) + #~(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=" + (system->llvm-target)) + (delete "-DBUILD_SHARED_LIBS:BOOL=TRUE" #$flags))) + ((#:build-type _) "Release"))) + (properties `((hidden? . #t) + ,@(package-properties llvm-13))))) + (define %cling-version "0.9") (define llvm-cling ;LLVM 9 with approximately 10 patches for cling diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index 745c908cfd..e04897de1d 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -4651,35 +4651,6 @@ (define-public openblas "OpenBLAS is a BLAS library forked from the GotoBLAS2-1.13 BSD version.") (license license:bsd-3))) -(define-public libblastrampoline - (package - (name "libblastrampoline") - (version "5.1.1") - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/JuliaLinearAlgebra/libblastrampoline") - (commit (string-append "v" version)))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "0mf79zw11kxyil72y2ly5x8bbz3ng3nsqmp0zcps16b69wvfs19c")))) - (build-system gnu-build-system) - (arguments - '(#:make-flags (list "-C" "src" - (string-append "prefix=" (assoc-ref %outputs "out")) - "CC=gcc") - #:tests? #f ;no check target - #:phases - (modify-phases %standard-phases - (delete 'configure)))) - (home-page "https://github.com/JuliaLinearAlgebra/libblastrampoline") - (synopsis "Using PLT trampolines to provide a BLAS and LAPACK demuxing library. ") - (description - "Using PLT trampolines to provide a BLAS and LAPACK demuxing library. ") - (license license:expat))) - (define-public openblas-ilp64 (package/inherit openblas (name "openblas-ilp64") @@ -4692,6 +4663,35 @@ (define-public openblas-ilp64 (synopsis "Optimized BLAS library based on GotoBLAS (ILP64 version)") (license license:bsd-3))) +(define-public libblastrampoline + (package + (name "libblastrampoline") + (version "5.1.1") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/JuliaLinearAlgebra/libblastrampoline") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0mf79zw11kxyil72y2ly5x8bbz3ng3nsqmp0zcps16b69wvfs19c")))) + (build-system gnu-build-system) + (arguments + `(#:make-flags (list "-C" "src" + (string-append "prefix=" (assoc-ref %outputs "out")) + (string-append "CC=" ,(cc-for-target))) + #:tests? #f ;no check target + #:phases + (modify-phases %standard-phases + (delete 'configure)))) + (home-page "https://github.com/JuliaLinearAlgebra/libblastrampoline") + (synopsis "Using PLT trampolines to provide a BLAS and LAPACK demuxing library.") + (description + "Using PLT trampolines to provide a BLAS and LAPACK demuxing library.") + (license license:expat))) + (define-public blis (package (name "blis") diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm index 7eb6f03f5c..d8123864fc 100644 --- a/gnu/packages/tls.scm +++ b/gnu/packages/tls.scm @@ -1007,8 +1007,7 @@ (define-public mbedtls-apache (modify-phases %standard-phases (add-after 'unpack 'make-source-writable (lambda _ - (for-each make-file-writable (find-files ".")) - #t))))) + (for-each make-file-writable (find-files "."))))))) (native-inputs (list perl python)) (synopsis "Small TLS library")