[Numpy-discussion] building 64bit
Sat Apr 18 18:40:05 CDT 2009
I'm trying to build scipy 64bit binaries. I'm on OS10.5.6, and using
python2.6 built as 64bit universal from macports.
When I run:
python2.6 setup.py install
the build doesn't fail along the way.
However, when I then go into python and try something, e.g. "from scipy
import linalg", I get the error:
Python 2.6.2 (r262:71600, Apr 18 2009, 15:53:12)
[GCC 4.0.1 (Apple Inc. build 5490)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from scipy import linalg
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
line 8, in <module>
from basic import *
line 17, in <module>
from lapack import get_lapack_funcs
line 17, in <module>
from scipy.linalg import flapack
2): no suitable image found. Did find:
no matching architecture in universal wrapper
Evidently flapack.so has not been build as a 64bit. Why is this, and how
do I solve it?
-----Below are some more details from my own investigation of the problem,
for those interested in helping:
If I run
this yields the output:
Mach-O universal binary with 2 architectures
(for architecture ppc7400): Mach-O bundle ppc
(for architecture i386): Mach-O bundle i386
So obviously it really isn't built right.
Now, I think I see when this is happening. If I look back at the output
during the building of scipy, I see commands like:
usr/local/bin/gfortran -Wall -arch ppc -arch i686 -Wall -undefined
-Lbuild/temp.macosx-10.5-universal-2.6 -lgfortran -o
e.g. the fortran compiler is not being given the flag -arch x86_64 (though
reading the output shows that the C compiler IS.)
Morevoer, if I do:
python2.6 setup.py config_fc --help-fcompiler
then the output is:
archiver = ['/usr/local/bin/gfortran', '-cr']
compile_switch = '-c'
compiler_f77 = ['/usr/local/bin/gfortran', '-Wall', '-ffixed-form', '-
fno-second-underscore', '-arch', 'ppc', '-arch', 'i686',
-fPIC', '-O3', '-funroll-loops']
compiler_f90 = ['/usr/local/bin/gfortran', '-Wall', '-fno-second-
underscore', '-arch', 'ppc', '-arch', 'i686', '-fPIC',
compiler_fix = ['/usr/local/bin/gfortran', '-Wall', '-ffixed-form', '-
'-arch', 'ppc', '-arch', 'i686', '-fPIC', '-O3',
So I have three questions:
A) is this lack of proper flag to the fortran compiler the reason my flapack
is not being build properly?
B) If so, how do I change the compiler options to the fortran compiler when
I run setup.py?
C) If not, what is the reason, and what do I do about it?
Thanks for reading this long thing ,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Numpy-discussion