This post describes how to update your gcc installation to gcc48 on MacOsX.
Short:
sudo port install gcc48 +universal
You can follow the instructions found here to update your installation of gcc. At the time of writing, gcc in version 4.8 is the current (experimental) version.
Be sure to change the default gcc command to the newly installed by issuing
sudo port select --set gcc mp-gcc48
and then, afterwards
Test your gcc installation by issuing
gcc --version
which should give you an output like this.
gcc (MacPorts gcc48 4.8-20130328_0+universal) 4.8.1 20130328 (prerelease)
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.
Your gcc installation on the command line should now be current.
Thanks for this!
ReplyDelete-Matt
Thanks, this worked perfectly. I'm not sure if the +universal option is completely necessary though.
ReplyDeleteIt does seem to be necessary on Mavericks. Otherwise you get errors.
DeleteHow many different things does this install? It got a bunch of differentthings (cctools, perl, etc) and seemed to take up multiple gb of space. Is this normal? I copy and pasted the first command.
ReplyDeleteThanks very much for documenting this. Ideal and exactly what I was after.
ReplyDeleteI am receiving an error when I put the command
ReplyDeletesudo port -v selfupdate
after installing Macport... please help
I am receiving an error when I put the command
ReplyDeletesudo port -v selfupdate
after installing Macport... please help