"stdio.h: No such file or directory" despite presence and correct search paths
I'm trying to run a docker build on my M2 Air, first running Ventura, now updated to Sonoma, no difference. I get an error
fatal error: stdio.h: No such file or directory
which I can trace back to
#include <stdio.h>
This is in a .c file compiled using the cc command
cc -v is clang 15.0.0
when I run the command
cc -x c -v -E /dev/null
part of what it returns is
...
clang -cc1 version 15.0.0 (clang-1500.0.40.1) default target arm64-apple-darwin23.1.0
ignoring nonexistent directory "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/local/include"
ignoring nonexistent directory "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/Library/Frameworks"
#include "..." search starts here:
#include <...> search starts here:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/15.0.0/include
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks (framework directory)
End of search list.
...
When I go into the directory here /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include I find the stdio.h header.
I have reinstalled xcode commandlinetools.
I'm stumped, and any help is greatly appreciated. Thanks in advance!
MacBook Air, macOS 13.5