Wed, 11 Nov 2015

Mac Ports and X-Code Command-line tools

— SjG @ 1:59 pm

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:
xcode-select --install
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 ''.

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/ 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!

Leave a Reply

Your email address will not be published.