pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: pkg/58532: lang/llvm should bring a gcc7-libs dependency when native libstdc++ is too old
The following reply was made to PR pkg/58532; it has been noted by GNATS.
From: Jonathan Perkin <jperkin%mnx.io@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: pkg-manager%netbsd.org@localhost, gnats-admin%netbsd.org@localhost, pkgsrc-bugs%netbsd.org@localhost
Subject: Re: pkg/58532: lang/llvm should bring a gcc7-libs dependency when
native libstdc++ is too old
Date: Thu, 1 Aug 2024 08:13:43 +0100
* On 2024-08-01 at 01:35 BST, phil+netbsd%krylov.eu@localhost wrote:
>+# 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
This isn't the correct fix. Unfortunately it's a bit more complicated
than that.
USE_PKGSRC_GCC_RUNTIME is a user variable, so packages shouldn't be
setting it. Its purpose is to determine whether the dependency for GCC
libraries should come from the -libs package instead of the main GCC
package.
The problem is that the main GCC packages only set DEPMETHOD=build,
which in the case of USE_PKGSRC_GCC_RUNTIME=no is wrong, they should be
full dependencies so that the runtime libraries are available.
I'll need to do some testing before making changes, as it's been a while
since I used the in-tree GCC packages (mostly because they have issues
such as this).
We should also consider just making USE_PKGSRC_GCC_RUNTIME=yes the
default.
--
Jonathan Perkin - mnx.io - pkgsrc.smartos.org
Open Source Complete Cloud www.tritondatacenter.com
Home |
Main Index |
Thread Index |
Old Index