problems downloading clang-34 on PPC MAC

Brandon Allbery allbery.b at gmail.com
Thu Dec 24 06:02:16 PST 2015


On Wed, Dec 23, 2015 at 11:59 PM, John T. Chung <jchung at nyquest.com> wrote:

> However, I don't see a "clang" executable. I only see this in
> /opt/local/bin
>

We support multiple clang versions that can be uinstalled concurrently. If
you want to use this version as clang then you want "port select":

    sudo port select --set clang mp-clang-3.4

(use "port select --list clang" to see what versions are available)

I assumed the compiler would be clang-mp-3.4 but when I attempted to
> compile a "HELLO WORLD" C program, I got this:
>
> Macintosh-2:build jchung$ clang-mp-3.4 test.c
> test.c:2:1: warning: type specifier missing, defaults to 'int'
> [-Wimplicit-int]
> main() {
> ^~~~
> 1 warning generated.
> gcc: error: unrecognized command line option '-arch'
> clang: error: assembler (via gcc) command failed with exit code 1 (use -v
> to see invocation)
>
> why is it still calling "gcc"
>

Because the compiler itself produces assembly language, and the only way it
knows how to run an assembler on your system to convert that to object code
is via Apple's gcc. But it sounds like it's using it incorrectly, or you
have a "gcc" installed somewhere that does not support Apple's additions.

-- 
brandon s allbery kf8nh                               sine nomine associates
allbery.b at gmail.com                                  ballbery at sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-users/attachments/20151224/d11ab53b/attachment.html>


More information about the macports-users mailing list