Skip to content

g++-14 broken with Xcode 16.3 #219174

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
4 tasks done
pfusik opened this issue Apr 10, 2025 · 3 comments
Open
4 tasks done

g++-14 broken with Xcode 16.3 #219174

pfusik opened this issue Apr 10, 2025 · 3 comments

Comments

@pfusik
Copy link

pfusik commented Apr 10, 2025

brew gist-logs <formula> link OR brew config AND brew doctor output

fox@wiesmac ~ % brew config
HOMEBREW_VERSION: 4.4.29-24-ga3d508f
ORIGIN: https://github.com/Homebrew/brew
HEAD: a3d508f3f90bb302c1efd9b36765ae6f34cb3a0c
Last commit: 13 hours ago
Branch: master
Core tap JSON: 10 Apr 08:13 UTC
Core cask tap JSON: 10 Apr 08:13 UTC
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_MAKE_JOBS: 8
HOMEBREW_SORBET_RUNTIME: set
Homebrew Ruby: 3.3.7 => /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.7/bin/ruby
CPU: octa-core 64-bit arm_firestorm_icestorm
Clang: 17.0.0 build 1700
Git: 2.39.5 => /Library/Developer/CommandLineTools/usr/bin/git
Curl: 8.7.1 => /usr/bin/curl
macOS: 15.4-arm64
CLT: 16.3.0.0.1.1742442376
Xcode: 16.3
Rosetta 2: false
fox@wiesmac ~ % brew doctor
Your system is ready to brew.

Verification

  • My brew doctor output says Your system is ready to brew. and am still able to reproduce my issue.
  • I ran brew update and am still able to reproduce my issue.
  • I have resolved all warnings from brew doctor and that did not fix my problem.
  • I searched for recent similar issues at https://github.com/Homebrew/homebrew-core/issues?q=is%3Aissue and found no duplicates.

What were you trying to do (and why)?

g++ seems broken by Xcode 16.3 released last week.

What happened (include all command output)?

fox@wiesmac ~ % cat break.cpp
#include

fox@wiesmac ~ % g++-14 -c break.cpp
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/mach/machine/_structs.h:35,
from /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/arm/_mcontext.h:36,
from /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/machine/_mcontext.h:34,
from /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/sys/signal.h:146,
from /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/sys/wait.h:109,
from /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/_stdlib.h:70,
from /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/stdlib.h:58,
from /opt/homebrew/Cellar/gcc/14.2.0_1/include/c++/14/cstdlib:79,
from break.cpp:1:
/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/mach/arm/_structs.h:627:35: error: expected primary-expression before 'unsigned'
627 | } attribute((aligned(_Alignof(unsigned int))));
| ^~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/mach/arm/_structs.h:627:26: error: '_Alignof' was not declared in this scope
627 | } attribute((aligned(_Alignof(unsigned int))));
| ^~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/mach/arm/_structs.h:633:35: error: expected primary-expression before 'unsigned'
633 | } attribute((aligned(_Alignof(unsigned int))));
| ^~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/mach/arm/_structs.h:633:26: error: '_Alignof' was not declared in this scope
633 | } attribute((aligned(_Alignof(unsigned int))));
| ^~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/mach/arm/_structs.h:639:35: error: expected primary-expression before 'unsigned'
639 | } attribute((aligned(_Alignof(unsigned int))));
| ^~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/mach/arm/_structs.h:639:26: error: '_Alignof' was not declared in this scope
639 | } attribute((aligned(_Alignof(unsigned int))));
| ^~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/mach/arm/_structs.h:645:35: error: expected primary-expression before 'unsigned'
645 | } attribute((aligned(_Alignof(unsigned int))));
| ^~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/mach/arm/_structs.h:645:26: error: '_Alignof' was not declared in this scope
645 | } attribute((aligned(_Alignof(unsigned int))));
| ^~~~~~~~

What did you expect to happen?

Compilation succeeds.

Step-by-step reproduction instructions (by running brew commands)

% cat break.cpp
#include <cstdlib>

% g++-14 -c break.cpp
@Bo98
Copy link
Member

Bo98 commented Apr 10, 2025

This has been fixed but we didn't force an update yet. Try brew reinstall gcc.

@pfusik
Copy link
Author

pfusik commented Apr 10, 2025

It worked, thank you!

@hrishabh314
Copy link

brew reinstall gcc didn't work for me. Uninstalling and installing did.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants