fixing libc5-based compiler
Hi All,
I am attempting to get an old (circa 1996) Absoft F77/F90 compiler running
under Debian Woody/Sid. I have installed the libc5, xlib6 and alt-gcc
packages. The Absoft f77 compiler runs, as does the Motif front-end to the
debugger; so I think the run-time aspect of things is working fine.
My problem is that attempts to generate binaries from Absoft f77 fail.
My first attempts resulted in:
$ f77 test.f
FORTRAN 77 Compiler 4.4, Copyright (c) 1987-1997, Absoft Corp.
/usr/lib/libfio.a(lowlevel.o): In function `_temp_file':
lowlevel.o(.text+0x10): the use of `tempnam' is dangerous, better use `mkstemp'
/usr/lib/libfio.a(lowlevel.o): In function `_getfile':
lowlevel.o(.text+0x128): undefined reference to `_fxstat'
/usr/lib/libfio.a(lowlevel.o): In function `_file_exists':
lowlevel.o(.text+0x1d4): undefined reference to `_xstat'
/usr/lib/libfio.a(lowlevel.o): In function `_charspecial':
lowlevel.o(.text+0x5d4): undefined reference to `_fxstat'
/usr/lib/libfio.a(lowlevel.o): In function `_f_file_size':
lowlevel.o(.text+0x644): undefined reference to `_fxstat'
collect2: ld returned 1 exit status
OK, I thought, we're probably mixing glibc and libc5 libraries. Running in
verbose mode yields the additional info:
$ f77 -v test.f
f77fe -v -N20 test.f
FORTRAN 77 Compiler 4.4, Copyright (c) 1987-1997, Absoft Corp.
test.f:
Parsing TEST : 10
Generating Intermediate Code : 10
ibe -o test.s -N31 < test.int
as -o test.o test.s
cc test.o -lfio -lf77math -lc
followed by the earlier 'In function ...' messages.
So, ultimately it is calling gcc to link the objects into a binary and it
seems likely that gcc-2.95.4 is not the right choice for the job.
If I prepend to my path /usr/i486-linuxlibc1/bin to pick up the alternate
gcc-2.7.2.3, the error becomes:
ld: cannot open crt1.o: No such file or directory
At this point I am thinking that perhaps there is another package that
supplies an appropriate C runtime for the old libc5 binaries. However,
I have been unsuccessful in tracking down such a beast. The altgcc
(gcc-2.7.2.3) supplied files include crtbegin.o, crtend.o, but no crt1.o
(found in /usr/lib/gcc-lib/i486-linuxlibc1/2.7.2.3).
Does anybody know what I am doing wrong? Is there an alternate binutils
as well that I haven't found? Do I need to play some games with ld.so.conf
or LD_LIBRARY_PATH?
Since I prompted this upgrade to Debian Woody, I would like to restore
this compiler back to a working state. (I presume that an upgrade to Redhat
7.x would have encountered similar compatibility issues.)
--
Steve Butterworth | Sometimes a man who deserves to be looked
Stirling 356, Queen's University | down upon because he is a fool is despised
533-6000 ext 77754 | only because he is a lawyer. -- Montesquieu
Reply to: