It seems that Apple keeps on moving their tools around and the old solution of installing the command line tools are with using xcode-select --install
doesn't work.
In Mojave, xcode-select
doesn't install anything anymore (the GUI always fails to find the package) and the command line tools don't install itself in /usr/
or /usr/local
.
xcode-select --install
did work for me in Mojave. Maybe you can try installing XCode from Mac App Store, and then install developer tools?Regarding header locations, I have Apples headers in
/Library/Developer/CommandLineTools/
:And if you install gcc via brew, it will add headers in
/usr/local/
:(Those are not Apple's headers, but GCC / GLIBC).
Using dtruss I can see that Apple clang uses the one in
CommandLineTools/SDKs
: