stupid question

Chris Jones jonesc at hep.phy.cam.ac.uk
Fri Jun 29 15:26:11 UTC 2018



On 29/06/18 16:21, pagani laurent via macports-users wrote:
> Hi,
> 
> I have gcc7.0 installed :
> 
>> sudo port installed gcc7
> The following ports are currently installed:
>    gcc7 @7.3.0_0 (active)
> 
> but I can’t use it under that name. There are several gcc-* files in the /bin
> I figured out that gcc-mp-7 was the one I was looking for but how can I get it to be the default gcc compiler ?
> 
> I tried various sudo port select gcc… but all failed.

port select is the way. It works fine.

Titan ~ > sudo port select gcc
Available versions for gcc:
	mp-gcc7
	none (active)

Titan ~ > which gcc
/usr/bin/gcc

Titan ~ > sudo port select gcc mp-gcc7
Selecting 'mp-gcc7' for 'gcc' succeeded. 'mp-gcc7' is now active.

Titan ~ > which gcc
/opt/local/bin/gcc

Titan ~ > gcc --version
gcc (MacPorts gcc7 7.3.0_1) 7.3.0
Copyright (C) 2017 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.


Please provide details on exactly what you did and exactly how it failed.

Chris

> 
> By the way, I tested the 3 other gcc-*-mp-7 (ranlib, ar, and nm) and all complained :
> 
>> gcc-ranlib-mp-7
> gcc-ranlib-mp-7: Cannot find plugin ‘liblto_plugin.so'
> 
> Does it matter ?
> 
> 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