Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ SMAUG
➜ SMAUG coding
➜ Makefile For DBS2.0 Problems
Makefile For DBS2.0 Problems
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Pages: 1 2
Posted by
| Jeremy_S
(11 posts) Bio
|
Date
| Wed 18 Mar 2009 06:48 AM (UTC) Amended on Wed 18 Mar 2009 07:32 AM (UTC) by Jeremy_S
|
Message
| Well, I am very new to Coding and I am trying to create a Dragonball Mud. I have everything that I need and cyg seems to work just fine but. I am having problems with my Makefile. When I make I get the same errors and I am not sure what to do about it can anyone help. Here is the error message.
comm.o: In function 'write_to_descriptor':
/home/owner/dbs2.0/src/comm.c:1761: undefined reference to '_deflate'
comm.o: In function 'compressStart':
/home/owner/dbs2.0/src/comm.c:5681: undefined reference to '_deflateInit_'
comm.o: In function 'compressEnd':
/home/owner/dbs2.0/src/comm.c:5716: undefined reference
to 'deflate' /home/owner/dbs2.0/src/comm.c:5722: undefined reference to '_deflateEnd'
fight.o: In function 'damage':
/home/owner/dbs2.0/src/fight.c:2545: undefined reference to
'_floor1'
/home/owner/dbs2.0/src/fight.c:2558: undefined reference to
'_floor1'
collect2: ld returned 1 exit status
make[1]: ***[dbs] Error 1
make[1]: Leaving directory '/home/owner/dbs2.0/src'
make: *** [all] Error 2
| Top |
|
Posted by
| Nick Gammon
Australia (23,140 posts) Bio
Forum Administrator |
Date
| Reply #1 on Wed 18 Mar 2009 07:33 AM (UTC) |
Message
| You need to install zlib. Search this forum for posts about that if you are not sure how. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Jeremy_S
(11 posts) Bio
|
Date
| Reply #2 on Wed 18 Mar 2009 02:53 PM (UTC) Amended on Wed 18 Mar 2009 03:34 PM (UTC) by Jeremy_S
|
Message
| I have zlib 1.2.3-3
zlib-devel 1.2.3-3
and zlib0 1.2.3-3
I used cygcheck to see what I have and those are it. They should work right? I reinstalled Cygwin with the addition of a few extra lib and zlib packages but it still comes up with the same error.
| Top |
|
Posted by
| Zeno
USA (2,871 posts) Bio
|
Date
| Reply #3 on Wed 18 Mar 2009 03:25 PM (UTC) |
Message
| |
Posted by
| Jeremy_S
(11 posts) Bio
|
Date
| Reply #4 on Wed 18 Mar 2009 04:49 PM (UTC) |
Message
| I'm not exactly sure what to edit within the makefile. Here is the makefile.
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 *~
| Top |
|
Posted by
| Nick Gammon
Australia (23,140 posts) Bio
Forum Administrator |
Date
| Reply #5 on Wed 18 Mar 2009 10:00 PM (UTC) |
Message
| Where did you get the source exactly? I'll try it myself. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Jeremy_S
(11 posts) Bio
|
Date
| Reply #6 on Wed 18 Mar 2009 10:21 PM (UTC) |
Message
| The Cyg source was http://cygwin.elite-systems.org
The makefile and codebase was: http://www.mirrorservice.org/sites/download.sourceforge.net/pub/sourceforge/d/db/dbsaga/
The zlib from http://www.zlib.net/ | Top |
|
Posted by
| Nick Gammon
Australia (23,140 posts) Bio
Forum Administrator |
Date
| Reply #7 on Thu 19 Mar 2009 03:56 AM (UTC) |
Message
| I thought this problem sounded familiar. :)
It is in the Makefile. You need to change:
dbs: $(O_FILES)
rm -f dbsaga
$(CC) $(L_FLAGS) $(USE_IMC) -o dbsaga $(O_FILES) -lcrypt
chmod g+w dbsaga
chmod a+x dbsaga
chmod g+w $(O_FILES)
to:
dbs: $(O_FILES)
rm -f dbsaga
$(CC) $(USE_IMC) -o dbsaga $(O_FILES) -lcrypt $(L_FLAGS)
chmod g+w dbsaga
chmod a+x dbsaga
chmod g+w $(O_FILES)
The problem is that the linker is told to use the zlib library before any object files that need it, so it ignores it. If you put the flags at the end, the link succeeds. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Jeremy_S
(11 posts) Bio
|
Date
| Reply #8 on Thu 19 Mar 2009 06:32 AM (UTC) |
Message
| Ok I will try it and let you know. Thank you very much for your help so far I really appreciate it. | Top |
|
Posted by
| Jeremy_S
(11 posts) Bio
|
Date
| Reply #9 on Thu 19 Mar 2009 01:26 PM (UTC) |
Message
| Ok, I made the adjustments and then I had to search through my fight.o file to make a few adjustments and now my makfile has ran and completed. Now my startup file is having problems..:(
Error Message as follows:
$ ./startup
limit: Command not found.
ulimit: Command not found.
mv: cannot stat '../log/syslog.8': No such file or directory
mv: cannot stat '../log/syslog.7': No such file or directory
mv: cannot stat '../log/syslog.6': No such file or directory
mv: cannot stat '../log/syslog.5': No such file or directory
mv: cannot stat '../log/syslog.4': No such file or directory
mv: cannot stat '../log/syslog.3': No such file or directory
mv: cannot stat '../log/syslog.2': No such file or directory
mv: cannot stat '../log/syslog.1': No such file or directory
mv: cannot stat 'backup/dbsbackup.current.tar.gz': No such file or directory
tar: backup/exclude.list: No such file or directory
tar: Error is not recoverable: exiting now
dbs/area: No such file or directory.
Not sure what this means. Here is my startup file.
Sorry for spamming screen:
set port = 9000
if ( "$1" != "" ) set port="$1"
# Change to area directory.
cd ../area
# Set limits.
nohup
nice
limit stack 1024k
ulimit -Sc unlimited
if ( -e shutdown.txt ) rm -f shutdown.txt
while ( 1 )
# If you want to have logs in a different directory,
# change the 'set logfile' line to reflect the directory name.
# rm ../log/syslog.9
# We have space to archive old log files now...
if ( -e ../log/syslog.9 ) then
set index = 1000
while ( 1 )
set archivefile = ../log/archived/$index.log
if ( ! -e $archivefile ) break
@ index++
end
mv ../log/syslog.9 $archivefile
endif
mv ../log/syslog.8 ../log/syslog.9
mv ../log/syslog.7 ../log/syslog.8
mv ../log/syslog.6 ../log/syslog.7
mv ../log/syslog.5 ../log/syslog.6
mv ../log/syslog.4 ../log/syslog.5
mv ../log/syslog.3 ../log/syslog.4
mv ../log/syslog.2 ../log/syslog.3
mv ../log/syslog.1 ../log/syslog.2
mv ../log/syslog.log ../log/syslog.1
#touch ../log/syslog.log
# start DBSaga tarball backup
cd ../../
mv backup/dbsbackup.current.tar.gz backup/dbsbackup.previous.tar.gz
tar -czf backup/dbsbackup.current.tar.gz -X backup/exclude.list ./dbs
cd dbs/area
# end DBSaga tarball backup
cp ../system/hiscores.dat ../system/hiscores.bak
set logfile = ../log/syslog.log
# Record starting time
date > $logfile
date > ../area/boot.txt
# Record initial charges
# charges >> $logfile
# Run SMAUG.
# NO! Run DBSaga!
../src/dbsaga 9000 >&! $logfile
# ../src/smaug 7654 >&! $logfile
# ../src/smaug $port >&! $logfile
# ../src/smaug >>&! $logfile
# Record ending charges
# charges >> $logfile
# # Delete this out if no adb.
# if ( -e core ) then
# echo '$c' | adb ../src/smaug
# endif
# Let's see if this works...
# Using old index value, would be nice to have
# it be the date for the file name
if ( -e core ) then
set index = 1000
while ( 1 )
set crashfile = ../crash/$index.crash
if ( ! -e $crashfile ) break
@ index++
end
\mv core ../src
cd ../src
date > $crashfile
gdb -batch -x commands dbsaga core >> $crashfile
# mv core ../crash/core.$index
rm -f core
cd ../area
endif
# Restart, giving old connections a chance to die.
if ( -e shutdown.txt ) then
rm -f shutdown.txt
exit 0
endif
sleep 10
end
| Top |
|
Posted by
| Zeno
USA (2,871 posts) Bio
|
Date
| Reply #10 on Thu 19 Mar 2009 01:33 PM (UTC) |
Message
| How are you starting the MUD? Are you in src directory?
Do you have an area directory? |
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org | Top |
|
Posted by
| Jeremy_S
(11 posts) Bio
|
Date
| Reply #11 on Thu 19 Mar 2009 01:40 PM (UTC) Amended on Thu 19 Mar 2009 01:45 PM (UTC) by Jeremy_S
|
Message
| I am starting the mud with ./startup within src.
It says that I don't have area directory but I do.
There are two startup files that came with my DBS download. The other startup file (which doesn't seem to work either) is this:
#!/bin/csh -f
# Set the port number.
set port = 9000
if ( "$1" != "" ) set port="$1"
# Change to area directory.
cd ../area
# Set limits.
nohup
nice
limit stack 1024k
ulimit -Sc unlimited
if ( -e shutdown.txt ) rm -f shutdown.txt
while ( 1 )
# If you want to have logs in a different directory,
# change the 'set logfile' line to reflect the directory name.
cp ../log/start2.log ../log/start2.bak
cp ../system/hiscores.dat ../system/hiscores.bak
set logfile = ../log/start2.log
# Record starting time
date > $logfile
date > ../area/boot.txt
# Record initial charges
# charges >> $logfile
# Run SMAUG.
# NO! Run DBSaga!
../src/dbsaga 9001 >&! $logfile
# ../src/smaug 7654 >&! $logfile
# ../src/smaug $port >&! $logfile
# ../src/smaug >>&! $logfile
# Record ending charges
# charges >> $logfile
# # Delete this out if no adb.
# if ( -e core ) then
# echo '$c' | adb ../src/smaug
# endif
# Let's see if this works...
# Using old index value, would be nice to have
# it be the date for the file name
if ( -e core ) then
set index = 1000
while ( 1 )
set crashfile = ../crash/$index.crash
if ( ! -e $crashfile ) break
@ index++
end
\mv core ../src
cd ../src
date > $crashfile
gdb -batch -x commands dbsaga core >> $crashfile
rm -f core
cd ../area
endif
# Restart, giving old connections a chance to die.
if ( -e shutdown.txt ) then
rm -f shutdown.txt
exit 0
endif
sleep 5
end
| Top |
|
Posted by
| Nick Gammon
Australia (23,140 posts) Bio
Forum Administrator |
Date
| Reply #12 on Thu 19 Mar 2009 09:02 PM (UTC) |
Message
| First, make sure you have a "log" directory at the same level as the src and area directories. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Jeremy_S
(11 posts) Bio
|
Date
| Reply #13 on Fri 20 Mar 2009 03:13 AM (UTC) Amended on Fri 20 Mar 2009 03:23 AM (UTC) by Jeremy_S
|
Message
| I do, it is an empty file/ dir.
It is in my dbs2.0 dir, the log dir itself
is not within my src dir. The area dir also is only within
the dbs2.0 dir. It is not within src, do they have to be within src?
I tried putting log and area files within src and that gave me this:
$ ./startup
../area: No such file or directory | Top |
|
Posted by
| Zeno
USA (2,871 posts) Bio
|
Date
| Reply #14 on Fri 20 Mar 2009 03:30 AM (UTC) Amended on Fri 20 Mar 2009 03:31 AM (UTC) by Zeno
|
Message
| The log errors are fine, that won't stop startup. Pretty sure this is stopping it:
Quote: dbs/area: No such file or directory.
In your script you have:
Change that to the correct folder names you have. |
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
63,168 views.
This is page 1, subject is 2 pages long: 1 2
It is now over 60 days since the last post. This thread is closed.
Refresh page
top