[SciPy-Dev] OSX build failing at gfortran link

Matthew Brett matthew.brett@gmail....
Mon Oct 11 18:33:09 CDT 2010


Hi Ralf,

>> Looking at numpy/distutils/fcompiler/gnu.py, I see that the function
>> ``_can_target`` cycles through the arch flags seeing whether they (on
>> their own) raise an error when compiling an empty .f file.    I guess
>> the problem here is that, although gfortran will compile a file with
>> '-arch x86_64' - it can't link a python extension with '-arch x86_64'.
>>  Would it make any sense to get the -arch flags somehow from the
>> default C linking flags?  Is that sensible?  Is it easy?
>
> I think it makes sense but I'm not sure it's easy. I'll try to figure that
> out before 1.5.1rc1, if it's not easy then the patch from #1399 should just
> be reverted. Mea culpa again for causing this problem.

I had a go - always unpleasant with distutils.  I think this works:

http://github.com/matthew-brett/numpy/compare/numpy:master...farchs-from-c

At least the standard 'CXX=/usr/bin/g++-4.0 python setup.py install'
routine gave a working scipy passing all tests.

Does it look OK to you?  If so I'll submit a pull request to numpy.

Cheers,

Matthew


More information about the SciPy-Dev mailing list