* On 2025-04-07 at 11:24 BST, Stephen Borrill wrote:
On Mon, 7 Apr 2025, Jonathan Perkin wrote:* On 2025-04-06 at 23:40 BST, Makoto Fujiwara wrote:| What I do is to use the same gcc version for all packages. So if one of | them requires gcc12, I set GCC_REQD+= 12 in /etc/mk.conf. It will be a | while before you need to increase that number but when that happens you | probably have to rebuild them all. This is what I'm thinking. Various packages ask for different gcc versions.It will result that serveral versions of gcc will be packaged. But if the onlyone version is packaged for that run, it may be straight out some mixed (libstdc++) versions. Can this be automated ? (hopefully at least pbulk scan) -> I may be wrong, Let me rewrite: At particular package, serveral version of gcc may be packaged, because of depending packages ask for different level, but if the only one at most required is included .... (?)It's not possible to automate, because you will run into circular dependencies.Something like this will stop the circular dependency: .if \\ \${OPSYS} == "NetBSD" && \${OPSYS_VERSION} < 100000 && \\ empty(PKGPATH:Mdevel/gmake) && \\ empty(PKGPATH:Mlang/gcc10) && \\ empty(PKGPATH:Mlang/gcc10-libs) && \\ empty(PKGPATH:Mlang/perl5) && \\ empty(PKGPATH:Mpkgtools/cwrappers) && \\ empty(PKGPATH:Mpkgtools/digest) && \\ empty(PKGPATH:Mpkgtools/mktools) && \\ empty(PKGPATH:Mtextproc/gsed) GCC_REQD+=10 .endif
Yeh I know, that's the approach I designed well over a decade ago and which others have copied in the meantime. The problem is that the list of packages changes depending on your OS, environment, and pkgsrc settings. For my environment it's:
https://github.com/TritonDataCenter/pkgbuild/blob/master/include/gcc-libs.mk#L28-L49and some dependencies are handled differently, e.g. by setting TOOLS_PLATFORM.foo to an external tool rather than requiring the dependency, so we can't just hard code a single list. This is what work such as this:
https://github.com/TritonDataCenter/pkgsrc/commit/2513814a12de74882183d4333aaedc50f86021fb is designed to help.I don't know what PHP issue you were seeing but, as I'm sure people are thoroughly sick of hearing by now, I've been doing this for a very very long time in very large-scale production deployments, and have never had it cause problems that weren't compiler bugs.
-- Jonathan Perkin pkgsrc.smartos.org Open Source Complete Cloud www.tritondatacenter.com