macports and Xcode
Rainer Müller
raimue at macports.org
Sun Oct 12 22:47:21 PDT 2008
Ryan Schmidt wrote:
> On Oct 12, 2008, at 04:01, Emmanuel Hainry wrote:
>> DEBUG: Executing org.macports.configure
>> Error: Target org.macports.configure returned: Invalid value for
>> configure.compiler
>>
>> My way of dealing with that was to modify a few lines in
>> portconfigure.tcl: there's a
>> switch -exact "${os.platform} ${os.major}" {
>> block that sets configure.compiler for the different darwins. I
>> added a
>> line "default" that sets it as gcc, g++, cpp. Not sure if that is the
>> good way to do however.
>
> I have a feeling this is the change that broke that. Do you agree?
>
> http://trac.macports.org/changeset/39573
Yes, seems like I broke it.
My intent was to detect errors like
configure.compiler gcc42
which should have been gcc-4.2 and existed in our tree at that time.
There would be multiple possible solutions:
a) Add a "linux" platform to the default sections
Means selecting a specific gcc version (I wanted to add a
configuration value to macports.conf anyway, would allow to
overwrite it). Would only fix Linux and not other platforms
like *BSD.
b) Fallback to gcc in /usr/bin/gcc
Just assume there is a working gcc in /usr/bin/gcc (respectivley for
the other tools) if there is no default for the current platform
c) Fallback to gcc in PATH
Don't use any hardcoded paths, assume gcc is available somewhere on
this machine and accessible through PATH.
d) Fallback to cc in PATH
Don't assume every machine provides gcc and use cc from PATH
(e.g. *BSD machines with pcc or Solaris with Sun CC).
I am not sure if this option will work well, ports may use gcc
specific options.
I would prefer c), but I am asking to confirm that I will not be
breaking something again :-)
Rainer
More information about the macports-users
mailing list