[SciPy-user] Problem building scipy with UMFPACK

Robert Kern robert.kern at gmail.com
Thu Oct 4 14:28:18 EDT 2007


Robin wrote:
> Hi,
> 
> I have succesfully built scipy with ATLAS 3.7.37 and fftw. However when
> I try to include UMFPACK I start to get problems.
> 
> I am using cygwin with gcc 3.4.4 on Windows XP. I managed to get
> everything working so far by adding in flags -mno-cygwin and
> -fno-second-underscore everywhere I could.
> 
> My UFConfig.mk includes the following
> BLAS = -L/cygdrive/c/scipy/libs -llapack -lf77blas -lcblas -latlas -lg2c
> LAPACK = -L/cygdrive/c/scipy/libs -llapack -lf77blas -lcblas -latlas -lg2c
> and UMFPACK builds without error.
> 
> However when I try to build scipy I get the following:
> 
> building 'scipy.linsolve.umfpack.__umfpack' extension
> compiling C sources
> C compiler: gcc -mno-cygwin -O2 -Wall -Wstrict-prototypes
> 
> compile options: '-DSCIPY_UMFPACK_H -DSCIPY_AMD_H
> -DATLAS_INFO="\"?.?.?\"" -Ic:\
> scipy\libs\include\umfpack -Ic:\scipy\libs\include
> -Ic:\Python25\lib\site-packag
> es\numpy\core\include -Ic:\Python25\include -Ic:\Python25\PC -c'
> g++ -mno-cygwin -shared
> build\temp.win32-2.5\Release\build\src.win32-2.5\scipy\l
> insolve\umfpack\_umfpack_wrap.o -Lc:\scipy\libs -Lc:\Python25\libs
> -Lc:\Python25
> \PCBuild -Lbuild\temp.win32-2.5 -lumfpack -lamd -lamd -lg2c -lgcc
> -lumfpack -lg2
> c -lgcc -llapack -lf77blas -lcblas -latlas -lpython25 -lmsvcr71 -o
> build\lib.win
> 32-2.5\scipy\linsolve\umfpack\__umfpack.pyd
> Found executable C:\cygwin\bin\g++.exe
> c:\scipy\libs/libf77blas.a(xerbla.o):xerbla.f: (.text+0xe): undefined
> reference t
> o `_s_wsfe'
> c:\scipy\libs/libf77blas.a(xerbla.o):xerbla.f:(.text+0x29): undefined
> reference
> to `_do_fio'
> c:\scipy\libs/libf77blas.a(xerbla.o):xerbla.f:(.text+0x44): undefined
> reference
> to `_do_fio'
> c:\scipy\libs/libf77blas.a(xerbla.o):xerbla.f:(.text+0x49): undefined
> reference
> to `_e_wsfe'
> c:\scipy\libs/libf77blas.a(xerbla.o):xerbla.f:(.text+0x5d): undefined
> reference
> to `_s_stop'
> collect2: ld returned 1 exit status
> error: Command "g++ -mno-cygwin -shared
> build\temp.win32-2.5\Release\build\src.w
> in32-2.5\scipy\linsolve\umfpack\_umfpack_wrap.o -Lc:\scipy\libs
> -Lc:\Python25\li
> bs -Lc:\Python25\PCBuild -Lbuild\temp.win32- 2.5 -lumfpack -lamd -lamd
> -lg2c -lgc
> c -lumfpack -lg2c -lgcc -llapack -lf77blas -lcblas -latlas -lpython25
> -lmsvcr71
> -o build\lib.win32-2.5\scipy\linsolve\umfpack\__umfpack.pyd" failed with
> exit st
> atus 1
> 
> From searching the internet it seems the undefined references are part
> of the fortran IO library, so I added in g2c and gcc as required
> libraries and copied them to my scipy.libs directory. However as you can
> see the error still occurs... I'm a bit stuck as to what to try next.

The problem is that the -lg2c flag is coming before the -lf77blas flag. The
order of these is important if the libraries depend on each other, like here.
How did you configure the library flags? Did you use a site.cfg file? If so,
please post it, here.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
 that is made terrible by our own mad attempt to interpret it as though it had
 an underlying truth."
  -- Umberto Eco



More information about the SciPy-User mailing list