[SciPy-User] Building Scipy for Mac OS X 10.6

Scott Stephens stephens.js@gmail....
Fri Jun 4 07:16:45 CDT 2010


Update: I was able to create a more successful build using the
alternative scons build process with:
LDFLAGS="-arch x86_64" FFLAGS="-arch x86_64" python setupscons.py
scons --silent=1 install

Looks like all of the created files have the right architectures, and
nothing in the unit tests fail because of import errors. I'm still not
getting a flawless scipy.test() run though (6 errors and 1 failure).
I haven't yet had a chance to do a deep dive and figure out what
exactly is failing and if it might be related to build problems.

On Thu, Jun 3, 2010 at 6:25 AM, Scott Stephens <stephens.js@gmail.com> wrote:
> On Thu, Jun 3, 2010 at 1:58 AM, David Cournapeau <cournape@gmail.com> wrote:
>> On Thu, Jun 3, 2010 at 12:00 PM, Scott Stephens <stephens.js@gmail.com> wrote:
>>> I built scipy like this:
>>> FFLAGS="-arch x86_64 -fPIC" LDFLAGS="-Wall -arch x86_64 -undefined
>>> dynamic_lookup" python setup.py build
>>> python setup.py install
>>
>> This comes up often, see here:
>> http://ask.scipy.org/en/topic/34-error-building-scipy-on-mac-os-x:-importerror:-dlopen-no-suitable-image-found#reply-95
>>
>
> I actually knew that the flags were overridden, I included "-fPIC" in
> FFLAGS and "-undefined dynamic_lookup" in LDFLAGS because I saw they
> were in the default build.  I didn't know that problems with that were
> related to the import problem, so thank you for making that connection
> for me.  Does anyone have any suggestions about how exactly my flags
> are wrong, or some method to figure out what's wrong?  I've included
> snippets of the build logs from the original build and from my build
> in case they may be useful.
>
> -----
> From default build:
> -----
> /usr/local/bin/gfortran -Wall -arch ppc -arch i686 -Wall -undefined
> dynamic_lookup -bundle build/temp.m
> acosx-10.6-i386-2.6/build/src.macosx-10.6-i386-2.6/scipy/fftpack/_fftpackmodule.o
> build/temp.macosx-10.6-i386-2.6/scipy/fftpack/src/zfft.o
> build/temp.macosx-10.6-i386-2.6/scipy/fftpack/src/drfft.o
> build/temp.macosx-10.6-i386-2.6/scipy/fftpack/src/zrfft.o
> build/temp.macosx-10.6-i386-2.6/scipy/fftpack/src/zfftnd.o
> build/temp.macosx-10.6-i386-2.6/build/src.macosx-10.6-i386-2.6/fortranobject.o
> -Lbuild/temp.macosx-10.6-i386-2.6 -ldfftpack -lgfortran -o
> build/lib.macosx-10.6-i386-2.6/scipy/fftpack/_fftpack.so
>
> -----
> From my build:
> -----
> /usr/local/bin/gfortran -Wall -Wall -arch x86_64 -undefined
> dynamic_lookup build/temp.macosx-10.6-i386-2.6/build/src.macosx-10.6-i386-2.6/scipy/fftpack/_fftpackmodule.o
> build/temp.macosx-10.6-i386-2.6/scipy/fftpack/src/zfft.o
> build/temp.macosx-10.6-i386-2.6/scipy/fftpack/src/drfft.o
> build/temp.macosx-10.6-i386-2.6/scipy/fftpack/src/zrfft.o
> build/temp.macosx-10.6-i386-2.6/scipy/fftpack/src/zfftnd.o
> build/temp.macosx-10.6-i386-2.6/build/src.macosx-10.6-i386-2.6/fortranobject.o
> -L/usr/local/lib/gcc/i686-apple-darwin8/4.2.3/x86_64
> -Lbuild/temp.macosx-10.6-i386-2.6 -ldfftpack -lgfortran -o
> build/lib.macosx-10.6-i386-2.6/scipy/fftpack/_fftpack.so
>
> -----
> From default build:
> -----
> building 'dfftpack' library
> compiling Fortran sources
> Fortran f77 compiler: /usr/local/bin/gfortran -Wall -ffixed-form
> -fno-second-underscore -arch ppc -arch i686 -fPIC -O3 -funroll-loops
> Fortran f90 compiler: /usr/local/bin/gfortran -Wall
> -fno-second-underscore -arch ppc -arch i686 -fPIC -O3 -funroll-loops
> Fortran fix compiler: /usr/local/bin/gfortran -Wall -ffixed-form
> -fno-second-underscore -Wall -fno-second-underscore -arch ppc -arch
> i686 -fPIC -O3 -funroll-loops
>
> -----
> From my build:
> -----
> building 'dfftpack' library
> compiling Fortran sources
> Fortran f77 compiler: /usr/local/bin/gfortran -Wall -ffixed-form
> -fno-second-underscore -arch x86_64 -fPIC -O3 -funroll-loops
> Fortran f90 compiler: /usr/local/bin/gfortran -Wall
> -fno-second-underscore -arch x86_64 -fPIC -O3 -funroll-loops
> Fortran fix compiler: /usr/local/bin/gfortran -Wall -ffixed-form
> -fno-second-underscore -Wall -fno-second-underscore -arch x86_64 -fPIC
> -O3 -funroll-loops
>
> ------
> From default build:
> -----
> building 'scipy.fftpack._fftpack' extension
> compiling C sources
> C compiler: gcc -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g
> -fwrapv -O3 -Wall -Wstrict-prototypes
>
> creating build/temp.macosx-10.6-i386-2.6/build
> creating build/temp.macosx-10.6-i386-2.6/build/src.macosx-10.6-i386-2.6
> creating build/temp.macosx-10.6-i386-2.6/build/src.macosx-10.6-i386-2.6/scipy
> creating build/temp.macosx-10.6-i386-2.6/build/src.macosx-10.6-i386-2.6/scipy/fftpack
> compile options: '-Ibuild/src.macosx-10.6-i386-2.6
> -I/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/core/include
> -I/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6
> -c'
> gcc: scipy/fftpack/src/zfft.c
> gcc: scipy/fftpack/src/drfft.c
> gcc: scipy/fftpack/src/zrfft.c
> gcc: scipy/fftpack/src/zfftnd.c
> gcc: build/src.macosx-10.6-i386-2.6/fortranobject.c
> gcc: build/src.macosx-10.6-i386-2.6/scipy/fftpack/_fftpackmodule.c
> /usr/local/bin/gfortran -Wall -arch ppc -arch i686 -Wall -undefined
> dynamic_lookup -bundle
> build/temp.macosx-10.6-i386-2.6/build/src.macosx-10.6-i386-2.6/scipy/fftpack/_fftpackmodule.o
> build/temp.macosx-10.6-i386-2.6/scipy/fftpack/src/zfft.o
> build/temp.macosx-10.6-i386-2.6/scipy/fftpack/src/drfft.o
> build/temp.macosx-10.6-i386-2.6/scipy/fftpack/src/zrfft.o
> build/temp.macosx-10.6-i386-2.6/scipy/fftpack/src/zfftnd.o
> build/temp.macosx-10.6-i386-2.6/build/src.macosx-10.6-i386-2.6/fortranobject.o
> -Lbuild/temp.macosx-10.6-i386-2.6 -ldfftpack -lgfortran -o
> build/lib.macosx-10.6-i386-2.6/scipy/fftpack/_fftpack.so
>
> -----
> From my build:
> -----
> building 'scipy.fftpack._fftpack' extension
> compiling C sources
> C compiler: gcc -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g
> -fwrapv -O3 -Wall -Wstrict-prototypes
>
> creating build/temp.macosx-10.6-i386-2.6/build
> creating build/temp.macosx-10.6-i386-2.6/build/src.macosx-10.6-i386-2.6
> creating build/temp.macosx-10.6-i386-2.6/build/src.macosx-10.6-i386-2.6/scipy
> creating build/temp.macosx-10.6-i386-2.6/build/src.macosx-10.6-i386-2.6/scipy/fftpack
> compile options: '-Ibuild/src.macosx-10.6-i386-2.6
> -I/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/core/include
> -I/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6
> -c'
> gcc: scipy/fftpack/src/zfft.c
> gcc: scipy/fftpack/src/drfft.c
> gcc: scipy/fftpack/src/zrfft.c
> gcc: scipy/fftpack/src/zfftnd.c
> gcc: build/src.macosx-10.6-i386-2.6/fortranobject.c
> gcc: build/src.macosx-10.6-i386-2.6/scipy/fftpack/_fftpackmodule.c
> /usr/local/bin/gfortran -Wall -Wall -arch x86_64 -undefined
> dynamic_lookup build/temp.macosx-10.6-i386-2.6/build/src.macosx-10.6-i386-2.6/scipy/fftpack/_fftpackmodule.o
> build/temp.macosx-10.6-i386-2.6/scipy/fftpack/src/zfft.o
> build/temp.macosx-10.6-i386-2.6/scipy/fftpack/src/drfft.o
> build/temp.macosx-10.6-i386-2.6/scipy/fftpack/src/zrfft.o
> build/temp.macosx-10.6-i386-2.6/scipy/fftpack/src/zfftnd.o
> build/temp.macosx-10.6-i386-2.6/build/src.macosx-10.6-i386-2.6/fortranobject.o
> -L/usr/local/lib/gcc/i686-apple-darwin8/4.2.3/x86_64
> -Lbuild/temp.macosx-10.6-i386-2.6 -ldfftpack -lgfortran -o
> build/lib.macosx-10.6-i386-2.6/scipy/fftpack/_fftpack.so
>
> It looks to me like all of the flags are the same except for the
> architecture related ones.  Ideas anyone?
>
> Thanks,
>
> Scott
>


More information about the SciPy-User mailing list