Error while compiling...

Posted by Zeno on Wed 01 Jan 2003 11:58 PM — 12 posts, 32,889 views.

USA #0
gcc -c -O -g3 -Wall -Wuninitialized -DSMAUG db.c
db.c: In function `load_resets':
db.c:1594: warning: suggest explicit braces to avoid ambiguous `else'
gcc: Internal error: Terminated (program cc1)
Please submit a full bug report.
See <URL:http://bugzilla.redhat.com/bugzilla/> for instructions.
make[1]: *** [db.o] Error 1
make[1]: Leaving directory `/home/zeno/dist/src'
make: *** [all] Error 2

How would I fix this?
USA #1
submit a full bug report? ;) sorry no clue
Australia Forum Administrator #2
What operating system are you using? What version of gcc? Type:

gcc --version

USA #3
2.96
Australia Forum Administrator #4
And the operating system?
USA #5
Linux, I'm compiling on the shell. (Didn't see you ask the operating system, sorry)
Amended on Thu 02 Jan 2003 11:44 PM by Zeno
Australia Forum Administrator #6
Very strange. gcc doesn't normally crash, although it is possible with badly-formed source. Try getting another db.c from the archive or something. It should compile OK.
USA #7
ok, that was it... Now another error.

act_info.o: In function `do_password':
/home/zeno/dist/src/act_info.c:3474: undefined reference to `crypt'
act_wiz.o: In function `do_form_password':
/home/zeno/dist/src/act_wiz.c:5441: undefined reference to `crypt'
build.o: In function `do_mset':
/home/zeno/dist/src/build.c:1692: undefined reference to `crypt'
comm.o: In function `nanny':
/home/zeno/dist/src/comm.c:1663: undefined reference to `crypt'
/home/zeno/dist/src/comm.c:1750: undefined reference to `crypt'
comm.o:/home/zeno/dist/src/comm.c:1771: more undefined references to `crypt' follow
collect2: ld returned 1 exit status
make[1]: *** [smaug] Error 1
make[1]: Leaving directory `/home/zeno/dist/src'
make: *** [all] Error 2
USA #8
Sounds like you got a bad distribution of SMAUG plain and simple.
USA #9
ok, I got a new copy and got this error-

colorize.c: In function `load_colors':
colorize.c:39: warning: implicit declaration of function `strcpy'
rm -f smaug
gcc -o smaug act_comm.o act_info.o act_move.o act_obj.o act_wiz.o boards.o build.o clans.o comm.o comments.o const.o db.o deity.o fight.o handler.o hashstr.o ibuild.o ident.o interp.o magic.o makeobjs.o mapout.o misc.o mpxset.o mud_comm.o mud_prog.o player.o polymorph.o requests.o reset.o save.o shops.o skills.o special.o tables.o track.o update.o grub.o stat_obj.o ban.o services.o planes.o imm_host.o colorize.o
collect2: ld terminated with signal 15 [Terminated], core dumped
make[1]: *** [smaug] Error 1
make[1]: Leaving directory `/home/zeno/dist/src'
make: *** [all] Error 2

Mainly-
collect2: ld terminated with signal 15 [Terminated], core dumped

ok, I know my Smaug is a good copy. But now I'm getting different errors. This is really odd. I'm getting my smaug from www.smaug.org.
Amended on Fri 03 Jan 2003 10:35 PM by Zeno
Australia Forum Administrator #10
The one you had with the 'crypt' errors - there is a setting in the makefile to stop that.
USA #11
Yeah. That fixed it. lol, sometimes I miss the simplest things.