[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Installing GCC-4.x in userspace / Compiling Octave from CVS
From: |
Sergei Steshenko |
Subject: |
Re: Installing GCC-4.x in userspace / Compiling Octave from CVS |
Date: |
Tue, 2 Oct 2007 15:42:33 -0700 (PDT) |
--- "John W. Eaton" <address@hidden> wrote:
> 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
>
I have never called 'gfortran' explicitly, I called 'make' instead.
I give gcc-4.2.1 libraries first in the search path, so whatever can be taken
from
gcc-4.2.1 libraries is taken.
Probably I'm lucky because I'm using 'math-atlas' (ATLAS), so not much of the
original linear algebra remains.
'octave' built-in tests pass OK - are they insufficient ?
I do not remember exactly, but I think libg2c is needed for the self-test part
of 'lapack'; self-test apparently pass.
Building the whole thing is not that easy, so I need a compelling reason to try
to use "-ff2c" - the reason would be a failing test case.
Regards,
Sergei.
Applications From Scratch: http://appsfromscratch.berlios.de/
____________________________________________________________________________________
Yahoo! oneSearch: Finally, mobile search
that gives answers, not web links.
http://mobile.yahoo.com/mobileweb/onesearch?refer=1ONXIC
- Re: Installing GCC-4.x in userspace / Compiling Octave from CVS, (continued)
- 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, 2007/10/02
- Re: Installing GCC-4.x in userspace / Compiling Octave from CVS,
Sergei Steshenko <=
- 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