how to select gcc7

Ken Cunningham ken.cunningham.webuse at gmail.com
Thu Oct 26 02:10:53 UTC 2017


$ port select --list gcc
Available versions for gcc:
	gcc40
	gcc42 (active)
	llvm-gcc42
	mp-gcc5
	mp-gcc6
	mp-gcc7
	none

so

sudo port select gcc mp-gcc7 

should do the trick

On 2017-10-25, at 7:06 PM, pagani laurent via macports-users wrote:

> Hi,
> 
> I have gcc5, gcc6 and gcc7 installed, in particular :
> 
>  gcc7 @7.2.0_0 (active)
> 
> but
> 
>> gcc --version
> gcc (MacPorts gcc5 5.5.0_0) 5.5.0
> 
> I try to select gcc7 but fail (did not find any help on the webpage https://guide.macports.org/#using.port about port select. Is there any ?)
> 
>> sudo port select gcc7 gcc
> Selecting 'gcc' for 'gcc7' failed: The specified group 'gcc7' does not exist.
> 
> I tried the other way round, no better :
> 
>> sudo port select gcc gcc7
> Selecting 'gcc7' for 'gcc' failed: The specified version 'gcc7' is not valid.
> 
> How should I do that ?
> 
> Thanks,
> L.
> 
> "S'il n'y a pas de solution, c'est qu'il n'y a pas de problème" (devise Shadok)
> 



More information about the macports-users mailing list