[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: There can be only one: LAPACK and F2C vs G77 on the Alpha



On Tue, 16 Feb 1999, Barak Pearlmutter wrote:

> There are a few possible fixes.  As a first measure, the Debian Alpha
> team should declare whether f2c/fort77 or g77 is the "official"
> Fortran compiler for the Alpha, and libraries like lapack should
> declare appropriate dependencies to make sure the right one is
> installed, and to give users an extra hint about the matter.

Hmmm...as far as I can say, personally, we're all considering g77 to be
the "official" F77 compiler for Debian Alpha (I wasn't aware that there
was any "official" F77 compilers on any arch, but if I were to pick one to
use, it would be g77).  What kind of hints are needed in this case?

> As a second measure, both fort77 and g77 and "gcc -l f2c" should
> produce executables that dynamically link in an libf2c.so or
> libg2c.so, respectively.

Code generated by g77 is automatically linked to libg2c.a, fyi.
There are command-line options for g77 for providing compatibility for
object files generated by f2c.  You could also add a #include <g2c.h> to 
the source you intend on compiling with g77, which (from what I can gather
from docs) adds in any leftover stuff needed for f2c compatibility. See
g77.info-12 for more info on g77<->f2c compatibility.  The egcs group
renamed their version of libf2c.a to libg2c.a to avoid problems with
linking if both were installed, fyi.

> As a longer-term measure, probably f2c should be modified to use
> 32-bit integers, so that gcc, g77, g++, and f2c/fort77 would share the
> same notion of the default machine integer size.  This would

This is true.  It's probably not a huge modification.  If you'd like, I
can look more into this, although I'm not sure when I'll be able to get to
it (actually, I'm looking at it now and it's not that bad).

> necessitate recompiling lapack, and would also be a good time to split
> f2c up into libf2c, libf2c-dev, and f2c proper.

That's up to the maintainer, but I can see that this probably should
happen.

> ----------------------------------------------------------------
> $ make LDFLAGS='-v -Xlinker --trace'
> cc -v -Xlinker --trace  cntxtica.o normmix-em.o simath1.o matf.o recipies.o dgesvd.o logdetfgh.o read.o -lblas -llapack -lf2c -lm  -o cntxtica
> Reading specs from /usr/lib/gcc-lib/alpha-linux/egcs-2.91.60/specs
> gcc version egcs-2.91.60 Debian 2.1 (egcs-1.1.1 release)
>  /usr/lib/gcc-lib/alpha-linux/egcs-2.91.60/collect2 -m elf64alpha -O1 -dynamic-linker /lib/ld-linux.so.2 -o cntxtica /usr/lib/crt1.o /usr/lib/crti.o /usr/lib/gcc-lib/alpha-linux/egcs-2.91.60/crtbegin.o -L/usr/lib/gcc-lib/alpha-linux/egcs-2.91.60 --trace cntxtica.o normmix-em.o simath1.o matf.o recipies.o dgesvd.o logdetfgh.o read.o -lblas -llapack -lf2c -lm -lgcc -lc -lgcc /usr/lib/gcc-lib/alpha-linux/egcs-2.91.60/crtend.o /usr/lib/crtn.o
> /usr/bin/ld: mode elf64alpha
> /usr/lib/crt1.o
> /usr/lib/crti.o
> /usr/lib/gcc-lib/alpha-linux/egcs-2.91.60/crtbegin.o
> cntxtica.o
> normmix-em.o
> simath1.o
> matf.o
> recipies.o
> dgesvd.o
> logdetfgh.o
> read.o
> -lblas (/usr/bin/../lib/libblas.so)
> -llapack (/usr/bin/../lib/liblapack.so)
> (/usr/bin/../lib/libf2c.a)c_abs.o
> (/usr/bin/../lib/libf2c.a)c_div.o
> (/usr/bin/../lib/libf2c.a)c_exp.o
> (/usr/bin/../lib/libf2c.a)c_sqrt.o
> (/usr/bin/../lib/libf2c.a)cabs.o
> (/usr/bin/../lib/libf2c.a)d_lg10.o
> (/usr/bin/../lib/libf2c.a)pow_dd.o
> (/usr/bin/../lib/libf2c.a)r_lg10.o
> (/usr/bin/../lib/libf2c.a)s_cat.o
> (/usr/bin/../lib/libf2c.a)s_cmp.o
> (/usr/bin/../lib/libf2c.a)s_copy.o
> (/usr/bin/../lib/libf2c.a)s_stop.o
> (/usr/bin/../lib/libf2c.a)sig_die.o
> (/usr/bin/../lib/libf2c.a)z_abs.o
> (/usr/bin/../lib/libf2c.a)z_div.o
> (/usr/bin/../lib/libf2c.a)z_exp.o
> (/usr/bin/../lib/libf2c.a)z_sqrt.o
> (/usr/bin/../lib/libf2c.a)close.o
> (/usr/bin/../lib/libf2c.a)endfile.o
> (/usr/bin/../lib/libf2c.a)err.o
> (/usr/bin/../lib/libf2c.a)fmt.o
> (/usr/bin/../lib/libf2c.a)open.o
> (/usr/bin/../lib/libf2c.a)sfe.o
> (/usr/bin/../lib/libf2c.a)util.o
> (/usr/bin/../lib/libf2c.a)wsfe.o
> (/usr/bin/../lib/libf2c.a)F77_aloc.o
> (/usr/bin/../lib/libf2c.a)exit_.o
> (/usr/bin/../lib/libf2c.a)wrtfmt.o
> (/usr/bin/../lib/libf2c.a)fmtlib.o
> (/usr/bin/../lib/libf2c.a)wref.o
> -lm (/usr/bin/../lib/libm.so)
> /lib/libc.so.6.1
> /usr/lib/gcc-lib/alpha-linux/egcs-2.91.60/crtend.o
> /usr/lib/crtn.o
> 
> $ ldd cntxtica
>         libblas.so.2 => /usr/lib/libblas.so.2 (0x0000020000004000)
>         liblapack.so.2 => /usr/lib/liblapack.so.2 (0x000002000016a000)
>         libm.so.6.1 => /lib/libm.so.6.1 (0x000002000069a000)
>         libc.so.6.1 => /lib/libc.so.6.1 (0x00000200007c6000)
>         /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x0000020001000000)
> 
> 
> --  
> To UNSUBSCRIBE, email to debian-alpha-request@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
> 



Reply to: