[SciPy-user] Building SciPy on OS X: Universal binary issues

Josh Marshall josh.p.marshall at gmail.com
Thu Dec 7 16:38:11 CST 2006


I've been running for a while with older versions of numpy and scipy,  
but I now need to provide a Universal Binary version of my app for  
distribution. I'm running a G4 with 10.4.8.

I have installed the universal versions of Python, Numpy, SciPy,  
matplotlib, etc from http://pythonmac.org/packages/py24-fat/

I get an error when importing scipy, as follows:

ImportError: Failure linking new module: /Library/Frameworks/ 
Python.framework/Versions/2.4/lib/python2.4/site-packages/scipy/ 
special/_cephes.so: Symbol not found: _printf$LDBLStub
   Referenced from: /Library/Frameworks/Python.framework/Versions/2.4/ 
lib/python2.4/site-packages/scipy/special/_cephes.so
   Expected in: dynamic lookup

My understanding is that this is a common error when a package is  
built with GCC 4, but this shouldn't crop up in a downloadable package.

Where are instructions for building SciPy as a universal binary?  
Obviously it is being done, but I would like to know how to do it  
myself. The wiki would be a good spot for this to go.


As a second issue, running the following command:
for FILE in `find . | grep "\.so"` ; do file $FILE ; done
(which gives the architecture for all the dynamic libraries)
shows that only a few of the libraries are Universal. The output is  
attached below.

./cluster/_vq.so: Mach-O fat file with 2 architectures
./cluster/_vq.so (for architecture ppc):        Mach-O bundle ppc
./cluster/_vq.so (for architecture i386):       Mach-O bundle i386
./fftpack/_fftpack.so: Mach-O bundle ppc
./fftpack/convolve.so: Mach-O bundle ppc
./integrate/_odepack.so: Mach-O bundle ppc
./integrate/_quadpack.so: Mach-O bundle ppc
./integrate/vode.so: Mach-O bundle ppc
./interpolate/_fitpack.so: Mach-O bundle ppc
./interpolate/dfitpack.so: Mach-O bundle ppc
./io/numpyio.so: Mach-O fat file with 2 architectures
./io/numpyio.so (for architecture ppc): Mach-O bundle ppc
./io/numpyio.so (for architecture i386):        Mach-O bundle i386
./lib/blas/cblas.so: Mach-O fat file with 2 architectures
./lib/blas/cblas.so (for architecture ppc):     Mach-O bundle ppc
./lib/blas/cblas.so (for architecture i386):    Mach-O bundle i386
./lib/blas/fblas.so: Mach-O bundle ppc
./lib/lapack/atlas_version.so: Mach-O fat file with 2 architectures
./lib/lapack/atlas_version.so (for architecture ppc):   Mach-O bundle  
ppc
./lib/lapack/atlas_version.so (for architecture i386):  Mach-O bundle  
i386
./lib/lapack/calc_lwork.so: Mach-O bundle ppc
./lib/lapack/clapack.so: Mach-O fat file with 2 architectures
./lib/lapack/clapack.so (for architecture ppc): Mach-O bundle ppc
./lib/lapack/clapack.so (for architecture i386):        Mach-O bundle  
i386
./lib/lapack/flapack.so: Mach-O fat file with 2 architectures
./lib/lapack/flapack.so (for architecture i386):        Mach-O bundle  
i386
./lib/lapack/flapack.so (for architecture ppc): Mach-O bundle ppc
./linalg/_flinalg.so: Mach-O bundle ppc
./linalg/_iterative.so: Mach-O bundle ppc
./linalg/atlas_version.so: Mach-O fat file with 2 architectures
./linalg/atlas_version.so (for architecture ppc):       Mach-O bundle  
ppc
./linalg/atlas_version.so (for architecture i386):      Mach-O bundle  
i386
./linalg/calc_lwork.so: Mach-O bundle ppc
./linalg/cblas.so: Mach-O fat file with 2 architectures
./linalg/cblas.so (for architecture ppc):       Mach-O bundle ppc
./linalg/cblas.so (for architecture i386):      Mach-O bundle i386
./linalg/clapack.so: Mach-O fat file with 2 architectures
./linalg/clapack.so (for architecture ppc):     Mach-O bundle ppc
./linalg/clapack.so (for architecture i386):    Mach-O bundle i386
./linalg/fblas.so: Mach-O bundle ppc
./linalg/flapack.so: Mach-O bundle ppc
./linsolve/_csuperlu.so: Mach-O fat file with 2 architectures
./linsolve/_csuperlu.so (for architecture ppc): Mach-O bundle ppc
./linsolve/_csuperlu.so (for architecture i386):        Mach-O bundle  
i386
./linsolve/_dsuperlu.so: Mach-O fat file with 2 architectures
./linsolve/_dsuperlu.so (for architecture ppc): Mach-O bundle ppc
./linsolve/_dsuperlu.so (for architecture i386):        Mach-O bundle  
i386
./linsolve/_ssuperlu.so: Mach-O fat file with 2 architectures
./linsolve/_ssuperlu.so (for architecture ppc): Mach-O bundle ppc
./linsolve/_ssuperlu.so (for architecture i386):        Mach-O bundle  
i386
./linsolve/_zsuperlu.so: Mach-O fat file with 2 architectures
./linsolve/_zsuperlu.so (for architecture ppc): Mach-O bundle ppc
./linsolve/_zsuperlu.so (for architecture i386):        Mach-O bundle  
i386
./ndimage/_nd_image.so: Mach-O fat file with 2 architectures
./ndimage/_nd_image.so (for architecture ppc):  Mach-O bundle ppc
./ndimage/_nd_image.so (for architecture i386): Mach-O bundle i386
./optimize/_cobyla.so: Mach-O bundle ppc
./optimize/_lbfgsb.so: Mach-O bundle ppc
./optimize/_minpack.so: Mach-O bundle ppc
./optimize/_zeros.so: Mach-O fat file with 2 architectures
./optimize/_zeros.so (for architecture ppc):    Mach-O bundle ppc
./optimize/_zeros.so (for architecture i386):   Mach-O bundle i386
./optimize/minpack2.so: Mach-O bundle ppc
./optimize/moduleTNC.so: Mach-O fat file with 2 architectures
./optimize/moduleTNC.so (for architecture ppc): Mach-O bundle ppc
./optimize/moduleTNC.so (for architecture i386):        Mach-O bundle  
i386
./signal/sigtools.so: Mach-O fat file with 2 architectures
./signal/sigtools.so (for architecture ppc):    Mach-O bundle ppc
./signal/sigtools.so (for architecture i386):   Mach-O bundle i386
./signal/spline.so: Mach-O fat file with 2 architectures
./signal/spline.so (for architecture ppc):      Mach-O bundle ppc
./signal/spline.so (for architecture i386):     Mach-O bundle i386
./sparse/sparsetools.so: Mach-O bundle ppc
./special/_cephes.so: Mach-O bundle ppc
./special/specfun.so: Mach-O bundle ppc
./stats/futil.so: Mach-O bundle ppc
./stats/mvn.so: Mach-O bundle ppc
./stats/statlib.so: Mach-O bundle ppc
./weave/examples/fibonacci_ext.so: ELF 32-bit LSB shared object,  
Intel 80386, version 1 (SYSV), not stripped
./weave/examples/ramp_ext.so: ELF 32-bit LSB shared object, Intel  
80386, version 1 (SYSV), not stripped


More information about the SciPy-user mailing list