[SciPy-Dev] Segfaults building against numpy / scipy on OSX Lion

Ralf Gommers ralf.gommers@googlemail....
Thu Jul 19 10:29:21 CDT 2012

On Wed, Jul 18, 2012 at 9:49 PM, Matthew Brett <matthew.brett@gmail.com>wrote:

> Hi,
> Please forgive the half-baked question, but, I'm trying to build our
> package nipy (nipy.org) against stock downloaded
> numpy-1.6.2-py2.7-python.org-macosx10.6.dmg
> scipy-0.10.1-py2.7-python.org-macosx10.6.dmg

You're only building against numpy, and scipy is a runtime dependency,

> I'm using latest XCode 4.3.3
> $ clang --version
> Apple clang version 3.1 (tags/Apple/clang-318.0.61) (based on LLVM 3.1svn)
> Target: x86_64-apple-darwin11.4.0
> Thread model: posix
> on Lion:
> $ uname -a
> Darwin pis-macbook-air 11.4.0 Darwin Kernel Version 11.4.0: Mon Apr  9
> 19:33:05 PDT 2012; root:xnu-1699.26.8~1/RELEASE_I386 i386
> I believe the correct incantation for the build is:
> http://scipy.org/Installing_SciPy/Mac_OS_X
> CC=clang CXX=clang FFLAGS=-ff2c python setup.py build_ext -i

It has been reported to work for scipy, that's as much as I know. You can
try if building scipy in the same way works for you. If it doesn't, the
problem may not be in nipy.

> This does build, but during the tests, and only on this platform,
> segfaults (report attached).
> Is this build / link expected to work?  Did I get the right flags?

Not sure. Some things to check: that you have the 64-bit python from
python.org, that MACOSX_DEPLOYMENT_TARGET is set to 10.6 during the build.

The by far most reliable way to make everything work together is to use the
exact same compiler. Which is not available anymore with the most recent
XCode. You could look into ways to get gcc-4.2 to install on 10.7. And make
sure to build your binaries on 10.6 for 64-bit 2.7 and on 10.5 for the
other Python 2.x flavors if you can.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-dev/attachments/20120719/721593ff/attachment-0001.html 

More information about the SciPy-Dev mailing list