I was setting up a new Mac with Mac Ports… and ran into a weird problem.
First, installed Xcode from the App store. Took a long time, but was done. I mistakenly thought it had installed the command-line tools, because now I could run commands like “svn” from the command line. The Department of Tautologies reminds you that some command-line tools are command-line tools, and others are not.
So I tracked down my build problem to the fact that command-line tools were not installed. Following every guide everywhere, I typed:
But instead of the expected glorious dialog box and installation, I got the virtually-un-Googlable error:
xcode-select: error: no developer tools were found, and no install could be requested (perhaps no UI present), please install manually from 'developer.apple.com'.
To make a long story short, the problem was that I ran the xcode-select as root. Eventually, I found that running it as an ordinary user worked as expected.
After that, command-line tools are properly installed, and ports work as God intended them to.
There are a lot of deceptive distractions out there.
Typing, for example, xcode-select -p returns the correct /Applications/Xcode.app/Contents/Developer path that you’d expect.
Similarly, the error in the port build was that the directory /usr/include does not exist.
Don’t be deceived. These are lies!