Using gcc/gfortran 4.8 in MacPorts

Gustavo Seabra gustavo.seabra at
Mon Dec 9 06:30:31 PST 2013

Hi all,

Please forgive-me the ignorance if this seems to simple a question.

I installed gcc4.8 from MacPorts, and now I want to use its compilers,
especially gfortran. However, although they are in the path, their names
are different, such as "gfortran-mp-4.8", such as they are not seen when
the command "gfortran" is issued.

I tried to see what is working and got:

$ port select --list gcc

Available versions for gcc:


none (active)

however, for gfortran:

$ port select --list gfortran

Warning: Unable to get active selected version: The specified group
'gfortran' does not exist.

Error: The 'list' command failed: The specified group 'gfortran' does not

I tried to activate the MacPorts gcc set by:

$ sudo port select --set gcc mp-gcc48


Selecting 'mp-gcc48' for 'gcc' succeeded. 'mp-gcc48' is now active.

And now the correct gcc is working:

$ which gcc


however, still nothing is set for gfortran:

$ which gfotran

(returns nothing)

So, my question is this: how should I activate the whole gcc48 set?
Especially, I need to use gcc/gfortran.

BTW, shouldn't this be activated by default when I install gcc48?

Gustavo Seabra <>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the macports-users mailing list