Compiler problem.

Booker Bense benseb at nic.cerf.net
Sun Jun 30 04:36:10 AEST 1991


In article <MILLERMA.91Jun27000810 at dino.cpe.ulowell.edu> millerma at dino.cpe.ulowell.edu (Mark Miller) writes:
>In compiling some code, which consists of ~35 seperate modules, with ~45,000
>lines of code on one of our DECstation 3100's, I've come up with the following
>error:
>
>ld:
>eclipse.o: gp relocation out-of-range in .text section for relocation entry 169 for symbol: get_fact_total_age
>eclipse.o: above gp relocation entry for non .sdata or .sbss symbol
>All data will fit into the global pointer area
>Best -G num value to compile all -count'ed objects
>creating pclips with is 2164 (or greater)
>Best -G num value calculation reliable only if all
>-count'ed objects were compiled with -G num greater or
>equal to maximum size of a literal pool item (8).
>make: *** [pclips] Error 1
>
>I've tried changing the -G value, and various other things.  I've used lint
>to try and see if there are any major problems.  This code compiles and runs
>on a Sun and an Apollo.  Noone I've tapped here has any more ideas.  Does 
>anyone out there?  Thanks in advance.
>

-Uhmm, It's been a couple months since I wrestled with this ,
basically what you have to do is turn off the gp allocation when
compiling this your code. As far as I can tell gp allocation is 
some fast memory scheme for allocating common blocks and
external/global variables ( fortran and C words for the same thing).
It forces all kinds of restraints on how you organize your common
blocks and you have to be alot less sloppy in your code ( i.e. common
blocks have to be declared exactly the same everywhere.) This is the
fortran standard I believe , but there is almost no large real code in
the world that lives up to it. I think the option that works for
fortran is :

 -G0 -static


Anyway this solved my problem, now if you ever figuire out how to run
a code this large in the debugger let me know %-)! 

- Booker C. Bense                    
prefered: benseb at grumpy.sdsc.edu	"I think it's GOOD that everyone 
NeXT Mail: benseb at next.sdsc.edu 	   becomes food " - Hobbes



More information about the Comp.unix.ultrix mailing list