Ticket #1343 (new defect)
Opened 3 months ago
ImportError from umath.so on OSX 10.6
| Reported by: | fonnesbeck_chris | Owned by: | somebody |
|---|---|---|---|
| Priority: | high | Milestone: | |
| Component: | Other | Version: | |
| Keywords: | Cc: |
Description
For the past several weeks, I have been unable to build a working version of Numpy from svn checkout on 64-bit Python on OSX 10.6. The build itself is successful, but the resulting package gives an import error:
In [1]: import numpy
Traceback (most recent call last):
File "<ipython console>", line 1, in <module> File "/Library/Python/2.6/site-packages/numpy-1.5.0.dev-py2.6-macosx-10.6-universal.egg/numpy/init.py", line 132, in <module>
import add_newdocs
File "/Library/Python/2.6/site-packages/numpy-1.5.0.dev-py2.6-macosx-10.6-universal.egg/numpy/add_newdocs.py", line 9, in <module>
from numpy.lib import add_newdoc
File "/Library/Python/2.6/site-packages/numpy-1.5.0.dev-py2.6-macosx-10.6-universal.egg/numpy/lib/init.py", line 4, in <module>
from type_check import *
File "/Library/Python/2.6/site-packages/numpy-1.5.0.dev-py2.6-macosx-10.6-universal.egg/numpy/lib/type_check.py", line 8, in <module>
import numpy.core.numeric as _nx
File "/Library/Python/2.6/site-packages/numpy-1.5.0.dev-py2.6-macosx-10.6-universal.egg/numpy/core/init.py", line 6, in <module>
import umath
ImportError?: dlopen(/Library/Python/2.6/site-packages/numpy-1.5.0.dev-py2.6-macosx-10.6-universal.egg/numpy/core/umath.so, 2): Symbol not found: _npy_cexp
Referenced from: /Library/Python/2.6/site-packages/numpy-1.5.0.dev-py2.6-macosx-10.6-universal.egg/numpy/core/umath.so Expected in: flat namespace
in /Library/Python/2.6/site-packages/numpy-1.5.0.dev-py2.6-macosx-10.6-universal.egg/numpy/core/umath.so
This has been occurring since at least rev 7726. Here is my build script:
#!/bin/sh export MACOSX_DEPLOYMENT_TARGET=10.6 export CFLAGS="-arch i386 -arch x86_64" export FFLAGS="-m32 -m64" export LDFLAGS="-Wall -undefined dynamic_lookup -bundle -arch i386 -arch x86_64" export PYTHONPATH="/Library/Python/2.6/site-packages/" python setupegg.py config_fc --fcompiler gfortran config -L/Users/fonnesbeck/Code/libs build bdist_egg
Following a suggestion, I have also tried without setting LDFLAGS, but the same result occurs. Here is the config.h that is generated, if that helps:
