[SciPy-user] error linking to libg2c on 64-bit machine
Pearu Peterson
pearu at scipy.org
Mon Nov 15 13:33:56 EST 2004
On Mon, 15 Nov 2004, Giovanni Samaey wrote:
>>
>> After you'll update scipy_core from CVS, try the following site.cfg:
>>
>> [atlas]
>> libraries = g2c
>> library_dirs = /apps/prod/local64/lib64/
>
> I am terribly sorry, but this doesn't help...
Hey, don't worry, we are close:)
> I was able to get the install script to find these directories, because I get
>
> Setting PTATLAS=ATLAS
> FOUND:
> libraries = ['ptf77blas', 'ptcblas', 'atlas', 'g2c']
> library_dirs = ['/data/home/giovanni/ATLAS/Linux_HAMMER64SSE2_2/lib',
> '/apps/prod/local64/lib64/']
> language = c
> include_dirs = ['/data/home/giovanni/ATLAS/Linux_HAMMER64SSE2_2/include']
>
> which clearly shows my lib64 directory.
>
> However, the fatal command still reads:
>
> /usr/bin/g77 -shared
> build/temp.linux-x86_64-2.3/Lib/interpolate/_fitpackmodule.o
> -Lbuild/temp.linux-x86_64-2.3 -lfitpack -lg2c -o
> build/lib.linux-x86_64-2.3/scipy/interpolate/_fitpack.so
> /usr/bin/ld: /usr/lib/gcc-lib/i486-linux/3.3.2/64/libg2c.a(lread.o):
> relocation R_X86_64_32 can not be used when making a shared object; recompile
> with -fPIC
> /usr/lib/gcc-lib/i486-linux/3.3.2/64/libg2c.a: could not read symbols: Bad
> value
> collect2: ld returned 1 exit status
> /usr/bin/ld: /usr/lib/gcc-lib/i486-linux/3.3.2/64/libg2c.a(lread.o):
> relocation R_X86_64_32 can not be used when making a shared object; recompile
> with -fPIC
> /usr/lib/gcc-lib/i486-linux/3.3.2/64/libg2c.a: could not read symbols: Bad
> value
> collect2: ld returned 1 exit status
> error: Command "/usr/bin/g77 -shared
> build/temp.linux-x86_64-2.3/Lib/interpolate/_fitpackmodule.o
> -Lbuild/temp.linux-x86_64-2.3 -lfitpack -lg2c -o
> build/lib.linux-x86_64-2.3/scipy/interpolate/_fitpack.so" failed with exit
> status 1
This error comes from linking extension module that does not use atlas.
So, the atlas section in site.cfg is not effective here. However,
cd Lib/linalg
python setup_linalg.py build
should work (provided that site.cfg is installed in right place).
So, to fix the g2c library path also for _fitpack, use the following
section in site.cfg (you can remove the corresponding bits in [atlas]):
[numpy]
libraries = g2c
library_dirs = /apps/prod/local64/lib64/
I haven't check but all extension modules in scipy should use numeric. If
not then linkige should fail at some point but lets deal with that later
on..
Pearu
More information about the SciPy-User
mailing list