tech-pkg archive

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

Re: lang/gcc12 + Darwin testers needed



On 1/5/25 18:07, Brook Milligan wrote:

On Dec 30, 2024, at 10:55, Brook Milligan <brook%nmsu.edu@localhost> wrote:

The lang/gcc12 package is currently broken on at least some Darwin systems.  In part, the cause is the need for conflicting platform-specific patches.  I suspect the problem is exacerbated by an incorrect conditional in Makefile.common.  However, I do not have a range of systems to check this, and would appreciate help.

Currently, a homebrew patchset is applied only for Darwin/aarch64.  Darwin/x86_64 is expected to work without additional patches, but at least for Darwin/x86_64 24.1.0 (Sequoia, MacOS 15) it does not; I suspect the same for earlier Darwin/x86_64 releases.

The homebrew patchset is supposed to work for both aarch64 and x86_64 up through Darwin 23.*.* (Sonoma, MacOS 14); see

https://formulae.brew.sh/formula/gcc@12

Consequently, it should be OK to relax the conditional in Makefile.common to apply it for Darwin versions less than 15.0.0.

A different patchset is needed for Darwin/x86_64 24.1.0; perhaps it will also work for Darwin/aarch64 24.*.*.  I have uploaded this patchset to ftp.netbsd.org so that it can be tested independently of the homebrew patchset.

The attached patch implements both a change in the Makefile.common conditional and sourcing the three necessary platform-specific patchsets.  Note that I have uploaded the original pkgsrc patch for libgcc/config.host, as it conflicts with both of the other patchsets and therefore must be downloaded separately for non-Darwin platforms.

I would greatly appreciate those with other Darwin versions testing this.  I am especially interested in (i) whether the homebrew patchset works on Darwin/x86_64 23.*.* (or earlier), and (ii) whether the new patchset works on Darwin/aarch64 24.*.*; although tests with other combinations are of course welcome.  Please report (i) the platform (e.g., uname -a), (ii) the xcode version (xcodebuild -version; just in case it matters), (iii) the patchset actually used, and (iv) whether the build succeeds.

Thanks a lot for your help.  Perhaps with a better understanding of what exactly each platform needs, we can unify these patches.

To facilitate testing, I have updated wip/gcc12 to use distribution patches: the homebrew patchset for Darwin <= 23 (now expanded from aarch64 to all Darwin), a new one for Darwin/x86_64 v24, and the original pkgsrc patch for NetBSD et al.

This works for me on NetBSD and Darwin/x86_64 v24, which are all I can test; the latter does not work with lang/gcc12.

The status quo (i.e., lang/gcc12 behavior) should be retained for Darwin/aarch64 <= 23 and NetBSD et al.

It should also work for Darwin/x86_64 <= 23, which may not have worked before, but I’m not sure.

Please checkout the new wip package and test, especially Darwin/x86_64 v23 and Darwin/aarch64 v24, and in comparison to lang/gcc12.

Thanks a lot.

Cheers,
Brook


According to this logic:

# note: homebrew patchset should work for both x86_64 and aarch64, but
#       may only work up to Sonoma (MacOS v14, Darwin v23)
# see:  https://formulae.brew.sh/formula/gcc@12
#
.if ${OPSYS} == "Darwin" && ${OPSYS_VERSION} < 150000
BUILDLINK_TRANSFORM+=   rm:-nodefaultrpaths
CONFIGURE_ARGS+=        --disable-darwin-at-rpath
PATCHFILES=             gcc-12.4.0.diff
PATCH_SITES= https://raw.githubusercontent.com/Homebrew/formula-patches/ca7047d/gcc/
PATCH_DIST_STRIP=       -p1
.elif ${MACHINE_PLATFORM:MDarwin-*-x86_64}
PATCHFILES=             gcc-12.4.0-Darwin-x86_64.diff
PATCH_SITES=            ftp://ftp.netbsd.org/pub/pkgsrc/distfiles
.else # use a distribution patchset to avoid conflicts with above
PATCHFILES=             gcc-12.4.0-patch-libgcc_config.host
PATCH_SITES=            ftp://ftp.netbsd.org/pub/pkgsrc/distfiles
.endif

there is no patchset for gcc 12 on macOS 15? If that's the case, should we just accept that gcc12 is not going to work on the latest macOS and move on to gcc13?

Also, should we really be testing for the macOS version, or the Xcode version, or both?

--
Life is a game.  Play hard.  Play fair.  Have fun.


Home | Main Index | Thread Index | Old Index