tech-pkg archive

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

Re: GCC_REQD, the NetBSD system compiler, etc



On Wed, 22 Sept 2021 at 13:07, nia <nia%netbsd.org@localhost> wrote:
>
> Hi tech-pkg,
>
> A slowly increasing number of things in pkgsrc require
> GCC 8 or newer, while netbsd-9 has GCC 7. This poses a
> few problems:
>
> - The upstream GCC support is not-quite-complete for a few
>   architectures, from what I can tell pkgsrc GCC still has
>   problems building on ARM (64 and 32).
>
> - In bulk builds, I see mysterious errors in packages that
>   depend on packages that have set GCC_REQD to a newer version,
>   particularly when linking. My understanding is that GCC_REQD
>   _must_ be set in buildlink3, but this does not completely solve
>   the problem. Mixed libstdc++ versions is probably not too
>   healthy. I don't really understand what's going on here.
>
> I can see two ways out:
>
> - pkgsrc packages should be held back from depending on compilers
>   that aren't yet in a stable NetBSD release. Right now this
>   would only affect a handful of unimportant leaf packages.

This could be taken to mean NetBSD requirements override all other
pkgsrc. I think it's reasonable to assume they have more weight, but
it's still a case of balancing. (more below)

> - NetBSD has to bootstrap a newer compiler to use pkgsrc...
>   More effort into syncing patches between NetSBD and pkgsrc.

I think a combination approach would be best - what is right for
NetBSD-9 is likely to be a poor fit for -8. Maybe:

1) Add RECOMMENDED_GCC_VERSION (which may usually match the latest gcc
version in a stable NetBSD release). Package versions requiring a
later GCC_REQD should ideally be imported as alternate package
entries, or delayed. "Important" packages which need a later GCC_REQD
should trigger a discussion on bumping RECOMMENDED_GCC_VERSION
2) Add MIN_GCC_VERSION. Systems with a gcc version between this and
the recommended max GCC_REQD would expect to have some packages built
with the original gcc and some with pkgsrc gcc. Systems with a gcc
below this version would be recommended to fully bootstrap a newer gcc
to avoid mismatched "built with different gcc versions" library hell
3) More effort into syncing patches between NetSBD and pkgsrc
(absolute agreement on your point)
4) An automated way of bootstrapping the compiler packages built with
later gcc versions - whether that is building gcc (and its
dependencies) with a different PREFIX, then using that gcc to
bootstrap that same gcc version and its dependencies into the final
PREFIX?

David


Home | Main Index | Thread Index | Old Index