osx - Why Macports does not show the apple xcode compiler through "port select gcc"? -
recently updated mac's xcode , command line tools version 6.4 (i'm running on osx yosemite 10.10.5). after did change, install new package macports, forced run "port selfupdate". however, after did that, broke in system. particularly, usual port select gcc
not display apple compilers installed xcode. displays:
available versions gcc: mp-gcc48 none (active)
i have that, trying solve compilation problem (that's how found out issue), uninstalled 1 or 2 mp-gcc versions. however, remember apple versions should have been listed there.
to make sure apple compilers installed: running command xcode-select --install displays following:
xcode-select: error: command line tools installed, use "software update" install updates
and xcode-select -p displays following:
/applications/xcode.app/contents/developer
so, compilers there. ~/.profile
file contains following line:
macports installer addition on 2013-05-13_at_00:53:37: adding appropriate path variable use macports. export path=/opt/local/bin:/opt/local/sbin:$pat
but, indeed, that's usual change made macports.
does knows happening? need work apple compiler without destroying macports environment.
thanks in advance!
edit: nice answers, indeed none
system's (xcode) installation macport. record, tried select macports gcc , none, see if there broken link , indeed happened:
sudo port select gcc mp-gcc48 selecting 'mp-gcc48' 'gcc' failed: symlink: /opt/local/etc/select/gcc/current -> mp-gcc48: file exists
after manually deleted /opt/local/etc/select/gcc/current
, port select gcc
command worked , setting sudo port select gcc none
worked after that.
the port select gives option select macports compiler command gcc
, or sudo port select gcc none
, uses system compiler.
i.e., option looking called "none". makes sense, since macports cannot know system compiler is, or if 1 installed. may clang or gcc depending on version of xcode. note on newer versions of xcode/osx, there no gcc, clang, , gcc
/g++
links clang
/clang++
.
edit: same available "port groups". example on system following configuration active:
port select --summary name selected options ==== ======== ======= clang none mp-clang-3.7 none cython cython34 cython27 cython34 none db none db46 db48 none gcc none mp-gcc47 mp-gcc49 mp-gcc5 none ipython ipython34 ipython27 ipython34 none llvm none mp-llvm-3.5 mp-llvm-3.7 none mysql none mysql56 none nosetests none nosetests27 nosetests34 none pip pip34 pip34 none python python34 python26-apple python27 python27-apple python34 none python2 python27 python26-apple python27 python27-apple none python3 none python34 none sphinx py34-sphinx py27-sphinx py34-sphinx none wxwidgets none wxwidgets-3.0 none
for instance, if want switch system default python, say
sudo port select python none
and python3 (for there no system default),
sudo port select python3 none
Comments
Post a Comment