public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/julia] epel10: Unbundle SuiteSparse
@ 2026-12-01 21:39 Milan Bouchet-Valat
0 siblings, 0 replies; only message in thread
From: Milan Bouchet-Valat @ 2026-12-01 21:39 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/julia
Branch : epel10
Commit : c1598d282767dde212bcc825499ebb978d434dc4
Author : Milan Bouchet-Valat <nalimilan@club.fr>
Date : 2019-10-21T14:43:25+02:00
Stats : +29/-16 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/julia/c/c1598d282767dde212bcc825499ebb978d434dc4?branch=epel10
Log:
Unbundle SuiteSparse
Use the new suitesparse64_ package which links against openblas64_.
This requires setting the symlinks to the appropriate libraries manually,
as Julia hardcodes their names.
Also set USE_BINARYBUILDER=0 to prevent the build process from downloading
pre-built binaries instead of using the provided tarballs.
---
diff --git a/julia.spec b/julia.spec
index 63a7447..a879a3c 100644
--- a/julia.spec
+++ b/julia.spec
@@ -7,9 +7,6 @@
%global unwindversion 1.3.1
-# Bundled until https://src.fedoraproject.org/rpms/suitesparse/pull-request/2 is merged
-%global suitesparseversion 5.4.0
-
%global libwhichcommit 81e9723c0273d78493dc8c8ed570f68d9ce7e89e
%global pkgcommit 394e7c5d55d3722f5b2ab660ca0a694ea0041974
@@ -17,7 +14,7 @@
%global __provides_exclude_from ^%{_libdir}/%{name}/.*\\.so$
# List all bundled libraries here
# OpenBLAS is excluded because we set a symlink to libopenblasp
-%global _privatelibs lib(openblas_|openblas64_|suitesparse_wrapper|mpfr|ccalltest|LLVM-.*|uv|unwind|spqr|umfpack|colamd|cholmod|ccolamd|camd|amd|suitesparseconfig)\\.so.*
+%global _privatelibs lib(openblas_|openblas64_|mpfr|ccalltest|LLVM-.*|uv|unwind)\\.so.*
%global __provides_exclude ^(%{_privatelibs})$
%global __requires_exclude ^(%{_privatelibs})$
@@ -36,8 +33,7 @@ Source2: http://releases.llvm.org/%{llvmversion}/llvm-%{llvmversion}.src.
Source3: https://www.mpfr.org/mpfr-current/mpfr-%{mpfrversion}.tar.bz2
Source4: https://api.github.com/repos/vtjnash/libwhich/tarball/%{libwhichcommit}#/libwhich-%{libwhichcommit}.tar.gz
Source5: http://download.savannah.gnu.org/releases/libunwind/libunwind-%{unwindversion}.tar.gz
-Source6: http://faculty.cse.tamu.edu/davis/SuiteSparse/SuiteSparse-%{suitesparseversion}.tar.gz
-Source7: https://api.github.com/repos/JuliaLang/Pkg.jl/tarball/%{pkgcommit}#/Pkg-%{pkgcommit}.tar.gz
+Source6: https://api.github.com/repos/JuliaLang/Pkg.jl/tarball/%{pkgcommit}#/Pkg-%{pkgcommit}.tar.gz
Patch0: julia_unwind_version.patch
Patch1: llvm-julia-installdirs-64.patch
Patch2: julia-Bump-libgit2-to-0.28.2-32806.patch
@@ -45,7 +41,6 @@ Provides: bundled(libuv) = %{uvversion}
Provides: bundled(llvm) = %{llvmversion}
Provides: bundled(mpfr) = %{mpfrversion}
Provides: bundled(libunwind) = %{unwindversion}
-Provides: bundled(suitesparse) = %{suitesparseversion}
BuildRequires: desktop-file-utils
BuildRequires: dSFMT-devel
BuildRequires: gcc
@@ -70,7 +65,11 @@ BuildRequires: curl
BuildRequires: pcre2-devel
BuildRequires: cmake
BuildRequires: perl
-BuildRequires: suitesparse-devel
+%if 0%{?__isa_bits} == 64
+BuildRequires: suitesparse64_-devel >= 4.1
+%else
+BuildRequires: suitesparse-devel >= 4.1
+%endif
BuildRequires: utf8proc-devel >= 2.1
BuildRequires: zlib-devel
Requires: julia-common = %{version}-%{release}
@@ -141,11 +140,10 @@ pushd deps/srccache
cp -p %SOURCE3 .
cp -p %SOURCE4 .
cp -p %SOURCE5 .
- cp -p %SOURCE6 .
popd
pushd stdlib/srccache
- cp -p %SOURCE7 .
+ cp -p %SOURCE6 .
popd
# Required so that the image is not optimized for the build CPU
@@ -188,6 +186,12 @@ popd
%global blas LIBBLAS=-lopenblas LIBBLASNAME=libopenblas LIBLAPACK=-lopenblas LIBLAPACKNAME=libopenblas
%endif
+%if 0%{?__isa_bits} == 64
+%global suitesparse_lib SUITESPARSE_LIB="-lumfpack64_ -lcholmod64_ -lamd64_ -lcamd64_ -lcolamd64_ -lspqr64_"
+%else
+%global suitesparse_lib SUITESPARSE_LIB="-lumfpack -lcholmod -lamd -lcamd -lcolamd -lspqr"
+%endif
+
%if 0%{?el7}
%global cmake CMAKE=cmake3
%else
@@ -195,8 +199,9 @@ popd
%endif
# About build, build_libdir and build_bindir, see https://github.com/JuliaLang/julia/issues/5063#issuecomment-32628111
-%global julia_builddir %{_builddir}/%{name}/build
-%global commonopts USE_SYSTEM_LLVM=0 USE_SYSTEM_LIBUNWIND=0 USE_SYSTEM_PCRE=1 USE_SYSTEM_BLAS=1 USE_SYSTEM_LAPACK=1 USE_SYSTEM_GMP=1 USE_SYSTEM_MPFR=0 USE_SYSTEM_SUITESPARSE=0 USE_SYSTEM_DSFMT=1 USE_SYSTEM_LIBUV=0 USE_SYSTEM_UTF8PROC=1 USE_SYSTEM_LIBGIT2=1 USE_SYSTEM_LIBSSH2=1 USE_SYSTEM_MBEDTLS=1 USE_SYSTEM_CURL=1 USE_SYSTEM_PATCHELF=1 USE_SYSTEM_LIBM=0 USE_SYSTEM_OPENLIBM=1 BUNDLE_DEBUG_LIBS=1 JULIA_SPLITDEBUG=1 TAGGED_RELEASE_BANNER="Fedora %{fedora} build" VERBOSE=1 %{march} %{cpu_target} %{blas} prefix=%{_prefix} bindir=%{_bindir} libdir=%{_libdir} libexecdir=%{_libexecdir} datarootdir=%{_datarootdir} includedir=%{_includedir} sysconfdir=%{_sysconfdir} build_prefix=%{julia_builddir}%{_prefix} build_bindir=%{julia_builddir}%{_bindir} build_libdir=%{julia_builddir}%{_libdir} build_private_libdir=%{julia_builddir}%{_libdir}/julia build_libexecdir=%{julia_builddir}%{_libexecdir} build_datarootdir=%{julia_builddir}%{_datarootdir} build_includedir=%{julia_builddir}%{_includedir} build_sysconfdir=%{julia_builddir}%{_sysconfdir} JULIA_CPU_THREADS=$(echo %{?_smp_mflags} | sed s/-j//)
+%global julia_builddir "$(pwd)"
+
+%global commonopts USE_SYSTEM_LLVM=0 USE_SYSTEM_LIBUNWIND=0 USE_SYSTEM_PCRE=1 USE_SYSTEM_BLAS=1 USE_SYSTEM_LAPACK=1 USE_SYSTEM_GMP=1 USE_SYSTEM_MPFR=0 USE_SYSTEM_SUITESPARSE=1 USE_SYSTEM_DSFMT=1 USE_SYSTEM_LIBUV=0 USE_SYSTEM_UTF8PROC=1 USE_SYSTEM_LIBGIT2=1 USE_SYSTEM_LIBSSH2=1 USE_SYSTEM_MBEDTLS=1 USE_SYSTEM_CURL=1 USE_SYSTEM_PATCHELF=1 USE_SYSTEM_LIBM=0 USE_SYSTEM_OPENLIBM=1 USE_BINARYBUILDER=0 BUNDLE_DEBUG_LIBS=1 JULIA_SPLITDEBUG=1 TAGGED_RELEASE_BANNER="Fedora %{fedora} build" VERBOSE=1 %{march} %{cpu_target} %{blas} %{suitesparse_lib} prefix=%{_prefix} bindir=%{_bindir} libdir=%{_libdir} libexecdir=%{_libexecdir} datarootdir=%{_datarootdir} includedir=%{_includedir} sysconfdir=%{_sysconfdir} build_prefix=%{julia_builddir}%{_prefix} build_bindir=%{julia_builddir}%{_bindir} build_libdir=%{julia_builddir}%{_libdir} build_private_libdir=%{julia_builddir}%{_libdir}/julia build_libexecdir=%{julia_builddir}%{_libexecdir} build_datarootdir=%{julia_builddir}%{_datarootdir} build_includedir=%{julia_builddir}%{_includedir} build_sysconfdir=%{julia_builddir}%{_sysconfdir} JULIA_CPU_THREADS=$(echo %{?_smp_mflags} | sed s/-j//)
%build
# Temporary workaround for https://github.com/JuliaLang/julia/issues/27118
@@ -242,16 +247,25 @@ make %{commonopts} test
%install
make %{commonopts} DESTDIR=%{buildroot} install
-pushd %{buildroot}%{_libdir}/julia
+pushd %{julia_builddir}%{_libdir}/julia
%if 0%{?__isa_bits} == 64
- rm libopenblas64_.so
+ rm -f libopenblas64_.so libopenblas64_.so.0
ln -s %{_libdir}/libopenblasp64_.so.0 libopenblas64_.so
ln -s %{_libdir}/libopenblasp64_.so.0 libopenblas64_.so.0
# Raise an error in case of failure
realpath -e libopenblas64_.so
realpath -e libopenblas64_.so.0
+
+ # Julia creates symlinks to SuiteSparse libraries linking to libopenblas rather than libopenblas64_
+ for LIB in spqr umfpack colamd cholmod ccolamd camd amd suitesparseconfig
+ do
+ rm -f lib${LIB}.so
+ ln -s %{_libdir}/$(readelf -d %{_libdir}/lib${LIB}64_.so | sed -n '/SONAME/s/.*\(lib[^ ]*\.so\.[0-9]*\).*/\1/p') lib${LIB}.so
+ # Raise an error in case of failure
+ realpath -e lib${LIB}.so
+ done
%else
- rm libopenblas.so
+ rm -f libopenblas.so libopenblas.so.0
ln -s %{_libdir}/libopenblasp.so.0 libopenblas.so
ln -s %{_libdir}/libopenblasp.so.0 libopenblas.so.0
# Raise an error in case of failure
diff --git a/sources b/sources
index b5fd218..8a532c1 100644
--- a/sources
+++ b/sources
@@ -4,5 +4,4 @@ SHA512 (mpfr-4.0.2.tar.bz2) = 18bb3a87123d02b7537bc298d41bdbb33e58b8c196cc404057
SHA512 (julia-1.2.0.tar.gz) = c99b0b744508b43df4ee334f588dbb57a633969d7cb164d41b76d552c1d14f5ff6f06a8d0da7f7a48fd1e3a3b3c2379998c5af1bfdff4b0c17045132b82a40b8
SHA512 (libunwind-1.3.1.tar.gz) = 3110d0aed4f5c781ef1ff72c9337e59793c02c42066209a4ac44f50eff1c0b0e02a5ff9f66891e62016de14af065a47975763970b839b700c0ff2e9f415c8def
SHA512 (Pkg-394e7c5d55d3722f5b2ab660ca0a694ea0041974.tar.gz) = 6b5324ee3efad2bf1af6ed4503509c6297e710040ccd7d5c67263625f24eab9a88f28ad56cb77ca04ccc976c051f2fbf2bb2019df442ab4823e5a7aff977b825
-SHA512 (SuiteSparse-5.4.0.tar.gz) = 8328bcc2ef5eb03febf91b9c71159f091ff405c1ba7522e53714120fcf857ceab2d2ecf8bf9a2e1fc45e1a934665a341e3a47f954f87b59934f4fce6164775d6
SHA512 (libwhich-81e9723c0273d78493dc8c8ed570f68d9ce7e89e.tar.gz) = 6fb77b715d70d9bc95a8546c3bf97bd3677c7ea344b88bb5bc3bbfac9dceabe8a8cde7a0f64dec884cde802e4a3000e30837d3f824b5a9242348c4fe061526a3
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-12-01 21:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-12-01 21:39 [rpms/julia] epel10: Unbundle SuiteSparse Milan Bouchet-Valat
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox