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

Giovanni Samaey giovanni.samaey at cs.kuleuven.ac.be
Mon Nov 15 14:37:48 EST 2004


OK.  We are really approaching the end now.
Fitpack got compiled!

The next error is due to x11 not being correctly pointed to.
In site.cfg I put 
[x11]
library_dirs = /apps/prod/xlib64

but this doesn't do enough.
I avoided this so far by ignoring the packages xplt,gplt,plt and gui_thread.
But this is not sufficient, since I get the following error.

building 'scipy_base.display_test' extension
compiling C sources
gcc options: '-pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall
-Wstrict-prototypes -fPIC'
compile options: '-DHAVE_X11 -I/usr/X11R6/include
-I/data/home/giovanni/include/python2.3 -c'
gcc -pthread -shared
build/temp.linux-x86_64-2.3/scipy_core/scipy_base/src/display_test.o
-L/usr/X11R6/lib -Lbuild/temp.linux-x86_64-2.3 -lX11 -o
build/lib.linux-x86_64-2.3/scipy_base/display_test.so
/usr/bin/ld: skipping incompatible /usr/X11R6/lib/libX11.so when searching
for -lX11
/usr/bin/ld: skipping incompatible /usr/X11R6/lib/libX11.a when searching
for -lX11
/usr/bin/ld: cannot find -lX11
collect2: ld returned 1 exit status
/usr/bin/ld: skipping incompatible /usr/X11R6/lib/libX11.so when searching
for -lX11
/usr/bin/ld: skipping incompatible /usr/X11R6/lib/libX11.a when searching
for -lX11
/usr/bin/ld: cannot find -lX11
collect2: ld returned 1 exit status

Anyway, we are promised x-forwarding, so at some point this has to be fixed
anyway, even if we can avoid building this now.

All help so far has been great; now we just need to work through the last
bite here...

Giovanni


> -----Original Message-----
> From: scipy-user-bounces at scipy.net [mailto:scipy-user-bounces at scipy.net]
> On Behalf Of Pearu Peterson
> Sent: maandag 15 november 2004 19:34
> To: SciPy Users List
> Subject: Re: [SciPy-user] error linking to libg2c on 64-bit machine
> 
> 
> 
> 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
> 
> _______________________________________________
> SciPy-user mailing list
> SciPy-user at scipy.net
> http://www.scipy.net/mailman/listinfo/scipy-user




More information about the SciPy-User mailing list