[SciPy-user] error linking to libg2c on 64-bit machine

Giovanni Samaey Giovanni.Samaey at cs.kuleuven.ac.be
Mon Nov 15 10:50:09 CST 2004


>
> 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...
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

You'll see that the -lg2c is still interpreted by ld as pointing to the 
"standard" directory.
Changing -lg2c to an explicit -L/path/to/libg2c.so worked. (As was 
indicated earlier in this thread.)

Giovanni



More information about the SciPy-user mailing list