Question about Macports
I just got Macports installed on my mac, of which os version is Snow Leopard (10.6). I used Macports to install several packages through 'sudo port install' command, and all these p开发者_StackOverflow中文版ackages are reported active after the installation. I just wonder that whether these packages are really working? For example, macports tells me that 'gcc44 @4.4.2_0 (active)', however in python it says '[GCC 4.0.1 (Apple Inc. build 5493)] on darwin'.
So I just want to know that if there is some problem with my method of installing or my macports needs some configuration after installation?
Any help is appreciated! I am really new in Mac OS.
I believe Python is declaring the version of gcc used to build it which should be the gcc installed on your Mac i.e. the version that came with the Mac OS Development tools. This should be located in /usr/bin/gcc.
You should find the gcc version matches when you execute
/usr/bin/gcc -v
I do not think anything is wrong with your setup or configuration. It just shows Python was compiled using the gcc provided by Apple
Macports installs software not to conflict with the versions provided by Apple. If they replaced the C compiler and libraries, really bad things might happen when Apple provided operating system updates.
gcc is the command for Apple's version of gcc, at /usr/bin and version 4.0.1 for Leopard.
gcc-mp-4.4 is the command for gcc version 4.4 as provided by MacPorts, located at /opt/local/bin.
Similarly there will be versions of python in /opt/local/bin.
Like houmam, I prefer to explicitly invoke versions by name. If you want to connect particular versions to python, I think that the MacPorts package python_select (this has now been replace by port select python) implements this by using symbolic links. I've never used it.
It probably is just that compiler that was picked by the build was that installed by XCode. You can try typing which gcc to see which one is in your path. The macports one would by default be in /opt/local somewhere.
精彩评论