[comp.sys.amiga] Amiga NetHack 3p7 lev_lex.c compile problem

news@bmers58.UUCP (news) (02/28/90)

I am trying to build NetHack 3.0 Patch level 7 on my amiga.
I am running into a problem with lev_lex.c. Unfortunately,
this is a difficult one to trace down because the line reference
is meaningless and I am not familiar with LEX.

The message is:

-------------------------------------------------------------------------------
Lattice LMK 1.07	Copyright ...
lc -dLEV_LEX_C -b0 -cfi -d1 -iIncl: -ma -oO_Others:lev_lex.o Others:lev_lex.c
Lattice AmigaDOS C Compiler, Version 5.04
Copyright....

Compiling Others:lev_lex.c
"lev_comp.l" ... warning which can be fixed by manually inserting a cast...
    {                                                       <<<<<<<<
"lev_comp.l" 318 Error 72: external item attribute mismatch <<<<<<<<

Total files:1, Compiled OK: 0, Failed to compile: 1
-------------------------------------------------------------------------------

Pointers would be most appreciated.

Keith Hanlan
Bell-Northern Research, Ottawa, Canada 613-765-4645
uunet!bnrgate!atreus!keithh or (via bitnet) keithh@bnr.ca
"You're making me feel wierd Adrian" Jack Carney to Adrian LeDuc, Apartment Zero

keni@dtix.dt.navy.mil (Lorber) (03/01/90)

In article <1609@bmers58.UUCP> (Keith Hanlan) writes:
>I am trying to build NetHack 3.0 Patch level 7 on my amiga.
>I am running into a problem with lev_lex.c. Unfortunately,
>this is a difficult one to trace down because the line reference
>is meaningless and I am not familiar with LEX.
>
From Install.ami ( SECTION III - Lattice Compilation Instructions ):

    Due to a problem with version 5.04, you must make one change:  edit the
    file Others:lev_lex.c.  At (or near) line 1002 is the definition for the
    function yyunput.  Delete the word "register" from this line.  Note that
    if you neglect to do this, you will get an Error 72 at line 318 of file
    lev_comp.l (this is the correct message - lev_lex.c is flex output).  Save
    the changed file.  Later compiler versions may or may not need this fix.

Please note that this applies ONLY to Lattice (Manx has it's own directions
in Install.ami) and that it is necessary to read ALL of Install.ami as well
as the general README and UNIX Install files to get a good grip on this
program.

Send mail or post if there are still problems.

Ken Lorber
keni@dtix.dt.navy.mil

keithh@atreus.uucp (Keith Hanlan) (03/01/90)

Ooops! Apologies for my earlier plaintive wail. And to think of all
the times I've wanted to whack people on the head and scream R T F M!

The solution to my problem, of course, is spelled out explicitly in
Install.ami:
	Remove the "register" keyword from line ~1002 in others/lev_lex.c.

Thank you Bryan Bayerdorffer and Stellan Klebom for your notes - not 
even a slap on the wrist - what patience!

In the future, I'll try not to undertake similar tasks in the 
middle of the night.

Thanks again everybody,
Keith Hanlan
Bell-Northern Research, Ottawa, Canada 613-765-4645
uunet!bnrgate!atreus!keithh or (via bitnet) keithh@bnr.ca
"You're making me feel wierd Adrian" Jack Carney to Adrian LeDuc, Apartment Zero