Mac – Is it enough to install Xcode

macportsxcode

I use OS X El Capitan. I installed Xcode 7 from AppStore and macports from an official website.

When I'm trying to install something using macports: sudo port install nodejs4, I'm getting the following warning: Warning: The Xcode Command Line Tools don't appear to be installed; most ports will likely fail to build.. But compiler (cc) works, make works, and I actually installed few macports packages without any problems.

Now if I run xcode-select --install, I'm getting dialog to install Developer Tools. But I think that Xcode already has all those tools:

$ xcode-select -p
/Applications/Xcode.app/Contents/Developer

So the question is: is it some bug in macports or is there some tools not included with Xcode 7 which must be installed separately using xcode-select --install? I don't want to introduce unnecessary clutter.

Best Answer

So I've inspected macports sources and it turns out that this warning is displayed, when directory /usr/include or executable /usr/bin/make is missing. While I have working /usr/bin/make, directory /usr/include was indeed missing. Installing command-line tools using xcode-select --install fixed it.