[comp.sources.games.bugs] GCC on SCO UNIX was Re: Nethack on SCO UNIX

martin@hppcmart.HP.COM (Martin Croome) (10/01/90)

in article <LIBOVE.90Sep26124607@libove.det.dec.com> libove@libove.det.dec.com (Jay Libove) writes:
>Which compiler are you using? Have you tried the
>other one? I vaguely recall that I compiled it with rcc -UM_UNIX -DM_XENIX.

Firstly, thank you to everyone who has replied. I am using GCC and I'm still 
having the problem. I sucessfully compiled the source I have for MS-DOS (the
overlay version). My only ideas are either a compiler bug or a library bug.

The only problem I came across when compiling the source was a clash with the
obj type in sys/types.h. I commentted this out. Somehow the save file is just
not in the format that the restore expects to find. What am I doing wrong!

Does someone remember the exact sequence of steps they went through to get it
to compile with GCC?

Thanks again for your help.


-------------------------------------------------------------------------------
Martin CROOME                        !'s     - hplabs!hpgnd!hppcmart!martin
Hewlett Packard                      @'s     - martin@hppcmart.grenoble.hp.com
Grenoble Personal Computer Division  HPDesk  - Martin CROOME / HP6300/K1
Technical Mktg - Online Support            or  martin_croome@hp6300.desk.hp.com
-------------------------------------------------------------------------------

seanf@sco.COM (Sean Fagan) (10/02/90)

[Hmm.  7938@scolex.sco.com was probably me, but I don't remember it 8-).]
In article <89@unigold.UUCP> kianusch@unigold.UUCP (Kianusch Sayah Karadji) writes:
>It didn't like the archive it producd for gnulib... 
>I took this part out... but it did't help...

The problem is that the makefile will try to run ranlib on the COFF objects.
Not necessary, and, in fact, ranlib doesn't like it.  Add a '-' to the front
of all of the lines that run ranlib; this will cause it to ignore the errors
(ranlib won't modify the file in any way, so the error is ignorable).

>I think it didn't like the compiler ...
>I'm using (it's the one comming with SCO's develpement kit)

I've had no problems getting gcc working under the SCO devsys.  Sometimes,
it takes a bit of work, though, because of the long macros gcc likes to use.
Generally, most of the problems in that respect were solvable by using rcc
on the offending module, or running the module through a preprocessor
(gcc-cpp, /lib/cpp, or cc -E, depending), and then compiling the output.

If you use rcc, be sure to add '-DM_UNIX -DM_COFF' to the command line; I
would suggest you put this into the things gcc-cpp automatically defines.

-- 
-----------------+
Sean Eric Fagan  | "Never knock on Death's door:  ring the bell and 
seanf@sco.COM    |   run away!  Death really hates that!"
uunet!sco!seanf  |     -- Dr. Mike Stratford (Matt Frewer, "Doctor, Doctor")
(408) 458-1422   | Any opinions expressed are my own, not my employers'.

tim@delluk.uucp (Tim Wright) (10/03/90)

In <6370002@hppcmart.HP.COM> martin@hppcmart.HP.COM (Martin Croome) writes:

>in article <LIBOVE.90Sep26124607@libove.det.dec.com> libove@libove.det.dec.com (Jay Libove) writes:
>>Which compiler are you using? Have you tried the
>>other one? I vaguely recall that I compiled it with rcc -UM_UNIX -DM_XENIX.

>Firstly, thank you to everyone who has replied. I am using GCC and I'm still 
>having the problem. I sucessfully compiled the source I have for MS-DOS (the
>overlay version). My only ideas are either a compiler bug or a library bug.

>The only problem I came across when compiling the source was a clash with the
>obj type in sys/types.h. I commentted this out. Somehow the save file is just
>not in the format that the restore expects to find. What am I doing wrong!

>Does someone remember the exact sequence of steps they went through to get it
>to compile with GCC?

I thought I responded to this one once - did it not get out ??
If you compile nethack3.0 on a 386 with gcc you *MUST* turn off
optimisation on the file containing the save/restore functions. I did
not look into why this is, looks like an obscure gcc bug. I might take
a look if/when I get time !

Tim
--
Tim Wright, Dell Computer Corp. (UK) | Email address
Dell Computer Corp. (UK), Bracknell  | Domain: tim@dell.co.uk
Tel: +44-344-860456                  | Uucp: ...!ukc!delluk!tim
"What's the problem? You've got an IQ of six thousand, haven't you?"

martin@hppcmart.HP.COM (Martin Croome) (10/04/90)

tim@delluk.uucp (Tim Wright) writes...

> In <6370002@hppcmart.HP.COM> martin@hppcmart.HP.COM (Martin Croome) writes:
> 
> >in article <LIBOVE.90Sep26124607@libove.det.dec.com> libove@libove.det.dec.com (Jay Libove) writes:
> >>Which compiler are you using? Have you tried the
> >>other one? I vaguely recall that I compiled it with rcc -UM_UNIX -DM_XENIX.
> 
> >Firstly, thank you to everyone who has replied. I am using GCC and I'm still 
> >having the problem. I sucessfully compiled the source I have for MS-DOS (the
> >overlay version). My only ideas are either a compiler bug or a library bug.
> 
> >The only problem I came across when compiling the source was a clash with the
> >obj type in sys/types.h. I commentted this out. Somehow the save file is just
> >not in the format that the restore expects to find. What am I doing wrong!
> 
> >Does someone remember the exact sequence of steps they went through to get it
> >to compile with GCC?
> 
> I thought I responded to this one once - did it not get out ??
> If you compile nethack3.0 on a 386 with gcc you *MUST* turn off
> optimisation on the file containing the save/restore functions. I did
> not look into why this is, looks like an obscure gcc bug. I might take
> a look if/when I get time !

Sorry Tim, I don't have optimisation switched on at all. I decided that it might
be a problem with that and got rid of it.

> 
> Tim
> --
> Tim Wright, Dell Computer Corp. (UK) | Email address
> Dell Computer Corp. (UK), Bracknell  | Domain: tim@dell.co.uk
> Tel: +44-344-860456                  | Uucp: ...!ukc!delluk!tim
> "What's the problem? You've got an IQ of six thousand, haven't you?"
> ----------

-------------------------------------------------------------------------------
Martin CROOME                        !'s     - hplabs!hpgnd!hppcmart!martin
Hewlett Packard                      @'s     - martin@hppcmart.grenoble.hp.com
Grenoble Personal Computer Division  HPDesk  - Martin CROOME / HP6300/K1
Technical Mktg - Online Support            or  martin_croome@hp6300.desk.hp.com
-------------------------------------------------------------------------------