[SciPy-user] building numpy/scipy on Solaris

David M. Cooke cookedm@physics.mcmaster...
Thu Mar 22 03:41:01 CDT 2007


On Thu, Mar 22, 2007 at 09:31:04AM +0100, raphael langella wrote:
> > > 
> > > I compiled with these options :
> > > python setup.py config_fc --f77flags='-xlic_lib=sunperf -
> > xarch=v9b' install
> > > 
> > > and now, I've got this error when importing numpy :
> > > ImportError: ld.so.1: python: fatal: relocation error: file
> > > /usr/local/lib/python2.3/site-packages/numpy/linalg/lapack_lite.so:
> > > symbol dgeev_: referenced symbol not found
> > 
> > It looks like the C versions of the Fortran routines in sunperf don't
> > have trailing underscores (they're not just the Fortran routine, 
> > they'reC wrappers). Try
> > 
> > CPPFLAGS='-DNO_APPEND_FORTRAN' python setup.py config_fc --
> > f77flags='-xlic_lib=sunperf -xarch=v9b' install
> > 
> > so that lapack_litemodule.c uses dgeev instead of dgeev_.
> 
> Well, now it does uses dgeev, but it's still not found :
> ImportError: ld.so.1: python: fatal: relocation error: file
> /home/user1/ctcils/poladmin/rla/root/lib/python2.3/site-packages/numpy/linalg/lapack_lite.so:
> symbol dgeev: referenced symbol not found
> 
> So, the function is just absent from the library?
> I set BLAS and LAPACK to libsunperf.a. Should I use a dynamic version
> instead?

Ahh, just realized. We can do this completely with the C compiler; the
-xlic_lib=sunperf -xarch=v9b is only being used for Fortran. Try

CFLAGS='-xlic_lib=sunperf -xarch=v9b' CPPFLAGS='-DNO_APPEND_FORTRAN' python setup.py install

Since sunperf has C bindings, we don't need the Fortran compiler at all
for Numpy (and I don't think it was being used in the first place).

-- 
|>|\/|<
/--------------------------------------------------------------------------\
|David M. Cooke                      http://arbutus.physics.mcmaster.ca/dmc/
|cookedm@physics.mcmaster.ca


More information about the SciPy-user mailing list