compiling Problem

Posted by Straud on Wed 18 Jul 2001 07:45 PM — 18 posts, 65,527 views.

#0
okay I have tried and tried to compile the server (smaug 1.4a) so I can use IMC but keep getting these errors I'm using cygwin



33 c:/smaug/source/webserver.c
sys\socket.h: No such file or directory
35 c:/smaug/source/webserver.c
sys\un.h: No such file or directory
25 c:/smaug/source/act_info.c
c:\smaug\source\mud.h:28: undefined or invalid # directive
29 mud.h
undefined or invalid # directive
2841 mud.h
field `total_time' has incomplete type
2842 mud.h
field `min_time' has incomplete type
2843 mud.h
field `max_time' has incomplete type
5392 mud.h
parse error before `HANDLE'
5396 mud.h
parse error before `}'
5399 mud.h
parse error before `*'
5400 mud.h
parse error before `*'
5401 mud.h
parse error before `*'
5416 mud.h
parse error before `/'
2047 c:/smaug/source/act_info.c
`NULL_FILE' undeclared (first use in this function)
2047 c:/smaug/source/act_info.c
(Each undeclared identifier is reported only once
2047 c:/smaug/source/act_info.c
for each function it appears in.)
25 c:/smaug/source/act_move.c
c:\smaug\source\mud.h:28: undefined or invalid # directive
29 mud.h
undefined or invalid # directive
2841 mud.h
field `total_time' has incomplete type
2842 mud.h
field `min_time' has incomplete type
2843 mud.h
field `max_time' has incomplete type
5392 mud.h
parse error before `HANDLE'
5392 mud.h
parse error before `HANDLE'
5399 mud.h
parse error before `*'
5400 mud.h
parse error before `*'
5401 mud.h
parse error before `*'
5416 mud.h
parse error before `/'
22 c:/smaug/source/act_obj.c
c:\smaug\source\mud.h:28: undefined or invalid # directive
29 mud.h
undefined or invalid # directive
2841 mud.h
field `total_time' has incomplete type
2842 mud.h
field `min_time' has incomplete type
Australia Forum Administrator #1
You have done something strange here. I got the IMC stuff to compile by editing Makefile and modifying the lines it mentions:


#Uncomment the next three comments below if you want to use IMC
USE_IMC    = -DUSE_IMC

IMC_OFILES = imc.o imc-mail.o imc-interp.o imc-util.o imc-config.o \
        imc-events.o imc-version.o imc-mercbase.o ice.o icec.o icec-mercbase.o

IMC_CFILES = imc.c imc-mail.c imc-interp.c imc-util.c imc-config.c \
        imc-events.c imc-version.c imc-mercbase.c ice.c icec.c icec-mercbase.c



I actually had to remove 5 comments (it was 3 sets of lines).

I also had to add "-DSMAUG14" to C_FLAGS to remove one compile error I got...



C_FLAGS = $(OPT_FLAG) -O -g3 -Wall -Wuninitialized $(PROF) $(NOCRYPT) $(DBUGFLG)
 -DSMAUG $(SOLARIS_FLAG) $(TIME) $(REG) -DSMAUG14
#2
okay I got it to compile but now when i run the server I get this message after it says making wizlist


0 [main] smaug 616753 open_stackdumpfile: Dumping stack trace to SMAUG.EXE .stackdump
segmentation fault (core dumped)
Amended on Fri 20 Jul 2001 09:24 PM by Straud
#3
okay also whenever I compile right at the end when it makes the executable it says this

chmod g+w smaug
chmod: changing permissions of 'smuag': No such file or directory
make[1]:*** [smaug] Error 1
make[1]: Leaving directory '/usr/smaug2/smaug/src'
make[all]: Error 2

Australia Forum Administrator #4
Hmm - I did not have a problem running that version. This is what I saw ...


Sat Jul 21 11:33:56 2001 :: Loading races
Sat Jul 21 11:33:56 2001 :: Loading herb table
Sat Jul 21 11:33:56 2001 :: Loading tongues
Sat Jul 21 11:33:56 2001 :: Making wizlist
Sat Jul 21 11:33:56 2001 :: Initializing request pipe
Sat Jul 21 11:33:56 2001 :: Initializing random number generator
Sat Jul 21 11:33:56 2001 :: Setting time and weather
Sat Jul 21 11:33:56 2001 :: Assigning gsn's
Sat Jul 21 11:33:56 2001 :: Reading in area files...
(help.are)
(imc-help.are)
(ice-help.are)
gods.are : Rooms: 1200 - 1201 Objs: 1200 - 1200 Mobs: 1200 - 1200
limbo.are : Rooms: 1 - 43 Objs: 2 - 99 Mobs: 1 - 99
newacad.are : Rooms: 10300 - 10499 Objs: 10300 - 10499 Mobs: 10300 - 10499
newgate.are : Rooms: 100 - 199 Objs: 100 - 199 Mobs: 100 - 199
newdark.are : Rooms: 21000 - 21499 Objs: 21000 - 21435 Mobs: 21000 - 21499

[snip]

Sat Jul 21 11:33:56 2001 :: Loading Colors
Sat Jul 21 11:33:56 2001 :: Initializing socket
Sat Jul 21 11:33:56 2001 :: imc: imc2-1.03g hub initializing
Sat Jul 21 11:33:56 2001 :: imc: Logging On
Sat Jul 21 11:33:56 2001 :: imc: hubswitch yes|no
Sat Jul 21 11:33:56 2001 :: imc: imc_readignores: couldn't open imc/rignores
Sat Jul 21 11:33:56 2001 :: imc: network initializing
Sat Jul 21 11:33:56 2001 :: imc: binding port 4005 for incoming connections
Sat Jul 21 11:33:56 2001 :: imc: Setting auto-optimize to run in 6 minutes.
Sat Jul 21 11:33:56 2001 :: imc: ICE client starting.
Sat Jul 21 11:33:56 2001 :: imc: Can't open imc/icec


If you are using the same source as me I'm not sure what the problem is. You could make sure you have the latest Cygwin.

You could try running under gdb to see what the problem is, eg.


gdb ../src/smaug.exe


As for the error during the make, that is a minor problem with the makefile, that doesn't seem to matter. It should read:


chmod g+w smaug.exe


You can change the makefile to make that message go away.



#5
okay I tried it using gdb and got this


unable to read instructions at 0x61004ee7


before I got that a window popped up saying

program received signal sigsegv segmentation fault
#6
okay I ditched what i had and downlaoded the code from your site and got the same thing
#7
okay using gbd and using the next button I can get down to line 281 boot_db() but when I try to go to the next line 282 is when I get the error above line 282 is as follows
log_string("Initializing Socket")
Australia Forum Administrator #8
Something must have gone wrong inside boot_db - I suggest you use "step" which will step into the function, instead of "next".
#9
okay nick i got this from an E-mail from nivek and it worked i didn't even think of looking here for the problem
turns out I didn't have the gods directory and I had to take test deity out of the deity list file
#10
okay now that it's running I checked to see if IMC works and it doesn't i uncommented the lines you said before I compiled and it didn't work
Australia Forum Administrator #11
I've never used IMC so I don't know how to get it to work. Maybe someone else does. :)
Australia #12
gah i now this probaly sounds stupid but i go to compile the smaug code and then i go to run it and this is what i get

0 [main] smaug 616753 open_stackdumpfile: Dumping stack trace to SMAUG.EXE .stackdump
segmentation fault (core dumped)
Australia Forum Administrator #13
Are you using the stock SMAUG or the one with MXP added?

Have you changed the Makefile to add IMC?

Are you compiling/running on Cygwin (Windows) or Linux?

Do you get any messages before the crash (eg. loading areas)?

Try running with gdb, eg.

cd area
gdb ../src/smaug.exe
run

Australia #14
hrmmm i had to go over this one i got the MXP version
and im using cygwin i tryed using gdb but i got so lost so quick it wasnt funny .
#15
okay i had the same problem when ryunning it look to see if you have a gods directory and also look at the deity.lst file and see if the test deity is listed in it if so remove it and try again this solution was given originally by nivek
Australia Forum Administrator #16
It is almost impossible to debut these problems from a distance. I get SMAUG to work both under Cygwin and under Linux/OpenBSD using the supplied source, and making no changes, other than what I described in my "how to compile" page.

I can only suggest that you look at my recent post about using gdb and try to work out what is causing the crash. Typing "bt" (backtrace) in gdb should at least show what function you are in, and where it was called from. That should give a clue. For example, if it is opening a file, check that the file is there.
Australia #17
ahem.....Wahooooooooo!!!
it worked! i added a gods directory and removed the test diety and it worked fine!
Thankyou Straud And Nick without you 2 might have given up

oh and nick thanks for all the info on muds and other stuff yours so far is the only site i have found which explains stuff in a langauge i can understand (oh and i dowloaded a file on how to use gbd =)