[SciPy-user] Install failure of SciPy

Pearu Peterson pearu at cens.ioc.ee
Thu Oct 17 18:36:03 EDT 2002


On Thu, 17 Oct 2002, Jeffrey B. Layton wrote:

> Hello again,
> 
>   Thanks for the quick response in fixing (correct word?)
> SciPy so I could install it. I downloaded the latest source
> (SciPy-0.2.0_alpha_144.4350) and started the build process,
> 
> /usr/bin/python2.2 setup.py install
> 
> It got further than last time. It died looking for a g2c library:
> 
> gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC 
> -I/usr/lib/python2.2/site-packages/f2py2e/src -I/usr/include/python2.2 
> -c build/temp.linux-i686-2.2/fblasmodule.c -o 
> build/temp.linux-i686-2.2/fblasmodule.o -O2 -malign-double 
> -fomit-frame-pointer
> ifc -shared build/temp.linux-i686-2.2/fortranobject.o 
> build/temp.linux-i686-2.2/fblasmodule.o -L/usr/local/lib/atlas 
> -Lbuild/temp.linux-i686-2.2 -Lbuild/temp.linux-i686-2.2 
> -L/home/laytonj/local/gcc-3.1.1/lib/gcc-lib/i686-pc-linux-gnu/3.1.1 
> -lfblas -llapack -lf77blas -lcblas -latlas -lg2c -o 
> build/lib.linux-i686-2.2/scipy/linalg/fblas.so
> ld: cannot find -lg2c
> error: command 'ifc' failed with exit status 1
> 
> 
> I'm not sure what g2c is.

Hmm, normally there should be a file libg2c.a (or libg2c.so or
libg2c-pic.a or ...) in

  /home/laytonj/local/gcc-3.1.1/lib/gcc-lib/i686-pc-linux-gnu/3.1.1

If not, then how did you configure gcc? Right now I suspect broken gcc
installation in your case.

You can also try running the above linking command without -lg2c and
then importing fblas.so to python. If it fails with a message
about missing symbol s_..., then you'll certainly need -lg2c.

>    Also, is there a way to specify the particular gcc to use
> for the build process?

Yes, there are many ways, I guess. I'll give you mine. 
I am using colorgcc that uses configuration file ~/.colorgccrc for getting
full paths to gcc compilers. I have created the following two files (given
with their contents as follows):

~/.colorgccrc-2.95.4
g++: /usr/bin/g++-2.95
gcc: /usr/bin/gcc-2.95
c++: /usr/bin/g++-2.95
cc:  /usr/bin/gcc-2.95

~/.colorgccrc-3.1
g++: /usr/bin/g++-3.1
gcc: /usr/bin/gcc-3.1
c++: /usr/bin/g++-3.1
cc:  /usr/bin/gcc-3.1

Now, when I want to use gcc-3.1, then I'll do

  ln -s ~/.colorgccrc-3.1 ~/.colorgccrc

Otherwise, I'll do
 
  ln -s ~/.colorgccrc-2.95.4 ~/.colorgccrc

This works nicely for me (running on debian), I am not sure if it is
applicable for other systems.

Pearu




More information about the SciPy-User mailing list