[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Installing GCC-4.x in userspace / Compiling Octave from CVS
From: |
John W. Eaton |
Subject: |
Re: Installing GCC-4.x in userspace / Compiling Octave from CVS |
Date: |
Tue, 2 Oct 2007 16:56:23 -0400 |
On 2-Oct-2007, Sergei Steshenko wrote:
| And that was my point, and this is how I built it, but you will still need
"-l g2c"
| and for that something like
|
| LOADOPTS = -L /maxtor5/sergei/AppsFromScratchWD/install/gcc-4.2.1/lib -L
|
/maxtor5/sergei/AppsFromScratchWD/install/gcc-4.2.1/libexec/gcc/i686-pc-linux-gnu/4.2.1
-L
| /maxtor5/sergei/AppsFromScratchWD/install/gcc-3.4.6/lib -lgfortran -l g2c#
|
| - like I posted.
|
| I.e. build everything using gcc-4.2.1, but where needed, give linker libg2c
from gcc-3.4.6
I don't see how this can be the right solution. You should not need
-lg2c if you are compiling with gfortran, and in fact, if some code
you are linking with requires -lg2c, then it means you are mixing g77
and gfortran compiled code, which the gfortran manual now warns
against because of differences in calling conventions. So if you are
doing this, then you should probably be using -ff2c to force gfortran
to use the g77/f2c calling conventions.
FWIW, I just tried building the latest blas and lapack sources from
netlib and all I had to do was
tar zxf blas.tgz
tar zxf lapack-3.1.1.tgz
cd BLAS
gfortran -c -O2 *.f
ar rcv ../lapack-3.1.1/blas_LINUX.a *.o
cd ../lapack-3.1.1
cp INSTALL/make.inc.gfortran make.inc
make
There doesn't seem to be any need to have -lg2c here.
Note also that if you compile the Fortran bits of Octave with gfortran
and you use an optimized BLAS/LAPACK library, you need to be sure that
the Fortran interface to your optimized BLAS/LAPACK library is
compatible with the new gfortran calling conventions, or you need to
use the -ff2c option for gfortran when you compile the Fortran bits of
Octave.
jwe
- Re: Installing GCC-4.x in userspace / Compiling Octave from CVS, (continued)
- Re: Installing GCC-4.x in userspace / Compiling Octave from CVS, John W. Eaton, 2007/10/01
- Re: Installing GCC-4.x in userspace / Compiling Octave from CVS, Sergei Steshenko, 2007/10/01
- Re: Installing GCC-4.x in userspace / Compiling Octave from CVS, John W. Eaton, 2007/10/01
- Re: Installing GCC-4.x in userspace / Compiling Octave from CVS, Sergei Steshenko, 2007/10/01
- Re: Installing GCC-4.x in userspace / Compiling Octave from CVS, John W. Eaton, 2007/10/01
- Re: Installing GCC-4.x in userspace / Compiling Octave from CVS, Sergei Steshenko, 2007/10/01
- Re: Installing GCC-4.x in userspace / Compiling Octave from CVS, John W. Eaton, 2007/10/01
- Re: Installing GCC-4.x in userspace / Compiling Octave from CVS, Sergei Steshenko, 2007/10/01
- Re: Installing GCC-4.x in userspace / Compiling Octave from CVS, Muthiah Annamalai, 2007/10/01
- Re: Installing GCC-4.x in userspace / Compiling Octave from CVS, Sergei Steshenko, 2007/10/02
- Re: Installing GCC-4.x in userspace / Compiling Octave from CVS,
John W. Eaton <=
- Re: Installing GCC-4.x in userspace / Compiling Octave from CVS, Sergei Steshenko, 2007/10/02
- Re: Installing GCC-4.x in userspace / Compiling Octave from CVS, Sergei Steshenko, 2007/10/01
Re: Installing GCC-4.x in userspace / Compiling Octave from CVS, Muthiah Annamalai, 2007/10/08