iains / gcc-11-branch

GCC 11 for Darwin with experimental Arm64 support. Current release 11.5-darwin-r0 [July 2024]
GNU General Public License v2.0
2 stars 2 forks source link

Failure to build on macOS Ventura #5

Closed fxcoudert closed 1 year ago

fxcoudert commented 2 years ago

Initial test on macOS Ventura with Xcode 14.1 gives:

xgcc: warning: could not understand version '13.00.00'
  checking for aarch64-apple-darwin22-gcc... /private/tmp/gccA11-20221022-5496-15qtpzp/gcc-11.3.0/build/./gcc/xgcc -B/private/tmp/gccA11-20221022-5496-15qtpzp/gcc-11.3.0/build/./gcc/ -B/opt/homebrew/opt/gcc@11/aarch64-apple-darwin22/bin/ -B/opt/homebrew/opt/gcc@11/aarch64-apple-darwin22/lib/ -isystem /opt/homebrew/opt/gcc@11/aarch64-apple-darwin22/include -isystem /opt/homebrew/opt/gcc@11/aarch64-apple-darwin22/sys-include   -fno-checking
  checking whether the C compiler works... no
  configure: error: in `/private/tmp/gccA11-20221022-5496-15qtpzp/gcc-11.3.0/build/aarch64-apple-darwin22/libgomp':
  configure: error: C compiler cannot create executables
  See `config.log' for more details
  make[2]: *** [configure-stage1-target-libgomp] Error 77

The CI did not retrieve the config.log, so all we have for now is the warning about could not understand version '13.00.00'. I will investigate later, but have no time now.

iains commented 2 years ago

It is missing the patch(es) that future-proofed the OS versioning (when this was originally done, the exact plan was not known)

I have been prioritising 12.2 .. master .. 10.4 in that order because 11.4 is a long way off and I want to use 10.4 as the generic bootstrap compiler for Darwin (since it is buildable on all versions [GCC] supports, and I need a GCC+Ada bootstrap).

We should be able to do a quick review of which patches from 12/main are useful here and then do a 11.3Dr3 . extremely pressed for time right now .. but that's the synopsis.

iains commented 2 years ago

hmm apparently I'm taking rubbish .. those patches are already in 11.3dr2, so we do need some analysis in what's going on.

b8087dce36a (HEAD -> gcc-11-3-darwin, tag: gcc-11.3-darwin-r2, repos/gcc-11-3-darwin-pre-r2, repos/gcc-11-3-darwin, iains-github-gcc-11/gcc-11-3-darwin) Add release notes for GCC 11.3-darwin-r2.
2d1727dd08e Darwin: Update enable-darwin-at-rpath to support macOS 13+.
e9276a9a454 libstdc++: Rename __null_terminated to avoid collision with Apple SDK
ebce1613084 Darwin: Truncate kernel-provided version to OS major for Darwin >= 20.
039e035ecc9 Darwin: Future-proof -mmacosx-version-min
iains commented 2 years ago

I just used my 11.3Dr2 branch (on Darwin21) with:

/src-local/gcc-git-11/configure --prefix=/opt/iains/aarch64-apple-darwin22/gcc-11-3Dr2 --build=aarch64-apple-darwin22 --with-sysroot=/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk --enable-languages=all CC=aarch64-apple-darwin21-gcc CXX=aarch64-apple-darwin21-g++

and

time nice make -j8 BOOT_CFLAGS="-O2 -g -pipe -Wno-error=deprecated-declarations" >b.txt 2>e.txt

Which, of course, is not a test on Darwin22 .. but it is a test that the branch builds with 14.1RC + MacOS13.sdk (actually, the -Wno-error should not be needed on a branch).

CPU cycles I have .. engineering not so much ;)

edit: That is using GCC10.4 as the bootstrap (and building Ada).

fxcoudert commented 2 years ago

11 branch is not a priority for me, I'll get to run it and debug and figure it out when I have time. Didn't want you to spend more on this, just log the issue so we don't forget :)

Bo98 commented 1 year ago

Looks like it's missing https://github.com/iains/gcc-12-branch/commit/f18cbc1ee1f421a0dd79dc389bef9a23dd4a761d

fxcoudert commented 1 year ago

Yes, that's the patch that's missing. It's been added to branches 10 and 12, but not 11.

iains commented 1 year ago

I guess we can add it and do an 11.3Dr3 (with any other critical fixes identified on master or 12 branch).

fxcoudert commented 1 year ago

We're now shipping it in Homebrew, so no pressure from me to do a "release" or anything. Just mentioning it.

iains commented 1 year ago

fixed for 11.4