GCC breaks on Xcode / CLT updates sometimes #6778
Unanswered
scivision
asked this question in
Everyday usage
Replies: 2 comments 1 reply
-
|
Same issue here. The compilation of Dynare with Homebrew fails since upgrading XCode to 26.4: https://git.dynare.org/Dynare/dynare/-/jobs/99661 |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
This appears to be a macOS SDK bug where that header is using Clang isn't affected because it accepts cc @fxcoudert - do we need to get GCC to support this extension? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Output of
brew configOutput of
brew doctorDescription of issue
tl;dr: when a macOS / Xcode / CLT update breaks GCC, should I file a Homebrew issue, or just wait a few weeks for the "gcc" bottle to be rebuilt, setting SDKROOT= in the meantime?
Every several months when Xcode / Command Line Tools updates something internally such as headers (it doesn't happen on every version change of Xcode / CLT) GCC stops being able to compile C++ code due to conflicts with the headers in the standard library - sometimes even just
<iostream>.I am almost always able to workaround this by specifying environment variable SDKROOT to point to the previous SDK. This inability to compile with GCC has just happened again on upgrading to macOS 26.4, Xcode 26.4, CLT 26.4.
The current break occurs for this main.cpp (which header breaks varies with Xcode / CLT release):
Here's the verbose output
Here's what the successful workaround with SDKROOT outputs:
Beta Was this translation helpful? Give feedback.
All reactions