problems with f77

utzoo!decvax!ucbvax!dist2 utzoo!decvax!ucbvax!dist2
Sun Sep 27 03:53:00 AEST 1981


	From: dsp.dove at MIT-SPEECH at MIT-AI
	Is anyone using the f77?  I got it to compile one module, but one guy
	here is getting compiler error and another can't find f_inits() so his
	program won't load??? (help!)

The problem is that the libraries libF77.a, libI77.a, and libU77.a were
not included in the distribution tape.  This has now been fixed and
they are included in all tapes made after 9/28/81.

	It appears that f77 is failing to do a mem allocation, and
	calling an error routine with "out of mem"  unfortunately it
	appears that the error routine is expecting an int!  I hope
	this thing isn't really running out of memory.

The confusion here is understandable.  The error routine is invoked as

	error("out of memory",0,0,FATAL);

whereas the error routine appears (in part) as

	error(index,t,u,type)
	int index;
	char *t, *u;
	register int type;
	{
		char buf[100];
		long lseek();

		if (efil < 0) {
			efil = open(efilname, 0);
			if (efil < 0) {
	oops:
				perror(efilname);
				exit(1);
			}
		}
		if (lseek(efil, (long) index, 0) < 0 || read(efil, buf, 100) <= 0)
			goto oops;
		...
	}

The point is that all calls to ``error'' are preprocessed by mkstr(1)
which changes the string constants into seek offsets into a strings
file.  This can be seen in the f77 makefile (shown in part below)

	.c.o:	$*.s
	#	Remove error strings to save space - SRS 5-1-81
		mkstr - f77_strings xx $*.c
		${CC} -S ${CFLAGS} xx$*.c
		...

The bad news is that f77 builds quite large objects and will run out of
memory on large (more than about 1000 lines on separate i/d machines)
programs.

			Carl



More information about the Comp.bugs.2bsd mailing list