[SciPy-dev] static builds of scipy

Robert Kern robert.kern at gmail.com
Wed Feb 22 11:34:08 CST 2006


Chris Fonnesbeck wrote:
> On 2/21/06, Robert Kern <robert.kern at gmail.com> wrote:
> 
>>Chris Fonnesbeck wrote:
>>
>>>What is the proper way to build scipy statically? I tried the
>>>following syntax (which works for numpy):
>>>
>>>LDFLAGS=-L/usr/local/lib python setup.py build
>>
>>python setup.py build_ext -L/usr/local/lib build
>>
> 
> 
> Any idea why I might be getting the following error while trying a
> static build (doesnt occur when I do not specify the build_ext
> argument):
> 
> gcc options: '-fno-strict-aliasing -Wno-long-double -no-cpp-precomp
> -mno-fused-madd -fPIC -fno-common -dynamic -DNDEBUG -g -O3 -Wall
> -Wstrict-prototypes'
> compile options: '-DSCIPY_FFTW3_H -I/usr/local/include -Ibuild/src
> -I/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/numpy/core/include
> -I/Library/Frameworks/Python.framework/Versions/2.4/include/python2.4
> -c'
> /usr/local/bin/g77 -undefined dynamic_lookup -bundle
> build/temp.darwin-8.5.0-Power_Macintosh-2.4/build/src/Lib/fftpack/_fftpackmodule.o
> build/temp.darwin-8.5.0-Power_Macintosh-2.4/Lib/fftpack/src/zfft.o
> build/temp.darwin-8.5.0-Power_Macintosh-2.4/Lib/fftpack/src/drfft.o
> build/temp.darwin-8.5.0-Power_Macintosh-2.4/Lib/fftpack/src/zrfft.o
> build/temp.darwin-8.5.0-Power_Macintosh-2.4/Lib/fftpack/src/zfftnd.o
> build/temp.darwin-8.5.0-Power_Macintosh-2.4/build/src/fortranobject.o
> -L/usr/local/lib -L/usr/local/lib/gcc/powerpc-apple-darwin7.9.0/3.4.4
> -L/usr/local/lib -Lbuild/temp.darwin-8.5.0-Power_Macintosh-2.4
> -ldfftpack -lfftw3 -lg2c -lcc_dynamic -o
> build/lib.darwin-8.5.0-Power_Macintosh-2.4/scipy/fftpack/_fftpack.so
> -lSystemStubs
> /usr/bin/ld: can't locate file for: -ldfftpack
> collect2: ld returned 1 exit status

The dependency handling between numpy.distutils commands is not the greatest.
Sometimes you have to specify all of the intermediate commands. For example, all
of my build lines look like this (any other commands being elided by ...):

$ python setup.py ... build_src build_clib build_ext build ...

In particular, you are missing the build_clib command which will build
libdfftpack.a for you.

-- 
Robert Kern
robert.kern at gmail.com

"In the fields of hell where the grass grows high
 Are the graves of dreams allowed to die."
  -- Richard Harter




More information about the Scipy-dev mailing list