[SciPy-Dev] Mountain Lion Scipy-dev build fails (Ralf Gommers)
Wed Aug 15 16:30:38 CDT 2012
Thanks Ralf and Aron!
Homebrews default is: Python is compiled with clang. I have not run into problems so far. I wonder what the problems were, Aaron A. had with clang.
I even have prepared a numpy and scipy formula (homebrew speak for install script) that builds with clang (and gfortran-4.7). It's not in the main repository, yet.
Builds without problems.
However, you can `brew install python --use-llvm` which is a bad name for "please use llvm-gcc instead of clang" and that adds the "-msse4" flag, depending on the cpu type.
Aaron Andalman has done this, otherwise clang would have been used, with the flag `-march=native` in CFLAGS and CXXFLAGS.
Python's distutils remembers the build-time flags. This is how they end up being re-used for scipy. Very hard to fix (speak remove) things from there later on.
Distutils you damn bastard! Hoping for distutils2 :-)
I got the feeling that llvm-gcc (4.2) is a dead-end since Apple is not updating it to be compatible with newer gcc versions. Clang is developing fast. Getting numpy/scipy to work nicely with clang is IMHO the way to go.
On 15.08.2012, at 08:37, Ralf Gommers <email@example.com> wrote:
> On Tue, Aug 14, 2012 at 11:56 PM, Aron Ahmadia <firstname.lastname@example.org> wrote:
> I'm not sure how much you enjoy reading Ruby, but here are the details on where things are happening in brew.
> Here's the Python formula for actually downloading/configuring/building (no flags added here): https://github.com/mxcl/homebrew/blob/master/Library/Formula/python.rb
> Compiler flags are picked up here: https://github.com/mxcl/homebrew/blob/master/Library/Homebrew/extend/ENV.rb
> Thanks Aron. Ruby reads pretty much like Python, with a few : and => mixed in, so no problem.
> So they do add all possible sse flags, like:
> def gcc
> set_cpu_cflags 'core2 -msse4', :penryn => 'core2 -msse4.1'
> If you do a regular Framework build with configure/make steps, this doesn't happen (I think). So the question is what to do now. Perhaps this can be fixed in scipy, does anyone know? And are other projects using distutils likely affected by this? If so, it should be fixed in Homebrew anyway.
> SciPy-Dev mailing list
More information about the SciPy-Dev