problem compiling PyLapack

Nick Potter Nick.Potter at maths.anu.edu.au
Wed Aug 22 06:49:28 CEST 2001


Greetings all.

I have downloaded Konrad Hinsen's PyLapack module and have, for the
past couple of days, been trying to install this modules, and have
been having many problems.

For the record, I have:
Solaris OS version 5.8
python 2.1
and I think gcc version 2.95.2

First of all, when I run python setup.py gcc can't find arrayobject.h
so I append the line -I/usr/local/include/python2.1/Numeric, which is
the directory containing arrayobject.h, to the INCLUDEPY variable in
Makefile.
OK... so far so good.

Next when I run make, the compilation spits out hundreds of lines
like:
>Text relocation remains                       referenced
>     against symbol                  offset    in file
> GPC.dcabs1EQUIV1_0                  0x0       /opt/lib/libblas.a(dcabs1.o)
> GPC.dcabs1EQUIV1_0                  0x4       /opt/lib/libblas.a(dcabs1.o)
>   <snip....>
> 
>   etc etc...
> 
>   <snip....>
> __do_f_out_nv                       0x5c      /opt/lib/libblas.a(xerbla.o)
> __e_wsfe                            0x64      /opt/lib/libblas.a(xerbla.o)
> __s_stop                            0x74      /opt/lib/libblas.a(xerbla.o)

so I have located this problem in various places on the web, and am
pretty sure that I need to change the LDSHARED line in the Makefile
from $(CC) -shared to something else.  Now I have tried
1. $(CC) -G
2. /usr/ccs/bin/ld -G
and many other different permutations and combinations for the
LDSHARED variable in the makefile, but all to no avail.  I have also
tried adding -Xlinker -export-dynamic as in the Python FAQ but this
doesn't seem to be working either.
The problem is I get implicit function declarations while gcc is
compiling the .c files, and then ImportErrors after I've installed the
.so files into site-packages/ directory, namely errors like:

> ImportError: ld.so.1: python: fatal: relocation error: file 
> /opt/lib/python2.1/site-packages/PyLapack/cblas.so: symbol caxpy: referenced
> symbol not found

I have also tried the above with and without -DNO_APPEND_FORTRAN, and
the __hack__.c file.

Please somebody help because this is driving me nuts.

Thanks
Nick



More information about the Python-list mailing list