[Numpy-discussion] OS X Lion: llvm: numpy and scipy

Ralf Gommers ralf.gommers@googlemail....
Mon Sep 19 12:05:28 CDT 2011


On Mon, Sep 19, 2011 at 3:03 PM, Samuel John <scipy@samueljohn.de> wrote:

> Ahoy numpy gurus :-)
>
> Would it be possible to adapt the setup.py and/or numpy/distutils to set
> the right variables on Mac OS X 10.7? (see below).
> I have looked a bit into the setup.py and the distutils package of numpy
> but I am a bit lost.
>
> Do you think it's possible to teach numpy to use different CC, CXX?


This is possible, but numpy probably shouldn't mess with these variables. As
a user you can set them permanently by adding them to your bash_profile for
example.

And the FFLAGS


This needs to be solved. Perhaps the solution involves more wrappers for
broken vecLib/Accelerate functions in scipy? Does anyone know which routines
are broken on 10.7? For 10.6 I found this discussion helpful:
http://www.macresearch.org/lapackblas-fortran-106. It is claimed there that
while '-ff2c' fixes complex routines, it breaks SDOT when used with '-m64'.
SDOT is used in linalg.


> and the switch --fcompiler=gnu95 arg?
>

This shouldn't be necessary if you only have gfortran installed.

Ralf


> Building scipy on OS X Lion 10.7.x currently fails because of some llvm
> incompatibilies and the gfortran.
> While it's easy to get gfortran e.g. via http://mxcl.github.com/homebrew/it's hard to `pip install scipy` or manual install because you have to:
>
> > export CC=gcc-4.2
> > export CXX=g++-4.2
> > export FFLAGS=-ff2c
> > python setup.py build --fcompiler=gnu95
>
> This way, numpy and then scipy builds successfully.
> Scipy uses the distutil settings from numpy -- as far as I get it -- and
> therefore scipy cannot add these variables. Right?
>
> It would be great if numpy and scipy would build right out-of-the-box on OS
> X, again.
>
> I'd love to provide a patch but I am lost in the depth of distutils...
>
>
> Samuel
>
>
>
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion@scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20110919/4398a215/attachment.html 


More information about the NumPy-Discussion mailing list