Here’s another of those “system upgrade moves stuff around” problems. My work iMac seems to be suffering a slow disk failure. It gets slower and slower as it tries to run.
Queue restoring TimeMachine backups onto a new iMac. A lot of stuff just works. But things like building
xsendfile for the Apache development server under Mac ports threw lots of errors. The compiler couldn’t find the headers:
mod_xsendfile.c fatal error: stdio.h: no such file or directory
There are lots of suggestions out there to run
xcode-select --install, but I’d already done that.
Turns out that XCode has stopped storing the SDKs in
/Library/Developer/CommandLineTools/SDKs and moved them to
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs. I spent a bit of time trying to figure out how to pass that path to the Mac Ports version of
apxs2 to use the new include path, but eventualy gave up and just did the hacky thing:
ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs /Library/Developer/CommandLineTools/SDKs
Another issue, just so I rememebr next time, was that the web server and the command line were mysteriously running different versions of PHP. The key, of course, was that I had forgotten to run
port select, e.g., for this project, I needed
port select php php70.