jeudi 12 mars 2015

which gcc am I using?


I am attempting to compile a package on my Mac laptop and my Mac Mini desktop. It compiles successfully on the laptop, but not the mini (gives the following error: gcc: error: unrecognized command line option '-Xarch_x86_64'). Both machines are running OS X Yosemite (10.10.2). On both machines, when I type



which gcc


I get:



gcc: aliased to nocorrect gcc



(I don't know what this means) When I type



echo $PATH


I get:



/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin



This makes me think that if a gcc is found in /usr/local/bin, that's the one that will be my gcc. When I type



ls -l /usr/local/bin/gcc


I get:



/usr/local/bin/gcc -> /usr/local/bin/gcc-4.8



on both machines. However, when I type



gcc --version


on the Mini I get:



gcc (Homebrew gcc48 4.8.4) 4.8.4


Copyright (C) 2013 Free Software Foundation, Inc.


This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.



and on the laptop I get:



Configured with: --prefix=/Applications/http://ift.tt/1d5DwEL --with-gxx-include-dir=/usr/include/c++/4.2.1


Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn)


Target: x86_64-apple-darwin14.1.0


Thread model: posix



Which is the version installed by XCode. (This is what I get on both machines from /usr/bin/gcc --version)


How is the laptop using gcc 4.2 when the first gcc in my path is a symlink to gcc 4.8, and how do I make the mini do the same?




Aucun commentaire:

Enregistrer un commentaire