Configure Smaug 1.4a with Cygwin. help.

Posted by Karn on Thu 02 Dec 2004 07:40 AM — 13 posts, 38,116 views.

#0
I looked through the message archive and stuff I dunno if it had what I was looking for so I am going to post this.

When I type 'make' it gives me this. [http://dbsaga.superihost.com/makefirst.txt]
This is the Makefile.(refer to bottom)
This is the comm.c. [http://dbsaga.superihost.com/comm.c]
This is the fight.c. [http://dbsaga.superihost.com/fight.c]

That is what I get when trying to configure my files
If you could tell me what I have to modify it would be very helpfull. If you need any other files contact me via MSN(wav3master@hotmail.com)

CC = gcc
#PROF = -p
NOCRYPT =

# Uncomment the line below if you have problems with math functions
MATH_LINK = -lm

# Uncomment the two lines below if compiling on a Solaris box
#SOLARIS_FLAG = -Dsun -DSYSV
#SOLARIS_LINK = -lnsl -lsocket

#Uncomment the line below if you are getting a line like:
#interp.c:757: warning: int format, time_t arg (arg 7)
TIME = -DTIMEFORMAT

#Uncomment the line below if you are getting implicit decleration of re_exec
#REG = -DREGEX

#Uncomment the line below if you are getting undefined re_exec errors
NEED_REG = -lgnuregex

#Uncomment the line below if you are getting undefined crypt errors
#NEED_CRYPT = -NOCRYPT

#DBUGFLG = -DREQUESTS

#Uncomment the line below if you want a performance increase though beware
#your core files may not be as much of a benefit if you do.
#OPT_FLAG = -finline-functions -funroll-loops -fdefer-pop -fstrength-reduce
OPT_FLAG = -DMCCP

C_FLAGS = $(OPT_FLAG) -O -g3 -Wall -Wuninitialized $(PROF) $(NOCRYPT) $(DBUGFLG) -DSMAUG $(SOLARIS_FLAG) $(TIME) $(REG)
L_FLAGS = $(OPT_FLAG) $(PROF) $(SOLARIS_LINK) $(NEED_CRYPT) ${MATH_LINK} -lz

#D_FLAGS : For the DNS Slave process. No need in linking all the extra libs for this.
D_FLAGS = -g3 -O $(PROF) $(SOLARIS_LINK)

#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

O_FILES = act_comm.o act_info.o act_move.o act_obj.o act_wiz.o ban.o \
board.o boards.o bounty.o build.o clans.o colorize.o comm.o \
comments.o const.o db.o deity.o editor.o fight.o finger.o grub.o \
handler.o hashstr.o hiscores.o hotboot.o house.o ibuild.o ident.o \
imm_host.o interp.o magic.o makeobjs.o malloc.o mapout.o marry.o \
misc.o mpxset.o mud_comm.o mud_prog.o new_fun.o pfiles.o planes.o \
planet.o player.o polymorph.o rare.o requests.o reset.o save.o \
services.o shops.o skills.o skills_android.o skills_dbs.o space.o \
special.o stat_obj.o tables.o track.o update.o dns.o

C_FILES = act_comm.c act_info.c act_move.c act_obj.c act_wiz.c ban.c \
board.c boards.c bounty.c build.c clans.c colorize.c comm.c \
comments.c const.c db.c deity.c editor.c fight.c finger.c grub.c \
handler.c hashstr.c hiscores.c hotboot.c house.c ibuild.c ident.c \
imm_host.c interp.c magic.c makeobjs.c malloc.c mapout.c marry.c \
misc.c mpxset.c mud_comm.c mud_prog.c new_fun.c pfiles.c planes.c \
planet.c player.c polymorph.c rare.c requests.c reset.c save.c \
services.c shops.c skills.c skills_android.c skills_dbs.c space.c \
special.c stat_obj.c tables.c track.c update.c dns.c

H_FILES = mud.h bet.h board.h finger.h hotboot.h house.h pfiles.h rare.h

all:
make dbs

dbs: $(O_FILES)
rm -f dbsaga
$(CC) $(L_FLAGS) $(USE_IMC) -o dbsaga $(O_FILES)
chmod g+w dbsaga
chmod a+x dbsaga
chmod g+w $(O_FILES)

dbs2: $(O_FILES)
rm -f dbsaga2
$(CC) $(L_FLAGS) $(USE_IMC) -o dbsaga2 $(O_FILES)
chmod g+w dbsaga2
chmod a+x dbsaga2
chmod g+w $(O_FILES)

dns: resolver.o
rm -f resolver
$(CC) $(D_FLAGS) -o resolver resolver.o
chmod g+w resolver
chmod a+x resolver
chmod g+w resolver.o

.c.o: mud.h
$(CC) -c $(C_FLAGS) $(USE_IMC) -DNOCRYPT $<

clean:
rm -f *.o dbsaga *~

(dbsaga2.0a is a free destrobution is the DBSaga Codebase[Approved by: Goku of DBSaga])
Amended on Thu 02 Dec 2004 07:45 AM by Karn
USA #1
Looks like it's having trouble with the compression library (-lz). I would suggest changing the line
OPT_FLAG = -DMCCP

to
#OPT_FLAG = -DMCCP


thus, getting rid of MCCP. See if that solves your problem. (it might not solve the floorl problem, but might solve the deflate problem.)

[Edit:]
Did you install the zlib and math libraries when you installed cygwin?
Amended on Thu 02 Dec 2004 08:04 AM by David Haley
#2
when i disable it it gives me this:

Shiro Moto@motozan-ujx070n ~/shiro/src
$ make
make dbs
make[1]: Entering directory `/home/Shiro Moto/shiro/src'
gcc -c -O -g3 -Wall -Wuninitialized -DSMAUG -DTIMEFORMAT -DNOCRYPT act_wi
z.c
act_wiz.c: In function `do_users':
act_wiz.c:4983: error: structure has no member named `compressing'
act_wiz.c:4990: error: structure has no member named `compressing'
act_wiz.c:5009: error: structure has no member named `compressing'
act_wiz.c:5016: error: structure has no member named `compressing'
make[1]: *** [act_wiz.o] Error 1
make[1]: Leaving directory `/home/Shiro Moto/shiro/src'
make: *** [all] Error 2

and I installed EVERYTHING that was on the cygwin database. took me forever but i did it o.o

[edit] : I tried adding it back just for that one file and then removing the tag and it still didn't work. YET I know it's possible.... cause someone else got it working(they are never online or I would ask them how they did it.)
Amended on Thu 02 Dec 2004 09:40 AM by Karn
USA #3
Do you want to keep compression? Personally I don't like it. Seems like it's giving you some trouble. (I was wondering who you were when you added me on MSN) Hmm, I'm not sure about Cygwin, but since it is a linux emu, it should come with all the libraries... I suggest taking out MCCP. You'll get that error where compresssion is used. Remove the reference to the "compression" field where the errors display it. If you need some quick help, go ahead and IM me, since you already have me added.
USA #4
Seems to me that there's a really big problem with the codebase if by disabling MCCP you get compile errors because the code is trying to use MCCP stuff even though it's been ifdef'ed out elsewhere... But yeah, removing the trailing references (or better yet, ifdef'ing them out) should make it compile.
USA #5
*cough* The codebase he is using isn't the best of choices. It has some major issues. But besides that, yes, ifchecks would be better I suppose. I'm sure it would have compiled fine under linux.
USA #6
I don't think it would have. If the code is accessing MCCP stuff, and this MCCP stuff is #ifdef'd in the structure definitions, but the accessing of it is not #ifdef'd, then it would break.

The library stuff might have compiled alright, but the platform won't affect preprocessor issues.
#7
Ok, I got it to compile. (Played with some of the settings and just plain deleted referances to -floorl[It probably messed with that absorb attack gaining thing but who cares...]) I type 'nohup ../src/startup &' and then type: '../src/dbsaga.exe' and it boots but when i try and connect it crashes the mud lol
USA #8
You only need to run the startup script, because that runs the exec. Try debugging it, what does it say?
#9
I got it working :)
Accessing it thru the startup worked. :)
#10
Hello.. I am having problems with this codebase myself, the same exact errors and everything. Could someone PLEASE help me fix this? Thanks!
USA #11
only problem im gettin is it wont save any ideas?
Australia Forum Administrator #12
Players won't save? There are many posts about that here.