* David Abdurachmanov:

> Hi Florian,
>
> I was trying to build the latest glibc [0] in Fedora 40 for riscv64,
> but it failed. It seems to be related to your last commit.
>
> [..]
> + ln -s libBrokenLocale.so.1 usr/lib64/libBrokenLocale.so
> + for sl in `find $RPM_BUILD_ROOT/$pfx$lib -maxdepth 1 -type l`
> + set +x
> + ln -s . usr/lib64/lp64d
> ln: failed to create symbolic link 'usr/lib64/lp64d/.': File exists
> error: Bad exit status from /var/tmp/rpm-tmp.7qPZkS (%install)
> [..]
>
> Full log: 
> http://fedora.riscv.rocks/kojifiles/work/tasks/9391/1599391/build.log
> Build info: http://fedora.riscv.rocks/koji/taskinfo?taskID=1599391
>
> This is probably related to this:
> https://src.fedoraproject.org/rpms/glibc/blob/rawhide/f/glibc.spec#_1279
>
> Cheers,
> david
> - - -
> [0] 
> https://src.fedoraproject.org/rpms/glibc/c/0bd93c5697bc60e4f4a84f5b55c98f351883e689?branch=rawhide

That refers to:

%ifarch riscv64
# RISC-V ABI wants to install everything in /lib64/lp64d or /usr/lib64/lp64d.
# Make these be symlinks to /lib64 or /usr/lib64 respectively.  See:
# 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/DRHT5YTPK4WWVGL3GIN5BF2IKX2ODHZ3/
for d in %{glibc_sysroot}%{_libdir} %{glibc_sysroot}/%{_lib}; do
        mkdir -p $d
        (cd $d && ln -sf . lp64d)
done
%endif

Please try this:

diff --git a/glibc.spec b/glibc.spec
index 6116752..e4d5e44 100644
--- a/glibc.spec
+++ b/glibc.spec
@@ -1571,6 +1571,10 @@ for lib in lib lib64;  do
                set +x
                slbase=$(basename $sl)
                sltarget=$(basename $(readlink $sl))
+               if test "$sltarget" = . ; then
+                   # This is the lp64d symbolic link on riscv64, see above.
+                   continue
+               fi
                if ! test -r usr/$lib/$sltarget; then
                    echo "$sl: inferred $sltarget ($(readlink $sl)) missing"
                    exit 1

We will have to fix this again (and wrap-find-debuginfo.sh and as well)
once Fedora adopts the standard RISC-V paths.

Thanks,
Florian
--
_______________________________________________
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to