Newsgroups: comp.sys.apollo
Path: utzoo!utgpu!news-server.csri.toronto.edu!helios.physics.utoronto.ca!alchemy.chem.utoronto.ca!mroussel
From: mroussel@alchemy.chem.utoronto.ca (Marc Roussel)
Subject: gprof and f77
Message-ID: <1991Apr1.220030.13259@alchemy.chem.utoronto.ca>
Summary: I can't get them to work together.
Keywords: gprof f77 BSD
Sender: mroussel@alchemy.chem.utoronto.ca (Marc Roussel)
Organization: Department of Chemistry, University of Toronto
Date: Mon, 1 Apr 1991 22:00:30 GMT

I can't seem to get gprof to work with f77 programs.  Here are the
relevant parts of my makefile:

FFLAGS = -g -pg -C $$FLOAT
LDFLAGS = -Y L,$$LIBDIR -lode -lpg -lncarg -lncarg_gks -lncarg_loc -lutchem
siminit.o: siminit.f declare.h common.h
	f77 $(FFLAGS) -c siminit.f
create_consts.o: create_consts.f declare.h common.h
	f77 $(FFLAGS) -c create_consts.f
sim4: sim4.o siminit.o create_consts.o
	f77 -g -pg sim4.o siminit.o create_consts.o -o sim4 $(LDFLAGS)

The program compiles and executes without complaint (and as far as I can
tell, it produces correct results) and leaves a gmon.out file behind.
Unfortunately when I try to run gprof on the result I get the following
error message:

[nllookup] binary search fails???
Segmentation fault

Does anyone have any idea what's causing this?  Is it my fault or is it
just these !@#@!% Apollo's again?  We are running SR10.3.p with the BSD
Unix stuff.  The compiler is rev. 10.8.

				Marc R. Roussel
                                mroussel@alchemy.chem.utoronto.ca
