Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22261

Compile error with homebrew gcc : unknown type name 'FILE' when including on macOS after update to sdk 15.2

$
0
0

After my recent macOS update (ARM to SDK 15.2) my C code—which previously compiled using Homebrew’s GCC—is now failing to compile. Simply including <stdio.h> produces the following error:

/opt/homebrew/Cellar/gcc/14.2.0_1/bin/gcc-14 -DCTEST_MAIN -isystem/Volumes/fswork/src/athena_core/../../vendor/ctest -isystem/Volumes/fswork/src/athena_core/../../vendor/simde -O3-ffast-math -g -std=gnu99 -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.2.sdk-mmacosx-version-min=14.5 -fdiagnostics-color=always -MD -MT src/athena_core/CMakeFiles/athena_core.dir/threads.c.o -MFsrc/athena_core/CMakeFiles/athena_core.dir/threads.c.o.d -osrc/athena_core/CMakeFiles/athena_core.dir/threads.c.o -c/Volumes/fswork/www/athena/src/athena_core/threads.c In file includedfrom /Volumes/fswork/www/athena/src/athena_core/./include/core.h:9,from /Volumes/fswork/www/athena/src/athena_core/threads.c:2:/opt/homebrew/Cellar/gcc/14.2.0_1/lib/gcc/current/gcc/aarch64-apple-darwin23/14/include-fixed/stdio.h:83:8:error: unknown type name 'FILE' 83 | extern FILE *__stdinp;

I have already reinstalled GCC and upgraded the formula from version 12 to 14, but the problem persists.

Does anyone have any suggestions on how to fix this issue?

I can't switch to clang I really need to use GCC for a linux portability.


Viewing all articles
Browse latest Browse all 22261