pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: lang/libunwind failing on Alma (RHEL) 8



>Heads-up to anyone interested.  I'll look into this eventually if nobody
>else fixes it first, but I can't say when I'll have time.
>
>"cannot find -lgcc_s" is a fairly common problem, but I don't recall the
>solution off the top of my head.
> [...]
>     /home/bacon/Pkgsrc/pkgsrc/lang/libunwind/work/.cwrapper/bin/cc -O2
>-I/home/bacon/Pkgsrc/pkg/include -I/usr/include
>-L/home/bacon/Pkgsrc/pkg/gcc10/lib/gcc/x86_64-redhat-linux/10.5.0
>-Wl,-R/home/bacon/Pkgsrc/pkg/gcc10/lib/gcc/x86_64-redhat-linux/10.5.0
>-L/home/bacon/Pkgsrc/pkg/gcc10/lib64
>-Wl,-R/home/bacon/Pkgsrc/pkg/gcc10/lib64 -Wl,-zrelro
>-L/home/bacon/Pkgsrc/pkg/lib -Wl,-R/home/bacon/Pkgsrc/pkg/lib
>-L/usr/lib64 -Wl,-R/usr/lib64  -rdynamic
>CMakeFiles/cmTC_1e7e7.dir/testCCompiler.c.o -o cmTC_1e7e7
>
>     /usr/bin/ld: cannot find -lgcc_s
>
>     collect2: error: ld returned 1 exit status
>
>     *** Error code 1


Can you try the patch below? Originally meant for [1], but, user doesn't
have the original setup anymore[2] so I couldn't get it tested (no ARM HW
of my own).

[1] https://mail-index.netbsd.org/pkgsrc-users/2023/12/04/msg038541.html
[2] https://www.unitedbsd.com/d/1207-trying-to-build-exiv2-0820nb3-on-aarch64

Note that the comment in mk/scripts/larger_symbol_version.awk is misleading
as well. It does not return 1 if the supplied version is larger: it always
returns 0 and you have to parse its stdout to make any determination.

-RVP

---START PATCH---
diff -urN lang.orig/gcc10/options.mk lang/gcc10/options.mk
--- lang.orig/gcc10/options.mk	2023-04-07 02:00:47.000000000 +0100
+++ lang/gcc10/options.mk	2023-12-31 11:07:09.818805942 +0000
@@ -65,7 +65,7 @@
 .    endif
 .  endfor
 
-.  if ${DELETE_INSTALLED_LIBGCC:Uno}
+.  if ${DELETE_INSTALLED_LIBGCC:Uno} == "yes"
 post-install:	delete-installed-libgcc
 
 .PHONY: delete-installed-libgcc
diff -urN lang.orig/gcc10-aux/options.mk lang/gcc10-aux/options.mk
--- lang.orig/gcc10-aux/options.mk	2022-03-13 08:34:04.000000000 +0000
+++ lang/gcc10-aux/options.mk	2023-12-31 11:07:20.427634943 +0000
@@ -63,7 +63,7 @@
 .    endif
 .  endfor
 
-.  if ${DELETE_INSTALLED_LIBGCC:Uno}
+.  if ${DELETE_INSTALLED_LIBGCC:Uno} == "yes"
 post-install:	delete-installed-libgcc
 
 .PHONY: delete-installed-libgcc
diff -urN lang.orig/gcc12/options.mk lang/gcc12/options.mk
--- lang.orig/gcc12/options.mk	2023-04-08 02:00:46.000000000 +0100
+++ lang/gcc12/options.mk	2023-12-31 11:07:46.773652719 +0000
@@ -65,7 +65,7 @@
 .    endif
 .  endfor
 
-.  if ${DELETE_INSTALLED_LIBGCC:Uno}
+.  if ${DELETE_INSTALLED_LIBGCC:Uno} == "yes"
 post-install:	delete-installed-libgcc
 
 .PHONY: delete-installed-libgcc
diff -urN lang.orig/gcc13/options.mk lang/gcc13/options.mk
--- lang.orig/gcc13/options.mk	2023-05-03 21:03:09.000000000 +0100
+++ lang/gcc13/options.mk	2023-12-31 11:08:00.122653508 +0000
@@ -65,7 +65,7 @@
 .    endif
 .  endfor
 
-.  if ${DELETE_INSTALLED_LIBGCC:Uno}
+.  if ${DELETE_INSTALLED_LIBGCC:Uno} == "yes"
 post-install:	delete-installed-libgcc
 
 .PHONY: delete-installed-libgcc
diff -urN lang.orig/gcc6/options.mk lang/gcc6/options.mk
--- lang.orig/gcc6/options.mk	2023-03-30 02:00:46.000000000 +0100
+++ lang/gcc6/options.mk	2023-12-31 11:08:13.263625003 +0000
@@ -81,7 +81,7 @@
 .    endif
 .  endfor
 
-.  if ${DELETE_INSTALLED_LIBGCC:Uno}
+.  if ${DELETE_INSTALLED_LIBGCC:Uno} == "yes"
 post-install:	delete-installed-libgcc
 
 delete-installed-libgcc:
diff -urN lang.orig/gcc7/options.mk lang/gcc7/options.mk
--- lang.orig/gcc7/options.mk	2023-03-30 02:00:46.000000000 +0100
+++ lang/gcc7/options.mk	2023-12-31 11:08:34.289151991 +0000
@@ -81,7 +81,7 @@
 .    endif
 .  endfor
 
-.  if ${DELETE_INSTALLED_LIBGCC:Uno}
+.  if ${DELETE_INSTALLED_LIBGCC:Uno} == "yes"
 post-install:	delete-installed-libgcc
 
 delete-installed-libgcc:
diff -urN lang.orig/gcc8/options.mk lang/gcc8/options.mk
--- lang.orig/gcc8/options.mk	2023-03-31 02:00:45.000000000 +0100
+++ lang/gcc8/options.mk	2023-12-31 11:08:43.841834929 +0000
@@ -63,7 +63,7 @@
 .    endif
 .  endfor
 
-.  if ${DELETE_INSTALLED_LIBGCC:Uno}
+.  if ${DELETE_INSTALLED_LIBGCC:Uno} == "yes"
 post-install:	delete-installed-libgcc
 
 .PHONY: delete-installed-libgcc
---END PATCH---



Home | Main Index | Thread Index | Old Index