macports without the command line tools?

Nathaniel Irons natty at bumppo.net
Sun Nov 25 10:16:46 PST 2012


I'm trying to figure out how to persuade MacPorts to use the toolchain
found under `xcode-select -print-path`. I apologize if this is a FAQ — it's
tricky to search for, and I seem to be swimming upstream.

My work requires that I frequently use Xcode preview builds, so for about
eight months out of the year, I'm juggling Xcodes with
xcode-select. Installing the command line tools package dumps a particular
version of the toolchain into my path, and those hundreds of files can't be
readily uninstalled, except by trawling the receipt.

With MacPorts 2.1.2, with Xcode 4.5.1 installed at /Applications/Xcode.app
and with `xcode-select -print-path` pointed there correctly, installing a
port produces the following:

Warning: The Command Line Tools for Xcode don't appear to be installed;
> most ports will likely fail to build.
> Warning: See http://guide.macports.org/chunked/installing.xcode.html for
> more information.
> Error: Unable to open port: can't read "build.cmd": Failed to locate
> 'make' in path:
> '/opt/local/bin:/opt/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin' or at its
> MacPorts configuration time location, did you move it?
> Error: Unable to execute port: upgrade pkgconfig failed


The linked document just says to install the tools, as does all the copious
advice on this topic that I turned up.

I tried updating the binpath in /opt/local/etc/macports/macports.conf to
include '/Applications/Xcode.app/Contents/Developer/usr/bin', which, when
installing poppler, produced normal-looking output with a lot of the above
warnings in it, until installation of libidn choked:

configure:4372:
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
> -o conftest -O2 -arch x86_64 -I/opt/local/include -L/opt/local/lib -arch
> x86_64 conftest.c  >&5
> conftest.c:11:10: fatal error: 'stdio.h' file not found
> #include <stdio.h>
>          ^
> 1 error generated.


Anything I can do about this, short of installing the tools package?

Thanks,

  -nat
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-users/attachments/20121125/b9692340/attachment.html>


More information about the macports-users mailing list