pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
pkg/58532: lang/llvm should bring a gcc7-libs dependency when native libstdc++ is too old
>Number: 58532
>Category: pkg
>Synopsis: lang/llvm should bring a gcc7-libs dependency when native libstdc++ is too old
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Aug 01 00:35: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:
On CentOS 7, lang/llvm should depend on gcc7-libs, otherwise building, e.g., devel/cargo-c gives the following output:
https://us-central.manta.mnx.io/pkgsrc/public/reports/Linux/el7/trunk/x86_64/20240730.2238/cargo-c-0.9.32/build.log
>How-To-Repeat:
bmake -C devel/cargo-c bin-install
>Fix:
diff -p -u -r1.98 Makefile
--- lang/llvm/Makefile 6 Jul 2024 15:45:05 -0000 1.98
+++ lang/llvm/Makefile 1 Aug 2024 00:21:05 -0000
@@ -128,6 +128,18 @@ PLIST_SUBST+= RELEASE_TYPE=${RELEASE_TYP
CMAKE_ARGS+= -DPKGSRC_LLVM_PTHREADLIB=-lpthread
.endif
+# 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.
+# rustc: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.22' not found (required by /usr/pkg/lib/libLLVM.so.18.1)
+.if ${OPSYS} == "Linux"
+OPSYS_LIBSTDCXX_VERSIONS_CMD= objdump -p ${_OPSYS_LIB_DIRS:=/libstdc++.so.*} 2>/dev/null | grep -o 'GLIBCXX_[0-9.]*'
+. if empty(OPSYS_LIBSTDCXX_VERSIONS_CMD:sh:MGLIBCXX_3.4.22)
+USE_PKGSRC_GCC_RUNTIME= yes
+. endif
+.endif
+
.if ${USE_CROSS_COMPILE:U:tl} == "yes"
TOOL_DEPENDS+= ${PKGNAME}:../../${PKGPATH}
CMAKE_ARGS+= -DLLVM_TABLEGEN:STRING=${TOOLBASE:Q}/bin/llvm-tblgen
Home |
Main Index |
Thread Index |
Old Index