public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Mamoru TASAKA <mtasaka@fedoraproject.org>
To: git-commits@fedoraproject.org
Subject: [rpms/julia] epel10: Fix build with curl7.81 and gcc12
Date: Tue, 01 Dec 2026 21:40:12 GMT [thread overview]
Message-ID: <179616121243.1.8761513063194241901.rpms-julia-eb41c28138c1@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/julia
Branch : epel10
Commit : eb41c28138c1543a36c2e109c34b4d5c540eaf15
Author : Mamoru TASAKA <mtasaka@fedoraproject.org>
Date : 2022-04-07T22:13:42+09:00
Stats : +155/-6 in 3 file(s)
URL : https://src.fedoraproject.org/rpms/julia/c/eb41c28138c1543a36c2e109c34b4d5c540eaf15?branch=epel10
Log:
Fix build with curl7.81 and gcc12
---
diff --git a/julia-1.7.2-multi_jl-curl-7_81-workaround.patch b/julia-1.7.2-multi_jl-curl-7_81-workaround.patch
new file mode 100644
index 0000000..c068698
--- /dev/null
+++ b/julia-1.7.2-multi_jl-curl-7_81-workaround.patch
@@ -0,0 +1,16 @@
+--- JuliaLang-Downloads.jl-26d79af/src/Curl/Multi.jl.debug 2021-10-27 07:48:36.000000000 +0900
++++ JuliaLang-Downloads.jl-26d79af/src/Curl/Multi.jl 2022-02-22 21:11:57.763943806 +0900
+@@ -142,12 +142,7 @@ function timer_callback(
+ )::Cint
+ multi = unsafe_pointer_to_objref(multi_p)::Multi
+ @assert multi_h == multi.handle
+- if timeout_ms == 0
+- lock(multi.lock) do
+- @check curl_multi_socket_action(multi.handle, CURL_SOCKET_TIMEOUT, 0)
+- check_multi_info(multi)
+- end
+- elseif timeout_ms >= 0
++ if timeout_ms >= 0
+ timeout_cb = @cfunction(timeout_callback, Cvoid, (Ptr{Cvoid},))
+ uv_timer_start(multi.timer, timeout_cb, max(1, timeout_ms), 0)
+ elseif timeout_ms == -1
diff --git a/julia.spec b/julia.spec
index 7403909..9f0fcb4 100644
--- a/julia.spec
+++ b/julia.spec
@@ -27,7 +27,7 @@
Name: julia
Version: 1.7.2
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: High-level, high-performance dynamic language for technical computing
# Julia itself is MIT, with a few LGPLv2+ and GPLv2+ files
# libuv is MIT
@@ -45,6 +45,11 @@ Source7: https://api.github.com/repos/staticfloat/libblastrampoline/tarba
Source8: https://github.com/libunwind/libunwind/releases/download/v%{libunwindversion}/libunwind-%{libunwindversion}.tar.gz
# https://github.com/JuliaLang/julia/issues/43249
Patch0: https://raw.githubusercontent.com/archlinux/svntogit-community/packages/julia/trunk/julia-libgit-1.2.patch
+# From https://github.com/libunwind/libunwind/pull/166/
+Patch1: libunwind-1.5-fno-common.patch
+# https://github.com/JuliaLang/Downloads.jl/issues/172
+# https://bugzilla.redhat.com/show_bug.cgi?id=2056842
+Patch2: julia-1.7.2-multi_jl-curl-7_81-workaround.patch
Provides: bundled(libuv) = %{uvversion}
Provides: bundled(llvm) = %{llvmversion}
Provides: bundled(libblastrampoline) = %{blastrampolineversion}
@@ -148,7 +153,14 @@ needed when programming in the Julia language, but rather for embedding
Julia into external programs or debugging Julia itself.
%prep
-%autosetup -p1 -n julia-%{version}
+%setup -q -n julia-%{version}
+%patch0 -p1
+
+# Avoid gcc12 internal float16 truncation/extension function symbol collision
+# (rhbz#2044284)
+grep -rl __truncdfhf2 . | xargs sed -i -e 's|__truncdfhf2|__truncdfhf2_internal|'
+grep -rl __extendhfsf2 . | xargs sed -i -e 's|__extendhfsf2|__extendhfsf2_internal|'
+
mkdir -p deps/srccache stdlib/srccache
@@ -157,17 +169,56 @@ pushd deps/srccache
# we need to copy the tarball and let the build process unpack it
# https://github.com/JuliaLang/julia/pull/10280
cp -p %SOURCE1 .
- cp -p %SOURCE2 .
+ #cp -p %SOURCE2 .
+ # Avoid gcc12 internal float16 truncation/extension function symbol collision
+ # (rhbz#2044284)
+ gzip -dc %SOURCE2 | tar xf -
+ pushd JuliaLang-llvm-project-*
+ grep -rl __truncdfhf2 . | xargs sed -i -e 's|__truncdfhf2|__truncdfhf2_internal|'
+ grep -rl __extendhfsf2 . | xargs sed -i -e 's|__extendhfsf2|__extendhfsf2_internal|'
+ popd
+ tar czf $(basename %SOURCE2) JuliaLang-llvm-project-*/
+ rm -rf JuliaLang-llvm-project-*/
cp -p %SOURCE3 .
cp -p %SOURCE7 .
- cp -p %SOURCE8 .
+ #cp -p %SOURCE8 .
+ # libunwind-1.3.2 need patching
+ gzip -dc %SOURCE8 | tar xf -
+ pushd libunwind-%{libunwindversion}/
+ cat %PATCH1 | patch -p1
+ popd
+ tar czf libunwind-%{libunwindversion}.tar.gz libunwind-%{libunwindversion}/
+ rm -rf libunwind-%{libunwindversion}/
popd
+target=libunwind-%{libunwindversion}.tar.gz
+sed -i deps/checksums/unwind \
+ -e "\@^${target}@s|/md5/.*|/md5/$(md5sum deps/srccache/${target} | sed -e 's| .*||' )|" \
+ -e "\@^${target}@s|/sha512/.*|/sha512/$(sha512sum deps/srccache/${target} | sed -e 's| .*||')|" \
+ %{nil}
+target=$(basename %SOURCE2)
+sed -i deps/checksums/llvm \
+ -e "\@^${target}@s|/md5/.*|/md5/$(md5sum deps/srccache/${target} | sed -e 's| .*||' )|" \
+ -e "\@^${target}@s|/sha512/.*|/sha512/$(sha512sum deps/srccache/${target} | sed -e 's| .*||')|" \
+ %{nil}
+
pushd stdlib/srccache
cp -p %SOURCE4 .
cp -p %SOURCE5 .
+
+ mkdir original
+ mv Downloads-*.tar.gz original
+ gzip -dc original/Downloads-*.tar.gz | tar xf -
+ pushd JuliaLang-Downloads.jl-*
+ cat %PATCH2 | patch -p1
+ popd
+ tar czf $(basename original/Downloads-*.tar.gz) JuliaLang-Downloads.jl-*/
popd
+target_dir=$(ls -1d deps/checksums/Downloads-*)
+md5sum stdlib/srccache/Downloads-*.tar.gz | sed -e 's| .*||' $target_dir/md5
+sha512sum stdlib/srccache/Downloads-*.tar.gz | sed -e 's| .*||' > $target_dir/sha512
+
cp -p %SOURCE6 contrib/julia.svg
# Required so that the image is not optimized for the build CPU
@@ -270,8 +321,10 @@ sed "s/@test rand(orig) == rand()//" -i stdlib/Test/test/runtests.jl
# Needed when USE_SYSTEM_CSL=1
# https://github.com/JuliaLang/julia/issues/39637
-mkdir -p %{_builddir}/%{buildsubdir}/build/usr/lib/
-ln -sf %{_libdir}/libgcc_s.so.1 %{_builddir}/%{buildsubdir}/build/usr/lib/libgcc_s.so.1
+unlink %{_builddir}/%{buildsubdir}/build/usr/lib || true
+mkdir -p %{_builddir}/%{buildsubdir}/build/%{_libdir}/
+ln -sf %{_libdir}/libgcc_s.so.1 %{_builddir}/%{buildsubdir}/build/%{_libdir}/libgcc_s.so.1
+export LD_LIBRARY_PATH=%{_builddir}/%{buildsubdir}/build/usr/lib
# Work around https://github.com/staticfloat/libblastrampoline/issues/44
# and https://github.com/staticfloat/libblastrampoline/issues/50
@@ -283,6 +336,12 @@ make %{?_smp_mflags} CFLAGS="%{build_ldflags} -fno-lto -fPIC -DLIBRARY_EXPORTS"
make %{?_smp_mflags} %{buildflags} %{commonopts} release
+if [ "x%{_lib}" != xlib ] ; then
+ cp -a %{_builddir}/%{buildsubdir}/build/usr/lib/* %{_builddir}/%{buildsubdir}/build/%{_libdir}
+ rm -rf %{_builddir}/%{buildsubdir}/build/usr/lib/
+ ln -sf %{_lib} %{_builddir}/%{buildsubdir}/build/usr/lib
+fi
+
%check
# Disable tests that require Internet access
sed "s/ipa = getipaddr()/error()/" -i test/choosetests.jl
@@ -326,9 +385,11 @@ sed "s/@test vn == v\".*\"//" -i stdlib/MPFR_jll/test/runtests.jl
sed "s/@test vn == v\".*\"//" -i stdlib/MbedTLS_jll/test/runtests.jl
sed "s/@test VersionNumber(unsafe_string(info.version_str)) == v\".*\"//" -i stdlib/nghttp2_jll/test/runtests.jl
+export LD_LIBRARY_PATH=%{_builddir}/%{buildsubdir}/build/usr/lib
make %{commonopts} test
%install
+export LD_LIBRARY_PATH=%{_builddir}/%{buildsubdir}/build/usr/lib
make %{commonopts} DESTDIR=%{buildroot} install
pushd %{buildroot}%{_libdir}/julia
@@ -455,6 +516,17 @@ desktop-file-validate %{buildroot}%{_datarootdir}/applications/%{name}.desktop
exit 0
%changelog
+* Wed Apr 6 2022 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.7.2-3
+- Avoid gcc12 float16 truncation / extension function collision
+ (rhbz#2044284, github#44829)
+
+* Tue Feb 22 2022 Mamoru TASAKA <mtasaka@fedoraproject.org>
+- Workaround for Downloads.jl/Multl.jl segfault with curl 7.81 (rhbz#2056842)
+
+* Sun Feb 20 2022 Mamoru TASAKA <mtasaka@fedoraproject.org>
+- Backport from libunwind 1.5 to fix -fno-common issue
+- Fix build_libdir related issue, add LD_LIBRARY_PATH on %%build for now
+
* Sun Feb 20 2022 Igor Raits <igor.raits@gmail.com> - 1.7.2-2
- Rebuild for libgit2 1.4.x
diff --git a/libunwind-1.5-fno-common.patch b/libunwind-1.5-fno-common.patch
new file mode 100644
index 0000000..da21874
--- /dev/null
+++ b/libunwind-1.5-fno-common.patch
@@ -0,0 +1,61 @@
+From 29e17d8d2ccbca07c423e3089a6d5ae8a1c9cb6e Mon Sep 17 00:00:00 2001
+From: Yichao Yu <yyc1992@gmail.com>
+Date: Tue, 31 Mar 2020 00:43:32 -0400
+Subject: [PATCH] Fix compilation with -fno-common.
+
+Making all other archs consistent with IA64 which should not have this problem.
+Also move the FIXME to the correct place.
+
+Also add some minimum comments about this...
+---
+ src/aarch64/Ginit.c | 15 +++++++--------
+ src/arm/Ginit.c | 15 +++++++--------
+ src/coredump/_UPT_get_dyn_info_list_addr.c | 5 +++++
+ src/hppa/Ginit.c | 15 +++++++--------
+ src/ia64/Ginit.c | 1 +
+ src/mi/Gfind_dynamic_proc_info.c | 1 +
+ src/mips/Ginit.c | 15 +++++++--------
+ src/ppc32/Ginit.c | 11 +++++++----
+ src/ppc64/Ginit.c | 11 +++++++----
+ src/ptrace/_UPT_get_dyn_info_list_addr.c | 5 +++++
+ src/s390x/Ginit.c | 15 +++++++--------
+ src/sh/Ginit.c | 15 +++++++--------
+ src/tilegx/Ginit.c | 15 +++++++--------
+ src/x86/Ginit.c | 15 +++++++--------
+ src/x86_64/Ginit.c | 15 +++++++--------
+ 15 files changed, 89 insertions(+), 80 deletions(-)
+
+diff --git a/src/x86/Ginit.c b/src/x86/Ginit.c
+index f6b8dc27d..3cec74a21 100644
+--- a/src/x86/Ginit.c
++++ b/src/x86/Ginit.c
+@@ -54,13 +54,6 @@ tdep_uc_addr (ucontext_t *uc, int reg)
+
+ # endif /* UNW_LOCAL_ONLY */
+
+-HIDDEN unw_dyn_info_list_t _U_dyn_info_list;
+-
+-/* XXX fix me: there is currently no way to locate the dyn-info list
+- by a remote unwinder. On ia64, this is done via a special
+- unwind-table entry. Perhaps something similar can be done with
+- DWARF2 unwind info. */
+-
+ static void
+ put_unwind_info (unw_addr_space_t as, unw_proc_info_t *proc_info, void *arg)
+ {
+@@ -71,7 +64,13 @@ static int
+ get_dyn_info_list_addr (unw_addr_space_t as, unw_word_t *dyn_info_list_addr,
+ void *arg)
+ {
+- *dyn_info_list_addr = (unw_word_t) &_U_dyn_info_list;
++#ifndef UNW_LOCAL_ONLY
++# pragma weak _U_dyn_info_list_addr
++ if (!_U_dyn_info_list_addr)
++ return -UNW_ENOINFO;
++#endif
++ // Access the `_U_dyn_info_list` from `LOCAL_ONLY` library, i.e. libunwind.so.
++ *dyn_info_list_addr = _U_dyn_info_list_addr ();
+ return 0;
+ }
+
+
reply other threads:[~2026-12-01 21:40 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=179616121243.1.8761513063194241901.rpms-julia-eb41c28138c1@fedoraproject.org \
--to=mtasaka@fedoraproject.org \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox