pkgsrc-Bugs archive

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

pkg/58502: devel/patchelf binary package on CentOS 7 should depend on gcc8-libs



>Number:         58502
>Category:       pkg
>Synopsis:       devel/patchelf binary package on CentOS 7 should depend on gcc8-libs
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jul 28 16:10:00 +0000 2024
>Originator:     Phil Krylov
>Release:        pkgsrc-current
>Organization:
krylov.eu
>Environment:
Linux localhost.localdomain 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
>Description:
Patchelf requires a newer libstdc++ version than is shipped with EL 7:

/usr/pkg/bin/patchelf: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /usr/pkg/bin/patchelf)

I have attached a patch touching only devel/patchelf/Makefile, but probably it's going to be a more common problem in the future, and native libstdc++ version detection should be moved to mk/platform/Linux.mk, next to GLIBC_VERSION?
>How-To-Repeat:
pkgin install patchelf && patchelf
>Fix:
Index: devel/patchelf/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/devel/patchelf/Makefile,v
retrieving revision 1.17
diff -p -u -r1.17 Makefile
--- devel/patchelf/Makefile	28 Aug 2023 15:09:32 -0000	1.17
+++ devel/patchelf/Makefile	28 Jul 2024 15:54:50 -0000
@@ -16,4 +16,18 @@ USE_LANGUAGES=	c c++17
 # std::optional
 GCC_REQD+=	8
 
+.include "../../mk/bsd.prefs.mk"
+
+# This package will link against libstdc++.so from the pkgsrc GCC when the
+# base OS GCC doesn't meet the minimum requirement. Thus we do this so the
+# appropriate gcc-libs package will be captured as a dependency, otherwise
+# binary packages will be broken.
+# /usr/pkg/bin/patchelf: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /usr/pkg/bin/patchelf)
+.if ${OPSYS} == "Linux"
+_glibcxx_ver_output_!=	objdump -p ${_OPSYS_LIB_DIRS:=/libstdc++.so.*} 2>/dev/null || true
+.  if empty(${_glibcxx_ver_output_})
+USE_PKGSRC_GCC_RUNTIME=	yes
+.  endif
+.endif
+
 .include "../../mk/bsd.pkg.mk"


Home | Main Index | Thread Index | Old Index