Re:

From: Kevin B. McCarty <kmccarty_at_gmail.com>
Date: Mon, 5 Nov 2007 09:30:37 -0800


On Nov 5, 2007 1:22 PM, <naumov_at_nusun.jinr.ru> wrote:
> Dear rooters,
>
> I try to compile root v5_17.04 with gcc 4.2 and I fail because I miss
> gfortranbegin library:
>
> g++ -m32 -O2 -o bin/g2root main/src/g2root.o \
> -L/cern/pro/lib -L/cern/pro/lib -lpacklib -lkernlib
> -L/usr/local/lib \
> -lshift -lgfortran -lgfortranbegin -lnsl
> /usr/lib/gcc/i486-linux-gnu/3.4.6/../../../../lib/libg2c.so
> -lnsl -lm -ldl -pthread -rdynamic
> /usr/bin/ld: cannot find -lgfortranbegin

> Any hint? Dmitry

Hi Dmitry,

as you are on Debian, it looks like you need (first of all) to have the gfortran-4.2 package installed ... is this the case?

Second, it seems that in Debian's gfortran-4.2 package, the libgfortranbegin.a library is only shipped in

/usr/lib/gcc/i486-linux-gnu/4.2/

not in the usual /usr/lib, so you may also need to add a -L/usr/lib/gcc/i486-linux-gnu/4.2 to the linking line.

You might consider filing a report in the Debian BTS that libgfortranbegin.a is not available in /usr/lib, although I don't know whether or not the gfortran Debian maintainers will consider this a bug.

Third, it looks like perhaps there is a bug in ROOT's linking scripts, considering that both libgfortran and libg2c (the g77 library) are linked in the compile line you quoted above.

Or perhaps this is only temporary until Cernlib in Debian is built with gfortran? If so, (putting on my Debian maintainer hat), I should note there may still be a few weeks before the g77 -> gfortran transition in Debian is completely sorted out. The current hold-up is the transition of LAPACK, BLAS and ATLAS packages; and after that, I need to do some testing to make sure that a gfortran-built Cernlib still works properly. In the meantime, it may be complicated to build programs that depend on FORTRAN in Debian Sid.

best regards,

-- 
Kevin B. McCarty <kmccarty_at_princeton.edu>   Physics Department
WWW: http://www.princeton.edu/~kmccarty/    Princeton University
GPG: public key ID 4F83C751                 Princeton, NJ 08544
Received on Mon Nov 05 2007 - 18:31:08 CET

This archive was generated by hypermail 2.2.0 : Mon Nov 05 2007 - 23:50:02 CET