The you should want to update your MacPorts using the commands:
sudo port selfupdate sudo port upgrade outdated
NOTE: FOR GRAPHLAB, PLEASE USE gcc45 and not gcc46 as in the below
Then you can install gcc using
sudo port install gcc46 #change this to gcc45 for graphlabYou can view other versions of gcc using the command
port search gccAfter installation you can view installed file by
port contents gcc46 #change this to gcc45 for graphlab
Now if you have several gcc versions installed you may want to choose the right version to use.
This is done using the command:
sudo port select gcc mp-gcc46
Now I got some error:
Selecting 'mp-gcc46' for 'gcc' failed: could not create a new link for "/opt/local/bin/gcj'. It seems it is a known issue discussed here.
I applied a quick and dirty fix (Since I don't need gcc Java:)
sudo touch /opt/local/bin/gcj-mp-4.6And then I get:
Selecting 'mp-gcc46' for 'gcc' succeeded. 'mp-gcc46' is now active.