checking for gcc

Thomas De Contes d.l.tDeContes at free.fr
Sun Apr 26 07:31:53 PDT 2009


Le 21 mars 09 à 00:52, Ryan Schmidt a écrit :

> On Mar 20, 2009, at 17:53, Thomas De Contes wrote:
>
>> Le 16 mars 09 à 00:05, Ryan Schmidt a écrit :
>>
>>> On Mar 15, 2009, at 17:36, Thomas De Contes wrote:
>>>
>>>> i updade MacPorts, and at the step "port upgrade outdated" it  
>>>> always sets
>>>> checking for gcc... /usr/bin/gcc-4.0
>>>>
>>>> whereas /usr/bin/gcc-4.0 does not exist and /usr/bin/gcc points  
>>>> on gcc-3.3
>>>>
>>>>
>>>> what is the problem ?
>>>
>>> /usr/bin/gcc-4.0 should exist, and /usr/bin/gcc should point to  
>>> it, on Tiger and later.
>>
>> ok
>> if /usr/bin/gcc-4.0 exists but /usr/bin/gcc does not point to it,  
>> it's not right ?
>
> If /usr/bin/gcc-4.0 exists but /usr/bin/gcc points to gcc-3.3 then  
> you have most likely used the gcc_select program to select gcc 3.3.

i think it can happen if i install devtools + gcc-3.3, and then i add  
gcc-4.0
to avoid any pb of this kind, i reinstalled devtools + gcc-4.0 at the  
same time

> This should not affect the majority of ports since MacPorts tells  
> ports to use /usr/bin/gcc-4.0 by default on Tiger and later.

ok :-)

> Specific ports may override this as needed. For example some very  
> old software must compile with gcc-3.3 because gcc-4.0 is too new;  
> in this case, those ports indicate this requirement and MacPorts  
> allows them to use gcc-3.3 instead.

do you think i should keep gcc-3.3 ?
could some recent software depend on some very old software ?



>>> What OS version do you have? What version of Xcode?
>>
>> checking Mac OS X version... 10.4.11
>> checking Xcode version... 2.4.1



>> btw,
>>
>> why does it work fine to build MacPorts itself, with gcc 3.3, and  
>> not to build software ?
>
> Port authors have limited resources with which to test ports.  
> Usually people only have a single Mac, running either Leopard or  
> Tiger, with either an Intel or PowerPC processor. This means most  
> port authors are only testing on 1/4 of the supported systems.  
> Problems can crop up on the remaining 3/4 of the supported systems  
> the author did not test on.
>
> We do not want to increase the testing burden even further by  
> allowing users to compile ports with a different compiler than the  
> one the port author tested with. For this reason, MacPorts  
> instructs ports to ignore what the user has gcc_selected'ed and  
> instead to use a specific compiler on specific OS versions (3.3 on  
> Panther, 4.0 on Tiger and Leopard). Individual ports can override  
> this if it's necessary for those ports, but users are not supposed  
> to override this.

i fully (i think) understand this :-)

and i see 2 options :

1
don't constraint anyone to use /usr/bin/gcc-4.0 and nothing else
of course, you support only /usr/bin/gcc-4.0 and nothing else, and  
port authors don't have any more test to make
just, you don't restrict it "physically" :-)
and you could write a big big warning at time of building MacPorts  
itself

2
once i've understood "the mechanism", i was surprised that building  
MacPorts itself worked fine, without even a warning !
i would expect that MacPorts refuse to build, saying it need /usr/bin/ 
gcc-4.0 (even if it doesn't need it for itself, regarding to the  
default settings for ports)


the 1 is the best from my point of view (it's the most "adaptable"),  
but there is probably a lot of changes to do, for not enough advantages
but i think that the 2 is realist, what do you think about it ? :-)


>> why does it say :
>> checking for gcc... /usr/bin/gcc-4.0
>> checking for C compiler default output... configure: error: C  
>> compiler cannot create executables
>> rather than sth like
>> checking for gcc... /usr/bin/gcc-4.0 not found
>> ?
>
> Here you are asking about the configure script of the port you were  
> trying to install. For questions about why that configure script  
> does what it does, you'll have to ask the authors of that software

ok
well, if building MacPorts itself gives an explicit error enough, not  
worry about building of ports :-)


-- 
Téléassistance / Télémaintenance
http://www.portparallele.com/ThomasDECONTES/



More information about the macports-users mailing list