Re: g77

Morita (morita@tansei.cc.u-tokyo.ac.jp)
Tue, 19 Dec 95 11:49:12 JST


Dear Subir,

I am one of persons who desperately needed to compile g77 on linux-alpha.
To appreciate powerfullness of alpha based computers, it is nice to have
it as scientists highly struggling with computation times who brought up
with Fortran. Actually I tested my home brewed programme written in C
in linux-alpha and checked it ran 0.85 less than the CPU time in C in NT3.5.
I also have DEC Fortran installed in NT3.5 in which the same programme in F77
takes almost twice longer in comparison with that in C in NT3.5. So my
plan is to see how fast g77 and f2c in linux-alpha run my programme.
But it has not materialized. But the following might be useful for your case.

My system is EB64+ and linux-alpha is from BLADE_0.3. What I have done were:

(1) ftp gcc-2.7.0
(2) ftp gcc-2.7.0.diff from grocne.enc.org
(3) make a directory where gcc-2.7.0.diff is patched by typing "patch -p1 -d"
(4) go to the directory and ./configure. But unfortunately at the time,
sed did not work properly as pointed out by Przemek Klosowski <przemek@rrdjazz.nist.gov>
and Torsten Zirzlaff <ZIRZLAFF@pc.inpro.de> who suggested to get new one from
ftp.azstarnet.co. This remedied quite lots and actually all necessary
Makefiles were at hand.
(5) Next,

make -k CC=gcc LANGUAGES=f77n g77 install

gives a bunch of messages, most typical and crucial ones are such as

gcc -DIN_GCC -g -I. -I. -I./config -o g77 ./f/g77.c obstack.o ` case "gcc" in "cc") echo "" ;; esac ` -lbfd
In file included from /usr/include/sys/file.h:6,
from ./f/g77.c:59:
/usr/include/fcntl.h:40: parse error before `mode_t'
make: *** [g77] Error 1
gcc -DIN_GCC -g -I. -I. -I./config \
-DGCC_INCLUDE_DIR=\"/usr/lib/gcc-lib/alpha-dec-linux/2.7.0/include\" \
-DGPLUSPLUS_INCLUDE_DIR=\"/usr/lib/g++-include\" \
-DLOCAL_INCLUDE_DIR=\"/usr/local/include\" \
-DCROSS_INCLUDE_DIR=\"/usr/lib/gcc-lib/alpha-dec-linux/2.7.0/sys-include\" \
-DTOOL_INCLUDE_DIR=\"/usr/alpha-dec-linux/include\" \
-c `echo ./cccp.c | sed 's,^\./,,'`
In file included from cccp.c:67:
/usr/include/sys/stat.h:68: parse error before `mode_t'
/usr/include/sys/stat.h:69: parse error before `mode_t'
/usr/include/sys/stat.h:71: parse error before `mode_t'

And it stopped. And Torsten Zirzlaff <ZIRZLAFF@pc.inpro.de> further suggested me,

Hm, you should made a link /usr/src/linux/include/linux -> /usr/include/linux
and /usr/src/linux/include/asm-alpha -> /usr/include/asm

I don't know if this woud cure you problem, but it might, because BLADE
0.3 didn't made these links, which are sufficient for compiling system
relevant programs like the kernel, gcc and others.

It's only a shot, but I hope this helps.

But I have still not succeeded in compling. I hope someone will lend a hand or two.
Your case with Red Hat 2.1 AXP might be different. In fact, I gathered that they have
f2c and its library in SRPMS directory in ftp.redhat.com. If these cure the problem,
I will comfortably join in Red Hat 2.1 AXP club. Please let me know your story.

Cheers,

Akio Morita, Chemistry Dept, College of Arts and Sciences, The Univ. of Tokyo.