[SciPy-Dev] OSX build failing at gfortran link

Ralf Gommers ralf.gommers@googlemail....
Tue Oct 12 09:58:37 CDT 2010

Hi Matthew,

On Tue, Oct 12, 2010 at 7:33 AM, Matthew Brett <matthew.brett@gmail.com>wrote:

> 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.
> Thanks for diving in! That works for me, and looks like the right thing to
do. The methods you removed are clearly marked as private in the base class
and not used anywhere else as far as I can tell, but it would be good to get
a confirmation from someone familiar with the history / use cases of
fcompiler that this is fine.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-dev/attachments/20101012/a53efe2e/attachment.html 

More information about the SciPy-Dev mailing list