[SciPy-dev] Re: Possible FreeBSD workaround

Derek Homeier derek at physast.uga.edu
Fri Dec 13 18:50:56 CST 2002


On Wednesday, December 11, 2002, at 02:32 PM, Rob wrote:

> I will try this out later.  Thanks!   Rob.
>
>
> Robert Kern wrote:
>>
>> If I understand the problem correctly, we need a way to replace 'cc'
>> with 'c++' or something similar on some systems. I propose checking 
>> for
>> the environment variable 'CXX' and using its contents to replace the
>> linker when it's defined. To compile on systems where gcc can't be
>> autodetected, simply define CXX appropriately in your shell.
>>
>> A better solution might be to check .pydistutils.cfg for a [weave]
>> section or similar, but that's a little more involved.
>>

For the record, this issue does exist on other platforms as well, and 
I'd also be much in favour of a more generic solution. It's been just 
the same on MacOS X with gcc3, and I wasn't very satisfied with 
creating a workaround like the original solution, which seemed more 
like a hack than like a fix to me! I am not very familiar with the 
python build tools, but I found it rather annoying to force it to use a 
certain linker like this, where any autoconf-based build would easily 
find the right linker or at least look at the value of LDSHARED. So I 
think, checking the value of LDSHARED/CXX is definitely the better 
solution, as Robert wrote, it still gives you flexibility to change 
them on the build commandline.
Part of the problem is of course distutils always use the value of 
LDSHARED configured at build time, so one might argue this should 
better be set to the c++ compiler, but since major distributors like 
Apple, FreeBSD or Fink obviously don't agree with this in their python 
installations, this is probably a moot point to discuss.

Cheers,
							Derek




More information about the Scipy-dev mailing list