diff --git a/_constraints b/_constraints index 97ca851..29a0b63 100644 --- a/_constraints +++ b/_constraints @@ -3,7 +3,7 @@ kvm - 8000 + 8 diff --git a/julia-hardcoded-libs.patch b/julia-hardcoded-libs.patch index ca0527e..d6f04af 100644 --- a/julia-hardcoded-libs.patch +++ b/julia-hardcoded-libs.patch @@ -1,16 +1,3 @@ -diff --git a/stdlib/libLLVM_jll/src/libLLVM_jll.jl b/stdlib/libLLVM_jll/src/libLLVM_jll.jl -index fa45e754e5..b51812e3a8 100644 ---- a/stdlib/libLLVM_jll/src/libLLVM_jll.jl -+++ b/stdlib/libLLVM_jll/src/libLLVM_jll.jl -@@ -23,7 +23,7 @@ if Sys.iswindows() - elseif Sys.isapple() - const libLLVM = "@rpath/libLLVM.dylib" - else -- const libLLVM = "libLLVM-14jl.so" -+ const libLLVM = "libLLVM-15.so" - end - - function __init__() diff --git a/stdlib/nghttp2_jll/src/nghttp2_jll.jl b/stdlib/nghttp2_jll/src/nghttp2_jll.jl index 8b98c76ac5..77ad9e3800 100644 --- a/stdlib/nghttp2_jll/src/nghttp2_jll.jl diff --git a/julia-rpmlintrc b/julia-rpmlintrc index 20173be..636259f 100644 --- a/julia-rpmlintrc +++ b/julia-rpmlintrc @@ -2,3 +2,8 @@ addFilter("E: devel-file-in-non-devel-package.*/usr/lib.*/julia/.*") # Julia has sofiles that are not actually an issue addFilter("E: arch-dependent-file-in-usr-share*") +# We should not unstrip sofiles or binaries generated from this package +# https://github.com/JuliaLang/julia/issues/17941 +addFilter("unstripped-binary-or-object") +# Julia should be an exception. Otherwise, it fails to execute :) +addFilter("devel-dependency") diff --git a/julia.changes b/julia.changes index 7e14359..c4dcdeb 100644 --- a/julia.changes +++ b/julia.changes @@ -1,3 +1,27 @@ +------------------------------------------------------------------- +Sun Dec 10 14:59:09 UTC 2023 - Soc Virnyl Estela + +- Update rpmlintrc file +- Improve specfile + +------------------------------------------------------------------- +Sun Dec 10 11:07:21 UTC 2023 - Soc Virnyl Estela + +- Just use unit G and number 8 for constraints file + +------------------------------------------------------------------- +Sun Dec 10 10:38:15 UTC 2023 - Soc Virnyl Estela + +- Fix issue looking for libLLVM-14jl.so by updating julia-hardcoded-libs.patch +- Include LD_LIBRARY_PATH +- Also prepare for update-alternatives since juliaup is the other provider of julia + +------------------------------------------------------------------- +Sat Dec 9 23:46:12 UTC 2023 - Soc Virnyl Estela + +- Do not use system llvm. Use the one provided by julia as a bundled tarball +- Comment out llvm specific patchsets. + ------------------------------------------------------------------- Sat Dec 9 08:55:41 UTC 2023 - Soc Virnyl Estela diff --git a/julia.spec b/julia.spec index d96f358..d636662 100644 --- a/julia.spec +++ b/julia.spec @@ -58,13 +58,16 @@ Patch9: https://gitlab.archlinux.org/archlinux/packaging/packages/julia/ Patch10: use-system-libuv-correctly.patch Patch11: openlibm.patch Patch12: llvm-link-shared.patch -Patch13: https://gitlab.archlinux.org/archlinux/packaging/packages/julia/-/raw/main/julia-hardcoded-libs.patch?ref_type=heads#/julia-hardcoded-libs.patch +# Adapted from https://gitlab.archlinux.org/archlinux/packaging/packages/julia/-/raw/main/julia-hardcoded-libs.patch?ref_type=heads +# We just remove the julia specific llvm sofile change +Patch13: julia-hardcoded-libs.patch Patch14: mbedtls-hardcoded-libs.patch Patch15: libblastrampoline-hardcoded-libs.patch BuildRequires: arpack-ng-devel >= 3.3.0 -BuildRequires: llvm15-devel +BuildRequires: git +BuildRequires: llvm14-devel BuildRequires: libblastrampoline-devel -BuildRequires: lld15 +BuildRequires: lld14 BuildRequires: libwhich BuildRequires: libgit2-devel BuildRequires: zlib-devel @@ -109,6 +112,8 @@ Requires: p7zip >= 16 Requires: readline Requires: ca-certificates Requires: julia-devel = %{version} +Requires(post): %{_sbindir}/update-alternatives +Requires(postun): %{_sbindir}/update-alternatives Recommends: arpack-ng-devel Recommends: git Recommends: gmp-devel @@ -153,7 +158,7 @@ best-of-breed C and Fortran libraries for linear algebra, random number generation, signal processing, and string processing. This package is experimental and by no means supported by upstream. If you want -to use julia, please install juliaup instead +to use julia, please install juliaup instead. %package devel Summary: Julia development, debugging and testing files @@ -173,16 +178,16 @@ debugging Julia itself. %prep %setup -q -n julia-%{version} patch -p1 -i %{PATCH1} -patch -p1 -i %{PATCH2} -patch -p1 -i %{PATCH3} -patch -p1 -i %{PATCH4} -patch -p1 -i %{PATCH5} +# patch -p1 -i %%{PATCH2} +# patch -p1 -i %%{PATCH3} +# patch -p1 -i %%{PATCH4} +# patch -p1 -i %%{PATCH5} # libunwind 1.6 compatibility patch -p1 -i %{PATCH6} # Fix tests with libgit2 1.7 patch -p1 -i %{PATCH8} # Make.inc puts it in the wrong libpath -# patch -p1 -i %{PATCH10} +# patch -p1 -i %%{PATCH10} patch -p1 -i %{PATCH11} patch -p1 -i %{PATCH12} patch -p1 -i %{PATCH13} @@ -209,11 +214,6 @@ popd sed "s/ \$(build_prefix)\\/manifest\\/zlib//" -i deps/llvm.mk %build -# Workaround for https://github.com/JuliaLang/julia/issues/27118 -%global build_cxxflags %(echo %{build_cxxflags} | sed 's/-Wp,-D_GLIBCXX_ASSERTIONS //') -# Workaround for https://github.com/JuliaLang/julia/issues/39822 -# and https://bugzilla.redhat.com/show_bug.cgi?id=1928696 -%global build_cflags %(echo %{build_cflags} | sed 's/-Wp,-D_GNU_SOURCE //') %if 0%{?compat_mode} == 0 %ifarch x86_64 @@ -254,6 +254,7 @@ export LDFLAGS="$LDFLAGS -latomic" # Ref.: https://build.opensuse.org/package/show/security:tls/mbedtls export CFLAGS="%{optflags} -Wno-stringop-overflow -Wno-maybe-uninitialized" export CXXFLAGS="%{optflags} -Wno-stringop-overflow -Wno-maybe-uninitialized" +export LD_LIBRARY_PATH=%{_builddir}/%{buildsubdir}/build/usr/lib:%{_builddir}/%{buildsubdir}/build%{_libdir} make %{?_smp_mflags} \ MARCH=%{julia_march} \ @@ -274,7 +275,7 @@ make %{?_smp_mflags} \ sysconfdir=%{_sysconfdir} \ USE_BINARYBUILDER=0 \ USE_SYSTEM_CSL=1 \ - USE_SYSTEM_LLVM=1 \ + USE_SYSTEM_LLVM=0 \ USE_SYSTEM_LLD=1 \ USE_SYSTEM_LIBUNWIND=1 \ USE_SYSTEM_PCRE=1 \ @@ -306,7 +307,6 @@ make %{?_smp_mflags} \ LIBLAPACKNAME=liblapack \ JLDFLAGS="$LDFLAGS" \ VERBOSE=1 \ - LLVM_CONFIG=llvm-config \ TAGGED_RELEASE_BANNER="openSUSE %{suse_version} experimental build (unofficial)" \ release debug @@ -320,6 +320,7 @@ make %{?_smp_mflags} \ # Ref.: https://build.opensuse.org/package/show/security:tls/mbedtls export CFLAGS="%{optflags} -Wno-stringop-overflow -Wno-maybe-uninitialized" export CXXFLAGS="%{optflags} -Wno-stringop-overflow -Wno-maybe-uninitialized" +export LD_LIBRARY_PATH=%{_builddir}/%{buildsubdir}/build/usr/lib:%{_builddir}/%{buildsubdir}/build%{_libdir} make install DESTDIR=%{buildroot} \ MARCH=%{julia_march} \ @@ -340,7 +341,7 @@ make install DESTDIR=%{buildroot} \ sysconfdir=%{_sysconfdir} \ USE_BINARYBUILDER=0 \ USE_SYSTEM_CSL=1 \ - USE_SYSTEM_LLVM=1 \ + USE_SYSTEM_LLVM=0 \ USE_SYSTEM_LLD=1 \ USE_SYSTEM_LIBUNWIND=1 \ USE_SYSTEM_PCRE=1 \ @@ -372,7 +373,6 @@ make install DESTDIR=%{buildroot} \ LIBLAPACKNAME=liblapack \ JLDFLAGS="$LDFLAGS" \ VERBOSE=1 \ - LLVM_CONFIG=llvm-config \ TAGGED_RELEASE_BANNER="openSUSE %{suse_version} experimental build (unofficial)" # GZip man page. @@ -422,15 +422,29 @@ rm %{buildroot}%{_datadir}/appdata/julia.appdata.xml %suse_update_desktop_file -r julia Science Math -%post -p /sbin/ldconfig -%postun -p /sbin/ldconfig +mv %{buildroot}%{_bindir}/julia %{buildroot}%{_bindir}/julia-base +mkdir -p %{buildroot}%{_sysconfdir}/alternatives +ln -sf %{_sysconfdir}/alternatives/julia %{buildroot}%{_bindir}/julia + +%post +%{_sbindir}/update-alternatives --install %{_bindir}/julia \ + julia %{_bindir}/julia-base 5 +%{_sbindir}/ldconfig + +%postun +if [ ! -f %{_bindir}/julia-base ] ; then + %{_sbindir}/update-alternatives --remove julia %{_bindir}/julia-base +fi +%{_sbindir}/ldconfig + %post devel -p /sbin/ldconfig %postun devel -p /sbin/ldconfig %files %doc CONTRIBUTING.md NEWS.md README.md %license LICENSE.md -%{_bindir}/julia +%ghost %{_bindir}/julia +%{_bindir}/julia-base %dir %{_datadir}/julia %{_datadir}/julia/base %{_datadir}/julia/base.cache