From 6071230c6fdd0394e145d2923accdf79f2131dbcdf3f39148e9373e54d33c490 Mon Sep 17 00:00:00 2001 From: Soc Virnyl Estela Date: Wed, 15 May 2024 12:11:57 +0000 Subject: [PATCH] - More specfile cleanup * Move over some environmental variables into the %{__julia_opts} global rpm var * Adjust to support if system is not Tumbleweed. openblas not building because libpthread troubles OBS-URL: https://build.opensuse.org/package/show/science/julia?expand=0&rev=179 --- julia.changes | 7 +++++++ julia.spec | 16 ++++++++-------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/julia.changes b/julia.changes index 91f15ba..ac7c2bf 100644 --- a/julia.changes +++ b/julia.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed May 15 12:09:21 UTC 2024 - Soc Virnyl Estela + +- More specfile cleanup + * Move over some environmental variables into the %{__julia_opts} global rpm var + * Adjust to support if system is not Tumbleweed. openblas not building because libpthread troubles + ------------------------------------------------------------------- Wed May 15 11:35:28 UTC 2024 - Soc Virnyl Estela diff --git a/julia.spec b/julia.spec index 65da0e0..9f35cad 100644 --- a/julia.spec +++ b/julia.spec @@ -25,7 +25,13 @@ %global __provides_exclude_from ^%{_libdir}/%{name}/.*\\.so$ %global julia_march native -%global __julia_opts USE_BINARYBUILDER=0 USE_SYSTEM_CSL=1 USE_SYSTEM_LLVM=0 USE_SYSTEM_LLD=0 OPENBLAS_CFLAGS="${CFLAGS}" LIBBLAS=-lopenblas64_ LIBBLASNAME=libopenblas64_ LIBLAPACK=-lopenblas64_ LIBLAPACKNAME=libopenblas64_ SUITESPARSE_LIB="-lumfpack64_ -lcholmod64_ -lamd64_ -lcamd64_ -lcolamd64_ -lspqr64_" USE_SYSTEM_LIBUNWIND=1 USE_SYSTEM_PCRE=0 USE_SYSTEM_BLAS=0 USE_SYSTEM_LAPACK=0 USE_SYSTEM_LIBBLASTRAMPOLINE=0 USE_SYSTEM_GMP=0 USE_SYSTEM_MPFR=0 USE_SYSTEM_LIBSUITESPARSE=0 USE_SYSTEM_SUITESPARSE=0 USE_INTEL_JITEVENTS=0 USE_SYSTEM_LIBWHICH=1 USE_SYSTEM_DSFMT=0 USE_SYSTEM_LIBUV=0 USE_SYSTEM_UTF8PROC=1 USE_SYSTEM_LIBGIT2=0 USE_SYSTEM_LIBSSH2=0 USE_SYSTEM_MBEDTLS=0 USE_SYSTEM_CURL=1 USE_SYSTEM_PATCHELF=1 USE_SYSTEM_ZLIB=1 USE_SYSTEM_P7ZIP=1 USE_SYSTEM_OPENLIBM=1 USE_BLAS64=1 JLDFLAGS="$LDFLAGS" USE_BINARYBUILDER_BLASTRAMPOLINE=0 USE_BINARYBUILDER_CURL=0 USE_BINARYBUILDER_DSFMT=0 USE_BINARYBUILDER_GMP=0 USE_BINARYBUILDER_LIBGIT2=0 USE_BINARYBUILDER_LIBSSH2=0 USE_BINARYBUILDER_LIBSUITESPARSE=0 USE_BINARYBUILDER_LIBTRACYCLIENT=0 USE_BINARYBUILDER_LIBUNWIND=0 USE_BINARYBUILDER_LIBUV=0 USE_BINARYBUILDER_LLVM=0 USE_BINARYBUILDER_MBEDTLS=0 USE_BINARYBUILDER_MPFR=0 USE_BINARYBUILDER_OPENBLAS=0 USE_BINARYBUILDER_OPENLIBM=0 USE_BINARYBUILDER_P7ZIP=0 USE_BINARYBUILDER_PCRE=0 USE_BINARYBUILDER_ZLIB=0 VERBOSE=0 + +# If not Tumbleweed. Leap 15.6 seems to have trouble with libpthread +%if 0%{?suse_version} < 1600 +%global __julia_opts USE_BINARYBUILDER=0 USE_SYSTEM_CSL=1 USE_SYSTEM_LLVM=0 USE_SYSTEM_LLD=0 OPENBLAS_USE_THREAD=0 OPENBLAS_SYMBOLSUFFIX="%{?__isa_bits}_" OPENBLAS_LIBNAMESUFFIX="%{?__isa_bits}_" OPENBLAS_CFLAGS="${CFLAGS}" LIBBLAS=-lopenblas64_ LIBBLASNAME=libopenblas64_ LIBLAPACK=-lopenblas64_ LIBLAPACKNAME=libopenblas64_ SUITESPARSE_LIB="-lumfpack64_ -lcholmod64_ -lamd64_ -lcamd64_ -lcolamd64_ -lspqr64_" USE_SYSTEM_LIBUNWIND=1 USE_SYSTEM_PCRE=0 USE_SYSTEM_BLAS=0 USE_SYSTEM_LAPACK=0 USE_SYSTEM_LIBBLASTRAMPOLINE=0 USE_SYSTEM_GMP=0 USE_SYSTEM_MPFR=0 USE_SYSTEM_LIBSUITESPARSE=0 USE_SYSTEM_SUITESPARSE=0 USE_INTEL_JITEVENTS=0 USE_SYSTEM_LIBWHICH=1 USE_SYSTEM_DSFMT=0 USE_SYSTEM_LIBUV=0 USE_SYSTEM_UTF8PROC=1 USE_SYSTEM_LIBGIT2=0 USE_SYSTEM_LIBSSH2=0 USE_SYSTEM_MBEDTLS=0 USE_SYSTEM_CURL=1 USE_SYSTEM_PATCHELF=1 USE_SYSTEM_ZLIB=1 USE_SYSTEM_P7ZIP=1 USE_SYSTEM_OPENLIBM=1 USE_BLAS64=1 JLDFLAGS="$LDFLAGS" USE_BINARYBUILDER_BLASTRAMPOLINE=0 USE_BINARYBUILDER_CURL=0 USE_BINARYBUILDER_DSFMT=0 USE_BINARYBUILDER_GMP=0 USE_BINARYBUILDER_LIBGIT2=0 USE_BINARYBUILDER_LIBSSH2=0 USE_BINARYBUILDER_LIBSUITESPARSE=0 USE_BINARYBUILDER_LIBTRACYCLIENT=0 USE_BINARYBUILDER_LIBUNWIND=0 USE_BINARYBUILDER_LIBUV=0 USE_BINARYBUILDER_LLVM=0 USE_BINARYBUILDER_MBEDTLS=0 USE_BINARYBUILDER_MPFR=0 USE_BINARYBUILDER_OPENBLAS=0 USE_BINARYBUILDER_OPENLIBM=0 USE_BINARYBUILDER_P7ZIP=0 USE_BINARYBUILDER_PCRE=0 USE_BINARYBUILDER_ZLIB=0 VERBOSE=0 +%else +%global __julia_opts USE_BINARYBUILDER=0 USE_SYSTEM_CSL=1 USE_SYSTEM_LLVM=0 USE_SYSTEM_LLD=0 OPENBLAS_SYMBOLSUFFIX="%{?__isa_bits}_" OPENBLAS_LIBNAMESUFFIX="%{?__isa_bits}_" OPENBLAS_CFLAGS="${CFLAGS}" LIBBLAS=-lopenblas64_ LIBBLASNAME=libopenblas64_ LIBLAPACK=-lopenblas64_ LIBLAPACKNAME=libopenblas64_ SUITESPARSE_LIB="-lumfpack64_ -lcholmod64_ -lamd64_ -lcamd64_ -lcolamd64_ -lspqr64_" USE_SYSTEM_LIBUNWIND=1 USE_SYSTEM_PCRE=0 USE_SYSTEM_BLAS=0 USE_SYSTEM_LAPACK=0 USE_SYSTEM_LIBBLASTRAMPOLINE=0 USE_SYSTEM_GMP=0 USE_SYSTEM_MPFR=0 USE_SYSTEM_LIBSUITESPARSE=0 USE_SYSTEM_SUITESPARSE=0 USE_INTEL_JITEVENTS=0 USE_SYSTEM_LIBWHICH=1 USE_SYSTEM_DSFMT=0 USE_SYSTEM_LIBUV=0 USE_SYSTEM_UTF8PROC=1 USE_SYSTEM_LIBGIT2=0 USE_SYSTEM_LIBSSH2=0 USE_SYSTEM_MBEDTLS=0 USE_SYSTEM_CURL=1 USE_SYSTEM_PATCHELF=1 USE_SYSTEM_ZLIB=1 USE_SYSTEM_P7ZIP=1 USE_SYSTEM_OPENLIBM=1 USE_BLAS64=1 JLDFLAGS="$LDFLAGS" USE_BINARYBUILDER_BLASTRAMPOLINE=0 USE_BINARYBUILDER_CURL=0 USE_BINARYBUILDER_DSFMT=0 USE_BINARYBUILDER_GMP=0 USE_BINARYBUILDER_LIBGIT2=0 USE_BINARYBUILDER_LIBSSH2=0 USE_BINARYBUILDER_LIBSUITESPARSE=0 USE_BINARYBUILDER_LIBTRACYCLIENT=0 USE_BINARYBUILDER_LIBUNWIND=0 USE_BINARYBUILDER_LIBUV=0 USE_BINARYBUILDER_LLVM=0 USE_BINARYBUILDER_MBEDTLS=0 USE_BINARYBUILDER_MPFR=0 USE_BINARYBUILDER_OPENBLAS=0 USE_BINARYBUILDER_OPENLIBM=0 USE_BINARYBUILDER_P7ZIP=0 USE_BINARYBUILDER_PCRE=0 USE_BINARYBUILDER_ZLIB=0 VERBOSE=0 +%endif # List all bundled libraries. %global _privatelibs lib(ssh*|pcre*|dSFMT*|gmp*|mpfr*|git*|mbed*|nghttp*||LLVM-.*|ccalltest|llvmcalltest|uv|openblas*|lapack*|sys|julia.*|amd|btf|camd|ccolamd|cholmod|colamd|cxsparse|graphblas|klu|klu_cholmod|lagraph|lagraphx|ldl|paru|rbio|spex|spqr|suitesparse_mongoose|suitesparseconfig|umfpack)\\.so.* @@ -330,9 +336,7 @@ ln -sf %{_libdir}/libblastrampoline.so %{_builddir}/%{buildsubdir}/build/%{_libd export USE_BLAS64=1 export USE_BINARYBUILDER_OPENBLAS=0 # Suffix is 64_ (with underscore) if 64-bit because OpenBlas_jll seems to use that suffix -export OPENBLAS_LIBNAMESUFFIX="%{?__isa_bits}_" -export OPENBLAS_SYMBOLSUFFIX="%{?__isa_bits}_" -export OPENBLAS_CFLAGS="%{optflags}" + export LD_LIBRARY_PATH="%{_builddir}/%{buildsubdir}/build/usr/lib:%{_builddir}/%{buildsubdir}/build%{_libdir}:/usr/lib64:/usr/lib" make MARCH=%{julia_march} prefix=%{_prefix} libdir=%{_libdir} bindir=%{_bindir} build_prefix="%{_builddir}/%{buildsubdir}/build%{_prefix}" build_libdir="%{_builddir}/%{buildsubdir}/build%{_libdir}" -C deps install-pcre %{__julia_opts} make MARCH=%{julia_march} prefix=%{_prefix} libdir=%{_libdir} bindir=%{_bindir} build_prefix="%{_builddir}/%{buildsubdir}/build%{_prefix}" build_libdir="%{_builddir}/%{buildsubdir}/build%{_libdir}" -C deps install-openblas %{__julia_opts} @@ -365,8 +369,6 @@ make %{?_smp_mflags} \ datarootdir=%{_datarootdir} \ includedir=%{_includedir} \ sysconfdir=%{_sysconfdir} \ - OPENBLAS_LIBNAMESUFFIX="%{?__isa_bits}_" \ - OPENBLAS_SYMBOLSUFFIX="%{?__isa_bits}_" \ %{__julia_opts} \ %if 0%{?suse_version} > 1600 TAGGED_RELEASE_BANNER="openSUSE Tumbleweed Build" \ @@ -420,8 +422,6 @@ make install DESTDIR=%{buildroot} \ datarootdir=%{_datarootdir} \ includedir=%{_includedir} \ sysconfdir=%{_sysconfdir} \ - OPENBLAS_LIBNAMESUFFIX="%{?__isa_bits}_" \ - OPENBLAS_SYMBOLSUFFIX="%{?__isa_bits}_" \ %{__julia_opts} \ %if 0%{?suse_version} > 1600 TAGGED_RELEASE_BANNER="openSUSE Tumbleweed Build"