diff options
author | Marco Munari | 2021-02-03 20:07:11 +0100 |
---|---|---|
committer | Marco Munari | 2021-02-03 22:53:01 +0100 |
commit | c1d2eb760eb3c56e80cc80286b5faa27ff531041 (patch) | |
tree | ccb0cd3e52b4e0cbd6809ed77383d8378c9c4688 | |
parent | 56a34e1845f28944ef67e85aca2ea64fd39903c7 (diff) | |
download | aur-c1d2eb760eb3c56e80cc80286b5faa27ff531041.tar.gz |
use more of the julia provided deps/; remove two patches; succeed tests
less system depends: OpenBLAS/cblas/lapack,GMP,SuiteParse,mbedTLS,libssh2,curl,libgit2
so succeed building all tests (except Distributed which is still skipped)
skip hash detail for source Make.user (it's not downloaded externally from the repo)
OpebBLAS system provided failed test on a computational check, returning - instead of +
so I put aside the effort to use system OpenBLAS and patch it,
making the packaging smaller
using julia provided OpenBLAS instead of the system OpenBLAS prevents the following error:
Expression: #= /home/mar/aur/julia-git/src/julia/usr/share/julia/stdlib/v1.7/LinearAlgebra/test/lu.jl:287 =# @inferred(logdet(ComplexF32[1.0f0 0.5f0; 0.5f0 -1.0f0])) === 0.22314355f0 + 3.1415927f0im
remove patches not enrured necessary while encountering abundant test errors,
make-install-no-build.patch omitted a second build with possibly
a finalized environment, I rather prefer to let a second run for the moment
otherwise this patch intended for efficiency should be broguth to Julia source,
compilers are also designed not to produce the output when the input is older,
if makefile order the build and it does build I expect its's for a reason,
but I didn't search for it
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | Make.user | 17 | ||||
-rw-r--r-- | PKGBUILD | 32 | ||||
-rw-r--r-- | julia-system-cblas.patch | 133 | ||||
-rw-r--r-- | make-install-no-build.patch | 16 |
5 files changed, 17 insertions, 187 deletions
@@ -29,14 +29,10 @@ pkgbase = julia-git depends = gtk-update-icon-cache source = git+https://github.com/JuliaLang/julia.git#branch=master source = Make.user - source = julia-system-cblas.patch source = libunwind-version.patch - source = make-install-no-build.patch sha256sums = SKIP - sha256sums = 1aee33d62dcd8e6b65672bd9996a61c83e44056dd31efa79761cb85effb0e6a1 - sha256sums = d4c8fe9eec1bc416549924ae328ceb3f63cc736ecd5e67886faa924e7c14bc5d + sha256sums = aa1d700f7a752bf7b9e912c3c796871d7b49bdddf21120dadb1a4270404c2571 sha256sums = 856dab2da8124df95e4fbd17f1164bebe1b10e99852fedf38f9dfe31f8ae295c - sha256sums = 09b6077149fa3d22b71b63e471f077d1f3dbeb39d682030c73c316e939e2cc19 pkgname = julia-git optdepends = openblas-lapack: multithreaded replacement for lapack diff --git a/Make.user b/Make.user index 526cb9bdedc6..b7aeecd3b422 100644 --- a/Make.user +++ b/Make.user @@ -7,18 +7,17 @@ USE_SYSTEM_PCRE:=1 USE_SYSTEM_LIBM:=0 USE_SYSTEM_OPENLIBM:=1 USE_SYSTEM_DSFMT:=0 -USE_SYSTEM_BLAS:=1 -USE_SYSTEM_LAPACK:=1 -USE_SYSTEM_GMP:=1 +USE_SYSTEM_BLAS:=0 +USE_SYSTEM_LAPACK:=0 +USE_SYSTEM_GMP:=0 USE_SYSTEM_MPFR:=1 -USE_SYSTEM_SUITESPARSE:=1 +USE_SYSTEM_SUITESPARSE:=0 USE_SYSTEM_LIBUV:=0 USE_SYSTEM_UTF8PROC:=1 -USE_SYSTEM_MBEDTLS:=1 -USE_SYSTEM_LIBSSH2:=1 -USE_SYSTEM_CURL:=1 -USE_SYSTEM_LIBGIT2:=1 +USE_SYSTEM_MBEDTLS:=0 +USE_SYSTEM_LIBSSH2:=0 +USE_SYSTEM_CURL:=0 +USE_SYSTEM_LIBGIT2:=0 USE_SYSTEM_PATCHELF:=1 USE_SYSTEM_ZLIB:=1 USE_SYSTEM_P7ZIP:=1 - @@ -5,7 +5,7 @@ _pkgbase=julia pkgbase=${_pkgbase}-git pkgname=(julia-git julia-git-docs) -pkgver=1.7.0.DEV.r48883.gd3012d7b6c2 +pkgver=1.7.0.DEV.r48887.g6b91bbba6f6 pkgrel=1 arch=(x86_64) pkgdesc='High-level, high-performance, dynamic programming language' @@ -15,17 +15,9 @@ depends=(#compare with grep =1 Make.user|cut -c 11-|cut -d: -f1|tr _A-Z \\ta-z libunwind pcre2 openlibm - openblas - cblas - lapack gmp mpfr - suitesparse libutf8proc - mbedtls - libssh2 - curl - libgit2 zlib p7zip xdg-utils desktop-file-utils @@ -40,14 +32,10 @@ makedepends=( ) source=(git+https://github.com/JuliaLang/julia.git#branch=master Make.user - julia-system-cblas.patch - libunwind-version.patch - make-install-no-build.patch) + libunwind-version.patch) sha256sums=('SKIP' - '1aee33d62dcd8e6b65672bd9996a61c83e44056dd31efa79761cb85effb0e6a1' - 'd4c8fe9eec1bc416549924ae328ceb3f63cc736ecd5e67886faa924e7c14bc5d' - '856dab2da8124df95e4fbd17f1164bebe1b10e99852fedf38f9dfe31f8ae295c' - '09b6077149fa3d22b71b63e471f077d1f3dbeb39d682030c73c316e939e2cc19') + 'SKIP' + '856dab2da8124df95e4fbd17f1164bebe1b10e99852fedf38f9dfe31f8ae295c') pkgver() { @@ -67,15 +55,9 @@ prepare() { msg2 'Configuring the build...' cp -v $srcdir/Make.user . - # Add and use option to build with system cblas - patch -p1 -i ../julia-system-cblas.patch - # Fixing libunwind version check # https://github.com/JuliaLang/julia/pull/29082 patch -p1 -i ../libunwind-version.patch - - # Don't build again in install - patch -p1 -i ../make-install-no-build.patch } build() { @@ -93,8 +75,10 @@ check() { cd "$_pkgbase/test" # this is the make testall target, plus the --skip option from - # travis/appveyor/circleci (one test fails with DNS resolution errors) - ../julia --check-bounds=yes --startup-file=no ./runtests.jl all --skip Sockets --skip Distributed --skip LibGit2/libgit2 + # travis/appveyor/circleci (one test failed with DNS resolution errors) + ../julia --check-bounds=yes --startup-file=no ./runtests.jl all \ + --skip Distributed + find ../stdlib \( -name \*.cov -o -name \*.mem \) -delete rm -r depot/compiled } diff --git a/julia-system-cblas.patch b/julia-system-cblas.patch deleted file mode 100644 index 16f91c8c5dd5..000000000000 --- a/julia-system-cblas.patch +++ /dev/null @@ -1,133 +0,0 @@ -From 0c442318196389d653ee21eba65d8c4f7beb72a0 Mon Sep 17 00:00:00 2001 -From: Eli Schwartz <eschwartz@archlinux.org> -Date: Fri, 5 Oct 2018 15:52:17 +0000 -Subject: [PATCH] Use a dedicated cblas library, that may or may not be in fact - the blas one. - -Openblas can be built with statically compiled convenience copies of -cblas, but if not, then the system libcblas.so should be used. ---- - Make.inc | 12 +++++++++++- - Makefile | 3 +++ - base/Makefile | 4 ++++ - stdlib/LinearAlgebra/src/blas.jl | 15 +++++++++++++-- - 4 files changed, 31 insertions(+), 3 deletions(-) - -diff --git a/Make.inc b/Make.inc -index b00a41b356d8..7bc6cd69e863 100644 ---- a/Make.inc -+++ b/Make.inc -@@ -945,6 +945,7 @@ endif - ifeq ($(USE_SYSTEM_BLAS), 1) - ifeq ($(OS), Darwin) - USE_BLAS64 := 0 -+USE_SYSTEM_CBLAS := 0 - USE_SYSTEM_LAPACK := 0 - LIBBLAS := -L$(build_libdir) -lgfortblas - LIBBLASNAME := libgfortblas -@@ -957,12 +958,21 @@ LIBBLAS := -L$(build_shlibdir) -lopenblas - LIBBLASNAME := libopenblas - endif - --# OpenBLAS builds LAPACK as part of its build. -+# OpenBLAS builds cblas/LAPACK as part of its build. - # We only need to build LAPACK if we are not using OpenBLAS. - ifeq ($(USE_SYSTEM_BLAS), 0) -+LIBCBLAS := $(LIBBLAS) -+LIBCBLASNAME := $(LIBBLASNAME) - LIBLAPACK := $(LIBBLAS) - LIBLAPACKNAME := $(LIBBLASNAME) - else -+ifeq ($(USE_SYSTEM_CBLAS), 1) -+LIBCBLAS ?= -lcblas -+LIBCBLASNAME ?= libcblas -+else -+LIBCBLAS := -L$(build_shlibdir) -lcblas $(LIBBLAS) -+LIBCBLASNAME := libcblas -+endif - ifeq ($(USE_SYSTEM_LAPACK), 1) - LIBLAPACK ?= -llapack - LIBLAPACKNAME ?= liblapack -diff --git a/Makefile b/Makefile -index 6063e79ae956..7df60b8170d6 100644 ---- a/Makefile -+++ b/Makefile -@@ -184,6 +184,9 @@ endif - endif - - JL_PRIVATE_LIBS-$(USE_SYSTEM_BLAS) += $(LIBBLASNAME) -+ifneq ($(LIBCBLASNAME),$(LIBBLASNAME)) -+JL_PRIVATE_LIBS-$(USE_SYSTEM_CBLAS) += $(LIBCBLASNAME) -+endif - ifneq ($(LIBLAPACKNAME),$(LIBBLASNAME)) - JL_PRIVATE_LIBS-$(USE_SYSTEM_LAPACK) += $(LIBLAPACKNAME) - endif -diff --git a/base/Makefile b/base/Makefile -index 70e6da933d70..8ecfa6902b59 100644 ---- a/base/Makefile -+++ b/base/Makefile -@@ -42,6 +42,7 @@ else - endif - @echo "const libm_name = \"$(LIBMNAME)\"" >> $@ - @echo "const libblas_name = \"$(LIBBLASNAME)\"" >> $@ -+ @echo "const libcblas_name = \"$(LIBCBLASNAME)\"" >> $@ - @echo "const liblapack_name = \"$(LIBLAPACKNAME)\"" >> $@ - ifeq ($(USE_BLAS64), 1) - @echo "const USE_BLAS64 = true" >> $@ -@@ -183,6 +184,9 @@ endif - $(eval $(call symlink_system_library,libpcre2-8,PCRE)) - $(eval $(call symlink_system_library,libdSFMT,DSFMT)) - $(eval $(call symlink_system_library,$(LIBBLASNAME),BLAS)) -+ifneq ($(LIBCBLASNAME),$(LIBBLASNAME)) -+$(eval $(call symlink_system_library,$(LIBCBLASNAME),CBLAS)) -+endif - ifneq ($(LIBLAPACKNAME),$(LIBBLASNAME)) - $(eval $(call symlink_system_library,$(LIBLAPACKNAME),LAPACK)) - endif -diff --git a/stdlib/LinearAlgebra/src/blas.jl b/stdlib/LinearAlgebra/src/blas.jl -index fee8c9e74d7e..8c76d1acbf29 100644 ---- a/stdlib/LinearAlgebra/src/blas.jl -+++ b/stdlib/LinearAlgebra/src/blas.jl -@@ -61,6 +61,7 @@ export - - - const libblas = Base.libblas_name -+const libcblas = Base.libcblas_name - const liblapack = Base.liblapack_name - - import LinearAlgebra -@@ -101,6 +102,16 @@ else - end - end - -+if libcblas == libblas -+ macro cblasfunc(x) -+ return @blasfunc(x) -+ end -+else -+ macro cblasfunc(x) -+ return Expr(:quote, x) -+ end -+end -+ - openblas_get_config() = strip(unsafe_string(ccall((@blasfunc(openblas_get_config), libblas), Ptr{UInt8}, () ))) - - """ -@@ -300,7 +311,7 @@ for (fname, elty) in ((:cblas_zdotc_sub,:ComplexF64), - # DOUBLE PRECISION DX(*),DY(*) - function dotc(n::Integer, DX::Union{Ptr{$elty},AbstractArray{$elty}}, incx::Integer, DY::Union{Ptr{$elty},AbstractArray{$elty}}, incy::Integer) - result = Ref{$elty}() -- ccall((@blasfunc($fname), libblas), Cvoid, -+ ccall((@cblasfunc($fname), libcblas), Cvoid, - (BlasInt, Ptr{$elty}, BlasInt, Ptr{$elty}, BlasInt, Ptr{$elty}), - n, DX, incx, DY, incy, result) - result[] -@@ -318,7 +329,7 @@ for (fname, elty) in ((:cblas_zdotu_sub,:ComplexF64), - # DOUBLE PRECISION DX(*),DY(*) - function dotu(n::Integer, DX::Union{Ptr{$elty},AbstractArray{$elty}}, incx::Integer, DY::Union{Ptr{$elty},AbstractArray{$elty}}, incy::Integer) - result = Ref{$elty}() -- ccall((@blasfunc($fname), libblas), Cvoid, -+ ccall((@cblasfunc($fname), libcblas), Cvoid, - (BlasInt, Ptr{$elty}, BlasInt, Ptr{$elty}, BlasInt, Ptr{$elty}), - n, DX, incx, DY, incy, result) - result[] diff --git a/make-install-no-build.patch b/make-install-no-build.patch deleted file mode 100644 index 19eeb432dcbf..000000000000 --- a/make-install-no-build.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- julia-1.3.0/Makefile.orig 2019-12-06 12:54:23.879790955 +0000 -+++ julia-1.3.0/Makefile 2019-12-06 12:54:36.329952953 +0000 -@@ -277,12 +277,7 @@ - endif - - --install: $(build_depsbindir)/stringreplace $(BUILDROOT)/doc/_build/html/en/index.html --ifeq ($(BUNDLE_DEBUG_LIBS),1) -- @$(MAKE) $(QUIET_MAKE) all --else -- @$(MAKE) $(QUIET_MAKE) release --endif -+install: $(build_depsbindir)/stringreplace - @for subdir in $(bindir) $(datarootdir)/julia/stdlib/$(VERSDIR) $(docdir) $(man1dir) $(includedir)/julia $(libdir) $(private_libdir) $(sysconfdir) $(libexecdir); do \ - mkdir -p $(DESTDIR)$$subdir; \ - done |