Skip to content

gcc 12 to 14 updates with libsanitizer and Distribution=13.0, 14.0, 15.0 variants - #1080

Open
dhomeier wants to merge 9 commits into
masterfrom
dhomeier-gcc123-13
Open

gcc 12 to 14 updates with libsanitizer and Distribution=13.0, 14.0, 15.0 variants#1080
dhomeier wants to merge 9 commits into
masterfrom
dhomeier-gcc123-13

Conversation

@dhomeier

@dhomeier dhomeier commented Oct 11, 2023

Copy link
Copy Markdown
Contributor

Counterpart of #1033 for gcc versions 12.3 and 13.2, with patches from the gcc arm64 team copied from Homebrew.
Adding the same experimental build of AddressSanitizer and ThreadSanitizer tools as for gcc11 – however libasan in particular is untested with gcc13.

Tested on 13.4 and 12.7 arm64 and x86_64/Rosetta, and on 10.14.6 x86_64; still needs testing on latest 13.x arm64 with Xcode 15.

gcc12
PASS 10.14.6/x86_64 @dhomeier @nieder
PASS 13.7/x86_64 @nieder
FAIL/PASS 15.4/x86_64 with with-build-time-tools comment @PovlAbrahamsen
PASS arm64 @dhomeier

gcc13
PASS 10.14.6/x86_64 @dhomeier @nieder
PASS arm64 @dhomeir

gcc14
FAIL 10.13 comment @dmacks
PASS 10.14.6/x86_64 @dhomeier @nieder
FAIL/PASS 15.4/x86_64 with with-build-time-tools comment @PovlAbrahamsen
PASS arm64 @dhomeir

@dhomeier dhomeier added new package Packages that do not yet exist in Fink. arm64 Build issues and fixes for Apple Silicon labels Oct 11, 2023
dhomeier referenced this pull request Oct 11, 2023
Version: 12.3.0
Revision: 1
Type: gccver (12)
Distribution: 13.0

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps also add 14.0 here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fink's naming scheme only allows for a single Distribution in a %v-Dist.info named file afaict, so this needs additional info files (added in next commit) – but a less prolific solution would be much preferred!

Comment thread 10.9-libcxx/stable/main/finkinfo/languages/gcc13-13.0.info
Source: mirror:gnu:gcc/gcc-%v/gcc-%v.tar.xz
Source-Checksum: SHA256(949a5d4f99e786421a93b532b22ffab5578de7321369975b91aec97adfda8c3b)
PatchFile: %n.patch
PatchFile-MD5: 7d533489637df18650d997f3139c5772

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incorrect MD5 for patch - should be e245cee9fa6aa2fd5298d7712358e8e1

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, fixed!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PatchFile-MD5's still don't seem to match in gcc12-13.0.info, and between gcc13.info, gcc13-13.0.info, and gcc13-14.0.info

@PovlAbrahamsen

Copy link
Copy Markdown
Contributor

I have now tried the following combinations:

  • GCC 12 on MacOS 13.6 on x86_64 with Xcode 15.
  • GCC 12 on MacOS 14.0 on arm64 with Xcode 15.

Both compile and appear to work as intended (at least to the point where fftw3 and cfitsio build).

There is still a mistake in the PatchFile-MD5 field in gcc12-13.0.info, and mismatches in this field between the different gcc13 variants (I'm not sure which is correct - I haven't got around to building GCC13 yet, and probably won't for a few days).

Thank you for submitting this PR!

@dhomeier

Copy link
Copy Markdown
Contributor Author

git add does not like me – the old patch versions were accidentally enabling libsanitizer on darwin22 as well (should only include *-darwin2[01]*)...
Thanks for testing!

@dhomeier dhomeier mentioned this pull request Oct 15, 2023
71 tasks
@cooljeanius

Copy link
Copy Markdown

I tried testing this PR on Big Sur with Xcode 13, but got these results:

$ fink -m install gcc12
Scanning package description files..........
Information about 15259 packages read in 3 seconds.
Running in Maintainer Mode
Validating package file /opt/sw/fink/dists/stable/main/finkinfo/languages/gcc12.info...
Warning: Field "infodocs" is deprecated. (gcc12.info)
Package looks good!
The package 'gcc12' will be built and installed.
Reading build dependency for gcc12-12.3.0-1...
Can't resolve dependency "xcode (>= 14.2.0)" for package "gcc12-12.3.0-1" (no matching packages/versions found)
Exiting with failure.
$ fink -m install gcc13
Information about 15259 packages read in 3 seconds.
Running in Maintainer Mode
Validating package file /opt/sw/fink/dists/stable/main/finkinfo/languages/gcc13.info...
Warning: Field "infodocs" is deprecated. (gcc13.info)
Package looks good!
The package 'gcc13' will be built and installed.
Reading build dependency for gcc13-13.2.0-1...
Can't resolve dependency "xcode (>= 14.2.0)" for package "gcc13-13.2.0-1" (no matching packages/versions found)
Exiting with failure.

@cooljeanius

Copy link
Copy Markdown

ok now that @dhomeier has done 26b61ad, I can confirm that gcc12 builds and installs successfully for me with this PR on x86_64 Big Sur with Xcode 13; will test gcc13 next...

@cooljeanius

Copy link
Copy Markdown

ok now that @dhomeier has done 26b61ad, I can confirm that gcc12 builds and installs successfully for me with this PR on x86_64 Big Sur with Xcode 13; will test gcc13 next...

...ok, I can confirm a similar success with gcc13.

@dmacks

dmacks commented Oct 18, 2023

Copy link
Copy Markdown
Member

Does this PR make PR #928 obsolete?

@dhomeier

Copy link
Copy Markdown
Contributor Author

Yes, I think everything relevant especially for the first gcc11 and gcc12 ports has already been cherry-picked, and the rest must be outdated by now.

@dhomeier

dhomeier commented Dec 18, 2023

Copy link
Copy Markdown
Contributor Author

On Sonoma with Xcode 15.1 the gcc12 build fails with various, generally random internal compiler errors after Stage 3; status with Xcode 15 on Ventura is unclear – might be best to pull the Distribution 12.0/13.0 versions.
gcc13 reported to build without problems on all platforms tested so far.

Update: on High Sierra gcc 13.2 fails to build on a missing header in stage 3:

libtool: compile:  /opt/sw/src/fink.build/gcc13-13.2.0-1/darwin_objdir/./gcc/xgcc -shared-libgcc -/opt/sw/src/fink.build/gcc13-13.2.0-1/darwin_objdir/./gcc -nostdinc++ -L/opt/sw/src/fink.build/gcc13-13.2.0-/darwin_objdir/x86_64-apple-darwin17.7.0/libstdc++-v3/src -L/opt/sw/src/fink.build/gcc13-13.2.0-1/darwin_objdir/x86_64-apple-darwin17.7.0/libstdc++-v3/src/.libs -L/opt/sw/src/fink.build/gcc13-13.2.0-1/darwin_objdir/x86_64-apple-darwin17.7.0/libstdc++-v3/libsupc++/.libs -B/opt/sw/lib/gcc13/x86_64-apple-darwin17.7.0/bin/ -B/opt/sw/lib/gcc13/x86_64-apple-darwin17.7.0/lib/ -isystem /opt/sw/lib/gcc13/x86_64-apple-darwin17.7.0/include -isystem /opt/sw/lib/gcc13/x86_64-apple-darwin17.7.0/sys-include -fchecking=1 -I/opt/sw/src/fink.build/gcc13-13.2.0-1/gcc-13.2.0/libstdc++-v3/../libgcc -l/opt/sw/src/fink.build/gcc13-13.2.0-1/darwin_objdir/x86_64-apple-darwin17.7.0/libstdc++-v3/include/x86_64-apple-darwin17.7.0 -I/opt/sw/src/fink.build/gcc13-13.2.0-1/darwin_objdir/x86_64-apple-darwin17.7.0/libstdc++-v3/include -I/opt/sw/src/fink.build/gcc13-13.2.0-1/gcc-13.2.0/libstdc++-v3/libsupc++ -I/opt/sw/include -I/opt/sw/include -D_GLIBCXX_SHARED -std=gnu++17 -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi=2 -fdiagnostics-show-location=once -ffunction-sections -fdata-sections -frandom-seed=dir.lo -g -O2 -c ../../../../../gcc-13.2.0/libstdc++-v3/src/filesystem/dir.cc  -fno-common -DPIC -D_GLIBCXX_SHARED -o dir.o
In file included from ../../../../../gcc-13.2.0/libstdc++-v3/src/filesystem/dir.cc:34:
/opt/sw/src/fink.build/gcc13-13.2.0-1/darwin_objdir/x86_64-apple-darwin17.7.0/libstdc++-v3/include/experimental/filesystem:39:10: fatal error: experimental/bits/fs_fwd.h: No such file or directory
   39 | #include <experimental/bits/fs_fwd.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[6]: *** [dir.lo] Error 1
make[6]: *** Waiting for unfinished jobs....
In file included from ../../../../../gcc-13.2.0/libstdc++-v3/src/filesystem/ops.cc:65:
../../../../../gcc-13.2.0/libstdc++-v3/src/filesystem/ops-common.h: In function 'bool std::experimental::filesystem::do_copy_file(const std::filesystem::__gnu_p
osix::char_type*, const std::filesystem::__gnu_posix::char_type*, std::filesystem::copy_options_existing_file, std::filesystem::__gnu_posix::stat_type*, std::fi
lesystem::__gnu_posix::stat_type*, std::error_code&)':
../../../../../gcc-13.2.0/libstdc++-v3/src/filesystem/ops-common.h:502:12: warning: unused variable 'count' [-Wunused-variable]
  502 |     size_t count = from_st->st_size;
      |            ^~~~~
make[5]: *** [all-recursive] Error 1

Package manager version: 0.45.99.git
Distribution version: selfupdate-point (bootstrap), 10.13, x86_64
Trees: local/main stable/main
Xcode.app: 10.1
Xcode command-line tools: 10.1.0.0.1.1539992718
Max. Fink build jobs:  2

So this might be a blocker for updating past gcc11 on older systems.

@sth0

sth0 commented Jan 4, 2024

Copy link
Copy Markdown
Contributor

I just compiled gcc11, and gcc12 with these package definitions on the following systems
MacOS / Xcode
13.6.3 / 15.1 (arm64 and x86)
12.7.1 / 14.2
10.14.7 / 11.3.1

@dhomeier

dhomeier commented Jan 5, 2024

Copy link
Copy Markdown
Contributor Author

Thanks for confirming the build on Ventura!
After several more attempts I have been able to build 12.3 on Sonoma with 2 threads for x86_64 (M1 with Rosetta) and with UseMaxBuildJobs: False for arm64, but some further tests (building openblas) still result in frequent internal compiler errors/segfaults, especially when combing CC=clang with FC=gfortran-fsf-12.
Maybe there will be a 12.4 release improving on this...

@sth0

sth0 commented Jan 6, 2024

Copy link
Copy Markdown
Contributor

I have issues with blas on arm64. It crashes when executing tests. Haven't examined if that is a blas or with gcc.

@dhomeier

dhomeier commented Jan 6, 2024

Copy link
Copy Markdown
Contributor Author

Anything related to #908 (comment)?
OpenBLAS is now at 0.3.26, but I haven't got to test that much on older systems.

@cooljeanius

Copy link
Copy Markdown

Anything related to #908 (comment)?

Do you mean related to it being merged, or related to the problem that it was meant to address?

@PovlAbrahamsen

Copy link
Copy Markdown
Contributor

I've tried building GCC 14.2 on an Intel processor, running MacOS 14.7.1 with command-line tools 16.1. And unfortunately it fails with a similar assembly issue to that mentioned above, while building libgcc:

/opt/sw/src/fink.build/gcc14-14.2.0-1/darwin_objdir/./gcc/xgcc -B/opt/sw/src/fink.build/gcc14-14.2.0-1/darwin_objdir/./gcc/ -B/opt/sw/lib/gcc14/x86_64-apple-darwin23.6.0/bin/ -B/opt/sw/lib/gcc14/x86_64-apple-darwin23.6.0/lib/ -isystem /opt/sw/lib/gcc14/x86_64-apple-darwin23.6.0/include -isystem /opt/sw/lib/gcc14/x86_64-apple-darwin23.6.0/sys-include   -fno-checking -g -O2 -O2  -g -O2 -DIN_GCC   -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include   -mmacosx-version-min=11 -fno-common -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector   -mmacosx-version-min=11 -fno-common -I. -I. -I../.././gcc -I../../../gcc-14.2.0/libgcc -I../../../gcc-14.2.0/libgcc/. -I../../../gcc-14.2.0/libgcc/../gcc -I../../../gcc-14.2.0/libgcc/../include  -DHAVE_CC_TLS -DUSE_EMUTLS  -o avx_resms64x_s.o -MT avx_resms64x_s.o -MD -MP -MF avx_resms64x_s.dep -DSHARED -c -xassembler-with-cpp ../../../gcc-14.2.0/libgcc/config/i386/avx_resms64x.S
/opt/sw/src/fink.build/gcc14-14.2.0-1/darwin_objdir/./gcc/xgcc -B/opt/sw/src/fink.build/gcc14-14.2.0-1/darwin_objdir/./gcc/ -B/opt/sw/lib/gcc14/x86_64-apple-darwin23.6.0/bin/ -B/opt/sw/lib/gcc14/x86_64-apple-darwin23.6.0/lib/ -isystem /opt/sw/lib/gcc14/x86_64-apple-darwin23.6.0/include -isystem /opt/sw/lib/gcc14/x86_64-apple-darwin23.6.0/sys-include   -fno-checking -g -O2 -O2  -g -O2 -DIN_GCC   -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include   -mmacosx-version-min=11 -fno-common -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector   -mmacosx-version-min=11 -fno-common -I. -I. -I../.././gcc -I../../../gcc-14.2.0/libgcc -I../../../gcc-14.2.0/libgcc/. -I../../../gcc-14.2.0/libgcc/../gcc -I../../../gcc-14.2.0/libgcc/../include  -DHAVE_CC_TLS -DUSE_EMUTLS  -o avx_savms64f_s.o -MT avx_savms64f_s.o -MD -MP -MF avx_savms64f_s.dep -DSHARED -c -xassembler-with-cpp ../../../gcc-14.2.0/libgcc/config/i386/avx_savms64f.S
/bin/sh ../../../gcc-14.2.0/libgcc/../move-if-change tmp-libgcc_tm.h libgcc_tm.h
/opt/sw/src/fink.build/gcc14-14.2.0-1/darwin_objdir/./gcc/xgcc -B/opt/sw/src/fink.build/gcc14-14.2.0-1/darwin_objdir/./gcc/ -B/opt/sw/lib/gcc14/x86_64-apple-darwin23.6.0/bin/ -B/opt/sw/lib/gcc14/x86_64-apple-darwin23.6.0/lib/ -isystem /opt/sw/lib/gcc14/x86_64-apple-darwin23.6.0/include -isystem /opt/sw/lib/gcc14/x86_64-apple-darwin23.6.0/sys-include   -fno-checking -g -O2 -O2  -g -O2 -DIN_GCC   -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include   -mmacosx-version-min=11 -fno-common -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector   -mmacosx-version-min=11 -fno-common -I. -I. -I../.././gcc -I../../../gcc-14.2.0/libgcc -I../../../gcc-14.2.0/libgcc/. -I../../../gcc-14.2.0/libgcc/../gcc -I../../../gcc-14.2.0/libgcc/../include  -DHAVE_CC_TLS -DUSE_EMUTLS  -o avx_resms64f_s.o -MT avx_resms64f_s.o -MD -MP -MF avx_resms64f_s.dep -DSHARED -c -xassembler-with-cpp ../../../gcc-14.2.0/libgcc/config/i386/avx_resms64f.S
/opt/sw/src/fink.build/gcc14-14.2.0-1/darwin_objdir/./gcc/xgcc -B/opt/sw/src/fink.build/gcc14-14.2.0-1/darwin_objdir/./gcc/ -B/opt/sw/lib/gcc14/x86_64-apple-darwin23.6.0/bin/ -B/opt/sw/lib/gcc14/x86_64-apple-darwin23.6.0/lib/ -isystem /opt/sw/lib/gcc14/x86_64-apple-darwin23.6.0/include -isystem /opt/sw/lib/gcc14/x86_64-apple-darwin23.6.0/sys-include   -fno-checking -g -O2 -O2  -g -O2 -DIN_GCC   -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include   -mmacosx-version-min=11 -fno-common -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector   -mmacosx-version-min=11 -fno-common -I. -I. -I../.././gcc -I../../../gcc-14.2.0/libgcc -I../../../gcc-14.2.0/libgcc/. -I../../../gcc-14.2.0/libgcc/../gcc -I../../../gcc-14.2.0/libgcc/../include  -DHAVE_CC_TLS -DUSE_EMUTLS  -o avx_resms64fx_s.o -MT avx_resms64fx_s.o -MD -MP -MF avx_resms64fx_s.dep -DSHARED -c -xassembler-with-cpp ../../../gcc-14.2.0/libgcc/config/i386/avx_resms64fx.S
/opt/sw/src/fink.build/gcc14-14.2.0-1/darwin_objdir/./gcc/xgcc -B/opt/sw/src/fink.build/gcc14-14.2.0-1/darwin_objdir/./gcc/ -B/opt/sw/lib/gcc14/x86_64-apple-darwin23.6.0/bin/ -B/opt/sw/lib/gcc14/x86_64-apple-darwin23.6.0/lib/ -isystem /opt/sw/lib/gcc14/x86_64-apple-darwin23.6.0/include -isystem /opt/sw/lib/gcc14/x86_64-apple-darwin23.6.0/sys-include   -fno-checking -g -O2 -O2  -g -O2 -DIN_GCC   -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include   -mmacosx-version-min=11 -fno-common -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector   -mmacosx-version-min=11 -fno-common -I. -I. -I../.././gcc -I../../../gcc-14.2.0/libgcc -I../../../gcc-14.2.0/libgcc/. -I../../../gcc-14.2.0/libgcc/../gcc -I../../../gcc-14.2.0/libgcc/../include  -DHAVE_CC_TLS -DUSE_EMUTLS  -o sse_savms64_s.o -MT sse_savms64_s.o -MD -MP -MF sse_savms64_s.dep -DSHARED -c -xassembler-with-cpp ../../../gcc-14.2.0/libgcc/config/i386/sse_savms64.S
echo timestamp > libgcc_tm.stamp
/opt/sw/src/fink.build/gcc14-14.2.0-1/darwin_objdir/./gcc/xgcc -B/opt/sw/src/fink.build/gcc14-14.2.0-1/darwin_objdir/./gcc/ -B/opt/sw/lib/gcc14/x86_64-apple-darwin23.6.0/bin/ -B/opt/sw/lib/gcc14/x86_64-apple-darwin23.6.0/lib/ -isystem /opt/sw/lib/gcc14/x86_64-apple-darwin23.6.0/include -isystem /opt/sw/lib/gcc14/x86_64-apple-darwin23.6.0/sys-include   -fno-checking -g -O2 -O2  -g -O2 -DIN_GCC   -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include   -mmacosx-version-min=11 -fno-common -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector   -mmacosx-version-min=11 -fno-common -I. -I. -I../.././gcc -I../../../gcc-14.2.0/libgcc -I../../../gcc-14.2.0/libgcc/. -I../../../gcc-14.2.0/libgcc/../gcc -I../../../gcc-14.2.0/libgcc/../include  -DHAVE_CC_TLS -DUSE_EMUTLS  -o sse_resms64_s.o -MT sse_resms64_s.o -MD -MP -MF sse_resms64_s.dep -DSHARED -c -xassembler-with-cpp ../../../gcc-14.2.0/libgcc/config/i386/sse_resms64.S
/opt/sw/src/fink.build/gcc14-14.2.0-1/darwin_objdir/./gcc/xgcc -B/opt/sw/src/fink.build/gcc14-14.2.0-1/darwin_objdir/./gcc/ -B/opt/sw/lib/gcc14/x86_64-apple-darwin23.6.0/bin/ -B/opt/sw/lib/gcc14/x86_64-apple-darwin23.6.0/lib/ -isystem /opt/sw/lib/gcc14/x86_64-apple-darwin23.6.0/include -isystem /opt/sw/lib/gcc14/x86_64-apple-darwin23.6.0/sys-include   -fno-checking -g -O2 -O2  -g -O2 -DIN_GCC   -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include   -mmacosx-version-min=11 -fno-common -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector   -mmacosx-version-min=11 -fno-common -I. -I. -I../.././gcc -I../../../gcc-14.2.0/libgcc -I../../../gcc-14.2.0/libgcc/. -I../../../gcc-14.2.0/libgcc/../gcc -I../../../gcc-14.2.0/libgcc/../include  -DHAVE_CC_TLS -DUSE_EMUTLS  -o sse_resms64x_s.o -MT sse_resms64x_s.o -MD -MP -MF sse_resms64x_s.dep -DSHARED -c -xassembler-with-cpp ../../../gcc-14.2.0/libgcc/config/i386/sse_resms64x.S
/opt/sw/src/fink.build/gcc14-14.2.0-1/darwin_objdir/./gcc/xgcc -B/opt/sw/src/fink.build/gcc14-14.2.0-1/darwin_objdir/./gcc/ -B/opt/sw/lib/gcc14/x86_64-apple-darwin23.6.0/bin/ -B/opt/sw/lib/gcc14/x86_64-apple-darwin23.6.0/lib/ -isystem /opt/sw/lib/gcc14/x86_64-apple-darwin23.6.0/include -isystem /opt/sw/lib/gcc14/x86_64-apple-darwin23.6.0/sys-include   -fno-checking -g -O2 -O2  -g -O2 -DIN_GCC   -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include   -mmacosx-version-min=11 -fno-common -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector   -mmacosx-version-min=11 -fno-common -I. -I. -I../.././gcc -I../../../gcc-14.2.0/libgcc -I../../../gcc-14.2.0/libgcc/. -I../../../gcc-14.2.0/libgcc/../gcc -I../../../gcc-14.2.0/libgcc/../include  -DHAVE_CC_TLS -DUSE_EMUTLS  -o sse_savms64f_s.o -MT sse_savms64f_s.o -MD -MP -MF sse_savms64f_s.dep -DSHARED -c -xassembler-with-cpp ../../../gcc-14.2.0/libgcc/config/i386/sse_savms64f.S
/opt/sw/src/fink.build/gcc14-14.2.0-1/darwin_objdir/./gcc/xgcc -B/opt/sw/src/fink.build/gcc14-14.2.0-1/darwin_objdir/./gcc/ -B/opt/sw/lib/gcc14/x86_64-apple-darwin23.6.0/bin/ -B/opt/sw/lib/gcc14/x86_64-apple-darwin23.6.0/lib/ -isystem /opt/sw/lib/gcc14/x86_64-apple-darwin23.6.0/include -isystem /opt/sw/lib/gcc14/x86_64-apple-darwin23.6.0/sys-include   -fno-checking -g -O2 -O2  -g -O2 -DIN_GCC   -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include   -mmacosx-version-min=11 -fno-common -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector   -mmacosx-version-min=11 -fno-common -I. -I. -I../.././gcc -I../../../gcc-14.2.0/libgcc -I../../../gcc-14.2.0/libgcc/. -I../../../gcc-14.2.0/libgcc/../gcc -I../../../gcc-14.2.0/libgcc/../include  -DHAVE_CC_TLS -DUSE_EMUTLS  -o sse_resms64f_s.o -MT sse_resms64f_s.o -MD -MP -MF sse_resms64f_s.dep -DSHARED -c -xassembler-with-cpp ../../../gcc-14.2.0/libgcc/config/i386/sse_resms64f.S
../../../gcc-14.2.0/libgcc/config/i386/resms64x.h:37:32: error: non-private labels cannot appear between .cfi_startproc / .cfi_endproc pairs
.globl ___avx_resms64x_18; ; ; ___avx_resms64x_18:
                               ^
../../../gcc-14.2.0/libgcc/config/i386/resms64x.h:35:2: error: previous .cfi_startproc was here
 .cfi_startproc
 ^
../../../gcc-14.2.0/libgcc/config/i386/resms64x.h:39:32: error: non-private labels cannot appear between .cfi_startproc / .cfi_endproc pairs
.globl ___avx_resms64x_17; ; ; ___avx_resms64x_17:
                               ^
../../../gcc-14.2.0/libgcc/config/i386/resms64x.h:35:2: error: previous .cfi_startproc was here
 .cfi_startproc
 ^
../../../gcc-14.2.0/libgcc/config/i386/resms64x.h:41:32: error: non-private labels cannot appear between .cfi_startproc / .cfi_endproc pairs
.globl ___avx_resms64x_16; ; ; ___avx_resms64x_16:
                               ^
../../../gcc-14.2.0/libgcc/config/i386/resms64x.h:35:2: error: previous .cfi_startproc was here
 .cfi_startproc
 ^
../../../gcc-14.2.0/libgcc/config/i386/resms64x.h:43:32: error: non-private labels cannot appear between .cfi_startproc / .cfi_endproc pairs
.globl ___avx_resms64x_15; ; ; ___avx_resms64x_15:
                               ^
../../../gcc-14.2.0/libgcc/config/i386/resms64x.h:35:2: error: previous .cfi_startproc was here
 .cfi_startproc
 ^
../../../gcc-14.2.0/libgcc/config/i386/resms64x.h:45:32: error: non-private labels cannot appear between .cfi_startproc / .cfi_endproc pairs
.globl ___avx_resms64x_14; ; ; ___avx_resms64x_14:
                               ^
../../../gcc-14.2.0/libgcc/config/i386/resms64x.h:35:2: error: previous .cfi_startproc was here
 .cfi_startproc
 ^
../../../gcc-14.2.0/libgcc/config/i386/resms64x.h:47:32: error: non-private labels cannot appear between .cfi_startproc / .cfi_endproc pairs
.globl ___avx_resms64x_13; ; ; ___avx_resms64x_13:
                               ^
../../../gcc-14.2.0/libgcc/config/i386/resms64x.h:35:2: error: previous .cfi_startproc was here
 .cfi_startproc
 ^
../../../gcc-14.2.0/libgcc/config/i386/resms64x.h:49:32: error: non-private labels cannot appear between .cfi_startproc / .cfi_endproc pairs
.globl ___avx_resms64x_12; ; ; ___avx_resms64x_12:
                               ^
../../../gcc-14.2.0/libgcc/config/i386/resms64x.h:35:2: error: previous .cfi_startproc was here
 .cfi_startproc
 ^
make[3]: *** [avx_resms64x_s.o] Error 1
make[3]: *** Waiting for unfinished jobs....
../../../gcc-14.2.0/libgcc/config/i386/resms64fx.h:39:33: error: non-private labels cannot appear between .cfi_startproc / .cfi_endproc pairs
.globl ___avx_resms64fx_17; ; ; ___avx_resms64fx_17:
                                ^
../../../gcc-14.2.0/libgcc/config/i386/resms64fx.h:36:2: error: previous .cfi_startproc was here
 .cfi_startproc
 ^
../../../gcc-14.2.0/libgcc/config/i386/resms64fx.h:41:33: error: non-private labels cannot appear between .cfi_startproc / .cfi_endproc pairs
.globl ___avx_resms64fx_16; ; ; ___avx_resms64fx_16:
                                ^
../../../gcc-14.2.0/libgcc/config/i386/resms64fx.h:36:2: error: previous .cfi_startproc was here
 .cfi_startproc
 ^
../../../gcc-14.2.0/libgcc/config/i386/resms64fx.h:43:33: error: non-private labels cannot appear between .cfi_startproc / .cfi_endproc pairs
.globl ___avx_resms64fx_15; ; ; ___avx_resms64fx_15:
                                ^
../../../gcc-14.2.0/libgcc/config/i386/resms64fx.h:36:2: error: previous .cfi_startproc was here
 .cfi_startproc
 ^
../../../gcc-14.2.0/libgcc/config/i386/resms64fx.h:45:33: error: non-private labels cannot appear between .cfi_startproc / .cfi_endproc pairs
.globl ___avx_resms64fx_14; ; ; ___avx_resms64fx_14:
                                ^
../../../gcc-14.2.0/libgcc/config/i386/resms64fx.h:36:2: error: previous .cfi_startproc was here
 .cfi_startproc
 ^
../../../gcc-14.2.0/libgcc/config/i386/resms64fx.h:47:33: error: non-private labels cannot appear between .cfi_startproc / .cfi_endproc pairs
.globl ___avx_resms64fx_13; ; ; ___avx_resms64fx_13:
                                ^
../../../gcc-14.2.0/libgcc/config/i386/resms64fx.h:36:2: error: previous .cfi_startproc was here
 .cfi_startproc
 ^
../../../gcc-14.2.0/libgcc/config/i386/resms64fx.h:49:33: error: non-private labels cannot appear between .cfi_startproc / .cfi_endproc pairs
.globl ___avx_resms64fx_12; ; ; ___avx_resms64fx_12:
                                ^
../../../gcc-14.2.0/libgcc/config/i386/resms64fx.h:36:2: error: previous .cfi_startproc was here
 .cfi_startproc
 ^
make[3]: *** [avx_resms64fx_s.o] Error 1
../../../gcc-14.2.0/libgcc/config/i386/resms64x.h:37:32: error: non-private labels cannot appear between .cfi_startproc / .cfi_endproc pairs
.globl ___sse_resms64x_18; ; ; ___sse_resms64x_18:
                               ^
../../../gcc-14.2.0/libgcc/config/i386/resms64x.h:35:2: error: previous .cfi_startproc was here
 .cfi_startproc
 ^
../../../gcc-14.2.0/libgcc/config/i386/resms64x.h:39:32: error: non-private labels cannot appear between .cfi_startproc / .cfi_endproc pairs
.globl ___sse_resms64x_17; ; ; ___sse_resms64x_17:
                               ^
../../../gcc-14.2.0/libgcc/config/i386/resms64x.h:35:2: error: previous .cfi_startproc was here
 .cfi_startproc
 ^
../../../gcc-14.2.0/libgcc/config/i386/resms64x.h:41:32: error: non-private labels cannot appear between .cfi_startproc / .cfi_endproc pairs
.globl ___sse_resms64x_16; ; ; ___sse_resms64x_16:
                               ^
../../../gcc-14.2.0/libgcc/config/i386/resms64x.h:35:2: error: previous .cfi_startproc was here
 .cfi_startproc
 ^
../../../gcc-14.2.0/libgcc/config/i386/resms64x.h:43:32: error: non-private labels cannot appear between .cfi_startproc / .cfi_endproc pairs
.globl ___sse_resms64x_15; ; ; ___sse_resms64x_15:
                               ^
../../../gcc-14.2.0/libgcc/config/i386/resms64x.h:35:2: error: previous .cfi_startproc was here
 .cfi_startproc
 ^
../../../gcc-14.2.0/libgcc/config/i386/resms64x.h:45:32: error: non-private labels cannot appear between .cfi_startproc / .cfi_endproc pairs
.globl ___sse_resms64x_14; ; ; ___sse_resms64x_14:
                               ^
../../../gcc-14.2.0/libgcc/config/i386/resms64x.h:35:2: error: previous .cfi_startproc was here
 .cfi_startproc
 ^
../../../gcc-14.2.0/libgcc/config/i386/resms64x.h:47:32: error: non-private labels cannot appear between .cfi_startproc / .cfi_endproc pairs
.globl ___sse_resms64x_13; ; ; ___sse_resms64x_13:
                               ^
../../../gcc-14.2.0/libgcc/config/i386/resms64x.h:35:2: error: previous .cfi_startproc was here
 .cfi_startproc
 ^
../../../gcc-14.2.0/libgcc/config/i386/resms64x.h:49:32: error: non-private labels cannot appear between .cfi_startproc / .cfi_endproc pairs
.globl ___sse_resms64x_12; ; ; ___sse_resms64x_12:
                               ^
../../../gcc-14.2.0/libgcc/config/i386/resms64x.h:35:2: error: previous .cfi_startproc was here
 .cfi_startproc
 ^
make[3]: *** [sse_resms64x_s.o] Error 1
make[2]: *** [all-stage1-target-libgcc] Error 2
make[1]: *** [stage1-bubble] Error 2
make: *** [Makefile:24094: bootstrap] Error 2

@PovlAbrahamsen

Copy link
Copy Markdown
Contributor

Building gcc14 still fails with the same issue as before on an Intel processor, MacOS Sonoma 14.7.4 / Darwin 23.6.0, Xcode command-line tools 16.2.

@dhomeier

dhomeier commented Feb 19, 2025

Copy link
Copy Markdown
Contributor Author

../../../gcc-14.2.0/libgcc/config/i386/resms64x.h:37:32: error: non-private labels cannot appear between .cfi_startproc / .cfi_endproc pairs
.globl ___avx_resms64x_18; ; ; ___avx_resms64x_18:
^
../../../gcc-14.2.0/libgcc/config/i386/resms64x.h:35:2: error: previous .cfi_startproc was here
.cfi_startproc
^

Those look similar to the errors in lse.S without the brew patch, but that brings almost no changes to the i386 code (after all, it's pulled from iains/gcc-darwin-arm64. But searching for that file and error doesn't bring anything else up either.

Is there any working gcc on 14.x and x86_64 then? For arm64 with Xcode 16 there definitely is none at this point, so it would be good to get this unblocked. I could remove the gcc14-14.0 distribution then; if so, should I do it for Intel only (apparently we have an Architecture: arm64 field now)?

@PovlAbrahamsen

Copy link
Copy Markdown
Contributor

I have submitted the issue with Intel processors as iains/gcc-14-branch#19. I have now upgraded this machine to MacOS 15.3.2, but see the same errors as before.

@PovlAbrahamsen

Copy link
Copy Markdown
Contributor

Following advice from @iains (on the thread linked above), it looks like the issue on Intel processors was related to the presence of GNU's objdump, as installed by Fink's objtools, on the path causing problems in the detection of clang's assembly features. This can be overridden by adding --with-build-time-tools=/usr/bin to ConfigureParams. I have tested this with GCC 14.2 on MacOS 15.4 on both Intel and Apple Silicon, and it appears to result in a working compiler on both! @dhomeier, can you please add this to the packages?

@PovlAbrahamsen

Copy link
Copy Markdown
Contributor

I can also confirm that GCC 13.3 builds on MacOS 15.4 on Intel with the same fix applied.

@PovlAbrahamsen

Copy link
Copy Markdown
Contributor

It would be great if the change suggested above could be added, so this can be merged soon!

@dmacks

dmacks commented Aug 4, 2025

Copy link
Copy Markdown
Member

The general version-bump of gcc12 seems fine. I see that it's only for up through OSX 13.0. Is the 13.0 trick also portable to 14.0 and 15.0?

Adding new gccXX with whatever tricks are needed per platform seems fine. I see that gcc14 is only for OSX 13.0 and above. Is it not buildable on older OSX?

We can obviously take what we have now and then spread it to those missing platforms as soon as someone figures out how, just want to make sure I understand what we have now.

@dmacks

dmacks commented Aug 4, 2025

Copy link
Copy Markdown
Member

Answering one of my own questions... gcc14 FTBFS on 10.13 with a clang crash and

fatal error: error in backend: Cannot select: intrinsic %llvm.x86.sha1nexte

So at least for now, gcc13 will be the highest gccXX that is available on all OSX.

@iains

iains commented Aug 4, 2025

Copy link
Copy Markdown

So at least for now, gcc13 will be the highest gccXX that is available on all OSX.

Not quite sure what you are doing here.

I test on x86_64-darwin17..24 (macOS10.13..macOS15) and i686-darwin9 and 17 (using available Xcode CLT installs). I sometimes test on 10.12 and earlier (but limited on what test hardware I have available) .. there's no reason to expect that there would be any build issues on versions >= 10.5.

All of these platforms work with unpatched GCC 12.5, GCC-13.4, GCC-15.2 (soon to be released) and gcc-16 development.

See, for example, the test results for 15.2 release candidate
https://gcc.gnu.org/pipermail/gcc-testresults/2025-August/854354.html .. https://gcc.gnu.org/pipermail/gcc-testresults/2025-August/854362.html

and for this weekend's trunk (gcc-16)
https://gcc.gnu.org/pipermail/gcc-testresults/2025-August/854423.html .. https://gcc.gnu.org/pipermail/gcc-testresults/2025-August/854432.html

You need a patched branch to build arm64 - but for x86_64/i686 it should "just work"... so you should look for fallout from some other component.
.

@dmacks

dmacks commented Aug 4, 2025

Copy link
Copy Markdown
Member

I'm OS X 10.13 on an x86_64 Mac. I took the gcc14.info and adjusted Distribution to include 10.13, so that .info has all the patch/script magic that is used. Here's the fail:

make[3]: Entering directory '/sw/build.build/gcc14-14.2.0-2/darwin_objdir/libiberty'
if [ x"-fno-common" != x ]; then \
  gcc -c -DHAVE_CONFIG_H -g  -I. -I../../gcc-14.2.0/libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -Wshadow=local -pedantic  -D_GNU_SOURCE  -fno-common ../../gcc-14.2.0/libiberty/sha1.c -o pic/sha1.o; \
else true; fi
warning: unknown warning option '-Wshadow=local' [-Wunknown-warning-option]
fatal error: error in backend: Cannot select: intrinsic %llvm.x86.sha1nexte
clang: error: clang frontend command failed with exit code 70 (use -v to see invocation)
Apple LLVM version 10.0.0 (clang-1000.11.45.5)
Target: x86_64-apple-darwin17.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
clang: note: diagnostic msg: PLEASE submit a bug report to http://developer.apple.com/bugreporter/ and include the crash backtrace, preprocessed source, and associated run script.

but it seemed pointless to report something to them on a long-unsupported OS X. But in particular there is no .crash file in the Logs/DiagnosticReports in my homedir. The run script is:

# Crash reproducer for Apple LLVM version 10.0.0 (clang-1000.11.45.5)
# Driver args: "-c" "-D" "HAVE_CONFIG_H" "-g" "-I" "." "-I" "../../gcc-14.2.0/libiberty/../include" "-W" "-Wall" "-Wwrite-strings" "-Wc++-compat" "-Wstrict-prototypes" "-Wshadow=local" "-pedantic" "-D" "_GNU_SOURCE" "-fno-common" "../../gcc-14.2.0/libiberty/sha1.c" "-o" "pic/sha1.o"
# Original command:  "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" "-cc1" "-triple" "x86_64-apple-macosx10.13.0" "-Wdeprecated-objc-isa-usage" "-Werror=deprecated-objc-isa-usage" "-emit-obj" "-mrelax-all" "-disable-free" "-disable-llvm-verifier" "-discard-value-names" "-main-file-name" "sha1.c" "-mrelocation-model" "pic" "-pic-level" "2" "-mthread-model" "posix" "-mdisable-fp-elim" "-fno-strict-return" "-masm-verbose" "-munwind-tables" "-target-cpu" "penryn" "-dwarf-column-info" "-debug-info-kind=standalone" "-dwarf-version=4" "-debugger-tuning=lldb" "-target-linker-version" "409.12" "-coverage-notes-file" "/sw/build.build/gcc14-14.2.0-2/darwin_objdir/libiberty/pic/sha1.gcno" "-resource-dir" "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/10.0.0" "-D" "HAVE_CONFIG_H" "-I" "." "-I" "../../gcc-14.2.0/libiberty/../include" "-D" "_GNU_SOURCE" "-W" "-Wall" "-Wwrite-strings" "-Wc++-compat" "-Wstrict-prototypes" "-Wshadow=local" "-pedantic" "-fconst-strings" "-fdebug-compilation-dir" "/sw/build.build/gcc14-14.2.0-2/darwin_objdir/libiberty" "-ferror-limit" "19" "-fmessage-length" "200" "-stack-protector" "1" "-fblocks" "-fencode-extended-block-signature" "-fobjc-runtime=macosx-10.13.0" "-fmax-type-align=16" "-fno-common" "-fdiagnostics-show-option" "-fcolor-diagnostics" "-o" "pic/sha1.o" "-x" "c" "../../gcc-14.2.0/libiberty/sha1.c"
 "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" "-cc1" "-triple" "x86_64-apple-macosx10.13.0" "-Wdeprecated-objc-isa-usage" "-Werror=deprecated-objc-isa-usage" "-emit-obj" "-mrelax-all" "-disable-free" "-disable-llvm-verifier" "-discard-value-names" "-main-file-name" "sha1.c" "-mrelocation-model" "pic" "-pic-level" "2" "-mthread-model" "posix" "-mdisable-fp-elim" "-fno-strict-return" "-masm-verbose" "-munwind-tables" "-target-cpu" "penryn" "-dwarf-column-info" "-debug-info-kind=standalone" "-dwarf-version=4" "-debugger-tuning=lldb" "-target-linker-version" "409.12" "-coverage-notes-file" "/sw/build.build/gcc14-14.2.0-2/darwin_objdir/libiberty/pic/sha1.gcno" "-D" "HAVE_CONFIG_H" "-D" "_GNU_SOURCE" "-W" "-Wall" "-Wwrite-strings" "-Wc++-compat" "-Wstrict-prototypes" "-Wshadow=local" "-pedantic" "-fconst-strings" "-ferror-limit" "19" "-fmessage-length" "200" "-stack-protector" "1" "-fblocks" "-fencode-extended-block-signature" "-fobjc-runtime=macosx-10.13.0" "-fmax-type-align=16" "-fno-common" "-fdiagnostics-show-option" "-fcolor-diagnostics" "-x" "c" "sha1-b22472.c"

The associated .c is about 7MB if you want it.

@iains

iains commented Aug 4, 2025

Copy link
Copy Markdown

Apologies, but I am not able to analyse or support the non-standard builds of the distribution(s) - simply not enough time :) ... the point I was making is that GCC is regularly tested on (at least) versions of macOS back to 10.13 (using the "standard" Apple-released Xcode CLTs for the assembler/linker/dsymutil) - so if it is not working in your configuration, the problem may lies with some replacement for those tools (or, perhaps some build-time tool).. It should be possible to have GCC up to current trunk working there.

@dmacks

dmacks commented Aug 4, 2025

Copy link
Copy Markdown
Member

Thanks for dropping by, and continuing to support/test your mainline on our old platforms. I'm just testing the fink package, which obviously has a lot of patch and I don't know anything about that myself.

@nieder

nieder commented Aug 22, 2025

Copy link
Copy Markdown
Member

Using patches from cf99a0f:
On 10.14.6/x86_64:

  • gcc14 finished building successfully without needing --with-build-time-tools=/usr/bin even though I have objtools-2.41-1 installed. The build definitely found objdump and readelf from objtools during configure (showed full path).

On 13.7.1/x86_64,

  • gcc12 finished building successfully without needing --with-build-time-tools=/usr/bin even though I have objtools-2.41-1 installed. The build definitely found objdump and readelf from objtools during configure (showed full path).
  • gcc13 finished building successfully without needing --with-build-time-tools=/usr/bin even though I have objtools-2.41-1 installed. The build definitely found objdump and readelf from objtools during configure (showed full path).
  • gcc14 finished building successfully without needing --with-build-time-tools=/usr/bin even though I have objtools-2.41-1 installed. The build definitely found objdump and readelf from objtools during configure (showed full path).
  • gcc14 finished building successfully if I add --with-build-time-tools=/usr/bin to ConfigureParams. Objdump is now marked as the one in /usr/bin, but readelf is still %p/bin/readelf from objtools (because there's no /usr/bin/readelf).

So looks like --with-build-time-tools is not needed through at least 13.7, but doesn't seem to be a problem if it's present.

@nieder

nieder commented Aug 24, 2025

Copy link
Copy Markdown
Member

I've edited the top comment to add what I think are the current status of tested gcc versions from here against distritbutions. So far the only fail I'm sure of is gcc14/10.13 via @dmacks and the x86_64 problems on 15.x with objtools via @PovlAbrahamsen (which has a workaround). If you know a combination either passes or fails, please add so it's easier to know the situation

@dmacks

dmacks commented Sep 25, 2025

Copy link
Copy Markdown
Member

I've edited the top comment to add what I think are the current status of tested gcc versions from here against distritbutions. So far the only fail I'm sure of is gcc14/10.13 via @dmacks and the x86_64 problems on 15.x with objtools via @PovlAbrahamsen (which has a workaround). If you know a combination either passes or fails, please add so it's easier to know the situation

For the record, I am probably no longer able to test things on 10.13.

@sth0

sth0 commented May 27, 2026

Copy link
Copy Markdown
Contributor

Sorry, should have posted here instead of PR#1301
The current gcc12 does NOT build on arm64 or for X86_64 for Tahoe 12.5. The error report suggests maintainer mode for configure?? This is the arm64 error:

g++ -std=c++11   -g -DIN_GCC    -fno-strict-aliasing -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common  -DHAVE_CONFIG_H  -DGENERATOR_FILE -Wl,-headerpad_max_install_names -o build/genmddeps \
	    build/genmddeps.o build/read-md.o build/errors.o ../build-aarch64-apple-darwin25.5.0/libiberty/libiberty.a
/bin/sh ../../gcc-12.2.0/gcc/config/aarch64/gentune.sh \
		../../gcc-12.2.0/gcc/config/aarch64/aarch64-cores.def > \
		tmp-aarch64-tune.md
aarch64-tune.md has changed; either
configure with --enable-maintainer-mode
or copy tmp-aarch64-tune.md to ../../gcc-12.2.0/gcc/config/aarch64/aarch64-tune.md
make[3]: *** [s-aarch64-tune-md] Error 1
make[2]: *** [all-stage1-gcc] Error 2
make[1]: *** [stage1-bubble] Error 2
make: *** [bootstrap] Error 2
### execution of /tmp/fink.YpKeb failed, exit code 2
### execution of /tmp/fink.jbXuC failed, exit code 2
<snip>
Package manager version: 0.45.99.git
Distribution version: selfupdate-git Sat May 23 18:16:40 2026, 15.0, arm64
Trees: local/main stable/main
Xcode.app: 26.5
Xcode command-line tools: 26.5.0.0.1777544298
Max. Fink build jobs:  1

Here is error for building gcc12 on X86_64

cc-12.2.0/gcc/../libcpp/include -I/opt/sw/include \
		-o build/genpreds.o ../../gcc-12.2.0/gcc/genpreds.cc
In file included from ../../gcc-12.2.0/gcc/genpreds.cc:26:
In file included from ./tm.h:37:
./options.h:1:2: error: Empty option argument 'Type' during parsing of: Name(asm_dialect) Type(enum asm_dialect)
    1 | #error Empty option argument 'Type' during parsing of: Name(asm_dialect) Type(enum asm_dialect)
      |  ^
./options.h:2:2: error: Empty option argument 'Type' during parsing of: Name(auto_init_type) Type(enum auto_init_type) UnknownError(unrecognized automatic variable initialization type %qs)
    2 | #error Empty option argument 'Type' during parsing of: Name(auto_init_type) Type(enum auto_init_type) UnknownError(unrecognized automatic variable initialization type %qs)
      |  ^
./options.h:3:2: error: Empty option argument 'Type' during parsing of: Name(bounds_check) Type(int) UnknownError(unknown array bounds setting %qs)
    3 | #error Empty option argument 'Type' during parsing of: Name(bounds_check) Type(int) UnknownError(unknown array bounds setting %qs)
      |  ^
./options.h:4:2: error: Empty option argument 'Type' during parsing of: Name(calling_abi) Type(enum calling_abi)
    4 | #error Empty option argument 'Type' during parsing of: Name(calling_abi) Type(enum calling_abi)
      |  ^
./options.h:5:2: error: Empty option argument 'Type' during parsing of: Name(cf_protection_level) Type(enum cf_protection_level) UnknownError(unknown Control-Flow Protection Level %qs)
    5 | #error Empty option argument 'Type' during parsing of: Name(cf_protection_level) Type(enum cf_protection_level) UnknownError(unknown Control-Flow Protection Level %qs)
      |  ^
./options.h:6:2: error: Empty option argument 'Type' during parsing of: Name(check_action) Type(int) UnknownError(unknown checkaction setting %qs)
    6 | #error Empty option argument 'Type' during parsing of: Name(check_action) Type(int) UnknownError(unknown checkaction setting %qs)
      |  ^
./options.h:7:2: error: Empty option argument 'Type' during parsing of: Name(cmodel) Type(enum cmodel)
    7 | #error Empty option argument 'Type' during parsing of: Name(cmodel) Type(enum cmodel)
      |  ^
./options.h:8:2: error: Empty option argument 'Type' during parsing of: Name(compressed_debug_sections) Type(int)
    8 | #error Empty option argument 'Type' during parsing of: Name(compressed_debug_sections) Type(int)
      |  ^
./options.h:9:2: error: Empty option argument 'Type' during parsing of: Name(cpp_bidirectional_level) Type(int) UnknownError(argument %qs to %<-Wbidi-chars%> not recognized)
    9 | #error Empty option argument 'Type' during parsing of: Name(cpp_bidirectional_level) Type(int) UnknownError(argument %qs to %<-Wbidi-chars%> not recognized)
      |  ^
./options.h:10:2: error: Empty option argument 'Type' during parsing of: Name(cpp_normalize_level) Type(int) UnknownError(argument %qs to %<-Wnormalized%> not recognized)
   10 | #error Empty option argument 'Type' during parsing of: Name(cpp_normalize_level) Type(int) UnknownError(argument %qs to %<-Wnormalized%> not recognized)
      |  ^
./options.h:11:2: error: Empty option argument 'Type' during parsing of: Name(diagnostic_color_rule) Type(int)
   11 | #error Empty option argument 'Type' during parsing of: Name(diagnostic_color_rule) Type(int)
      |  ^
./options.h:12:2: error: Empty option argument 'Type' during parsing of: Name(diagnostic_path_format) Type(int)
   12 | #error Empty option argument 'Type' during parsing of: Name(diagnostic_path_format) Type(int)
      |  ^
   17 | #error Empty option argument 'Type' during parsing of: Name(diagnostics_output_format) Type(int)
      |  ^
./options.h:18:2: error: Empty option argument 'Type' during parsing of: Name(dwarf_gnat_encodings) Type(int)
   18 | #error Empty option argument 'Type' during parsing of: Name(dwarf_gnat_encodings) Type(int)
      |  ^
./options.h:19:2: error: Empty option argument 'Type' during parsing of: Name(evrp_mode) Type(enum evrp_mode) UnknownError(unknown evrp mode %qs)
   19 | #error Empty option argument 'Type' during parsing of: Name(evrp_mode) Type(enum evrp_mode) UnknownError(unknown evrp mode %qs)
      |  ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[3]: *** [build/genpreds.o] Error 1
make[2]: *** [all-stage1-gcc] Error 2
make[1]: *** [stage1-bubble] Error 2
make: *** [Makefile:24991: bootstrap] Error 2
### execution of /tmp/fink.VCwhN failed, exit code 2
### execution of /tmp/fink.Buvta failed, exit code 2
<snip>
Package manager version: 0.45.99.git
Distribution version: selfupdate-git Fri May 22 14:49:27 2026, 26.0, x86_64
Trees: local/main stable/main local/injected
Xcode.app: 26.5
Xcode command-line tools: 26.5.0.0.1777544298
Max. Fink build jobs:  1

@iains

iains commented May 27, 2026

Copy link
Copy Markdown

Are you building from upstream - or from my development branches?

Arm64 is not expected to work from upstream - but x86_64 does (although without some of the clang-compatibility changes that are on the development branches).

=====

  • there might be pending updates to GCC-12 for Tahoe (back-ports from later branches).

  • I've received a report just today that there's a new SDK issue in Xcode 26.5 (which I need to look into)

xcode 26.2 has been working fine.

@sth0

sth0 commented May 27, 2026

Copy link
Copy Markdown
Contributor

@iains I am building from upstream master for both systems. I thought I had something local that worked for gcc12 but that was macOS 15 or so.

@iains

iains commented May 27, 2026

Copy link
Copy Markdown

OK. upstream cannot work for arm64 yet (I still need to upstream the devt. patches). Homebrew (cited above) take patch-sets from my devt. branch(es).

However, x86_64 should be OK with upstream - modulo any patches added to later GCC versions for Tahoe (there are def. some because of the change in mapping from darwinXX to macOSYY). I will try to look into what's needed in the next week or so - and also look into the issues with Xcode 26.5

@dmacks

dmacks commented May 27, 2026

Copy link
Copy Markdown
Member

I have gcc-12.5.0 fully built on Tahoe/ARM, using a combination of homebrew patches, upstream patches, and fink packaging controls. But it has an inconsistency about whether it thinks it is "arm64" vs "aarch64".

@iains

iains commented May 27, 2026

Copy link
Copy Markdown

I have gcc-12.5.0 fully built on Tahoe/ARM, using a combination of homebrew patches, upstream patches, and fink packaging controls. But it has an inconsistency about whether it thinks it is "arm64" vs "aarch64".

This was decided by the config. folks before I had any chance to make input (and by that time it was too late to have the option to name triples arm64-apple-darwinNN)

aarch64 is the triple architecture so the configure triples should always look like: aarch64-apple-darwin25 etc.

however, since we need to interact with Apple's tools and LLVM
arm64 is the -arch name (but the GCC driver sets that 'under the hood' you should never need to unless you're invoking the assembler directly.

@dmacks

dmacks commented May 28, 2026

Copy link
Copy Markdown
Member

Here we go: e9682a9

libsanitizer is still disabled on arm, which is the only sandbox I have at the moment., as it already was on our gcc12 packaging. I have no idea if not having that is a blocker, or if it's easily fixable, or if we should just go without it for now to at least get something viable pushed.

Please test on x86_64 and lower OS.

[sorry for the transient ticket closure!]

@dmacks dmacks closed this May 28, 2026
@dmacks dmacks reopened this May 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

arm64 Build issues and fixes for Apple Silicon new package Packages that do not yet exist in Fink.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants