[Home] [Downloads] [Search] [Help/forum]

Gammon Software Solutions forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  SMAUG
. -> [Folder]  SMAUG coding
. . -> [Subject]  Makefile For DBS2.0 Problems

Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?
(New message)
Subject: Makefile For DBS2.0 Problems
Name:
Your forum user name.
Register forum user name
Password:
Your forum password.
Forgotten password?
Message:
Message to be posted (in English, please).
Forum codes:
Check this if your message uses 'forum codes' or templates (auto-detected for new posts).
Forum codes Templates

Save this message ...


Subject review (reverse sequence)

Pages: 1  2 

Posted by Nick Gammon   Australia  (18,770 posts)  [Biography] bio   Forum Administrator
Date Fri 01 Jul 2011 10:50 PM (UTC)  quote  ]
Message
One possible thing is that you typed in some spaces at the start of the line. Rather confusingly, the make program distinguishes between leading spaces and a tab.

Make sure you have a tab as the first character. Use an editor (eg. Crimson Editor) that lets you see tabs.

If that doesn't to it post the file and indicate which is line 74.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Xandrac   (3 posts)  [Biography] bio
Date Fri 01 Jul 2011 08:20 PM (UTC)  quote  ]
Message
Alright I probably won't see a response since this is such an old topic but I started off having the same problems as a different poster and it ended up leading me to this post. I've done what was needed to be done and I changed the makefile to have the changes that Gammon suggested. When I type make again I get "Makefile:74: *** missing separator. Stop."

Just wondering what I did to make it do that? I am a very newbie coder so I apologize in advance.
[Go to top] top

Posted by Zeno   USA  (2,867 posts)  [Biography] bio   Moderator
Date Fri 20 Mar 2009 02:51 PM (UTC)  quote  ]
Message
You should be starting the MUD up like:
./startup &

Or:
nohup ./startup &


Yes, it'll run fine with those errors. It just couldn't rotate logs or backup the MUD.

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
[Go to top] top

Posted by Jeremy_S   (11 posts)  [Biography] bio
Date Fri 20 Mar 2009 12:16 PM (UTC)  quote  ]

Amended on Fri 20 Mar 2009 12:42 PM (UTC) by Jeremy_S

Message
Well I rewrote the directory for dbs2.0/area. That eliminated a few things but I still get this and then it does nothing and I can no longer type in cyg.

$ ./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 '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

I have officially logged onto the mud with MUSH. Everything seems to be working well. Will it run succesfully and "smoothly" even with the log errors?
[Go to top] top

Posted by Zeno   USA  (2,867 posts)  [Biography] bio   Moderator
Date Fri 20 Mar 2009 03:30 AM (UTC)  quote  ]

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:
cd dbs/area

Change that to the correct folder names you have.

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
[Go to top] top

Posted by Jeremy_S   (11 posts)  [Biography] bio
Date Fri 20 Mar 2009 03:13 AM (UTC)  quote  ]

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
[Go to top] top

Posted by Nick Gammon   Australia  (18,770 posts)  [Biography] bio   Forum Administrator
Date Thu 19 Mar 2009 09:02 PM (UTC)  quote  ]
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
[Go to top] top

Posted by Jeremy_S   (11 posts)  [Biography] bio
Date Thu 19 Mar 2009 01:40 PM (UTC)  quote  ]

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

[Go to top] top

Posted by Zeno   USA  (2,867 posts)  [Biography] bio   Moderator
Date Thu 19 Mar 2009 01:33 PM (UTC)  quote  ]
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
[Go to top] top

Posted by Jeremy_S   (11 posts)  [Biography] bio
Date Thu 19 Mar 2009 01:26 PM (UTC)  quote  ]
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

[Go to top] top

Posted by Jeremy_S   (11 posts)  [Biography] bio
Date Thu 19 Mar 2009 06:32 AM (UTC)  quote  ]
Message
Ok I will try it and let you know. Thank you very much for your help so far I really appreciate it.
[Go to top] top

Posted by Nick Gammon   Australia  (18,770 posts)  [Biography] bio   Forum Administrator
Date Thu 19 Mar 2009 03:56 AM (UTC)  quote  ]
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
[Go to top] top

Posted by Jeremy_S   (11 posts)  [Biography] bio
Date Wed 18 Mar 2009 10:21 PM (UTC)  quote  ]
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/
[Go to top] top

Posted by Nick Gammon   Australia  (18,770 posts)  [Biography] bio   Forum Administrator
Date Wed 18 Mar 2009 10:00 PM (UTC)  quote  ]
Message
Where did you get the source exactly? I'll try it myself.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Jeremy_S   (11 posts)  [Biography] bio
Date Wed 18 Mar 2009 04:49 PM (UTC)  quote  ]
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 *~
[Go to top] 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.


6,585 views.

This is page 2, subject is 2 pages long:  [Previous page]  1  2 

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

[Home]

Written by Nick Gammon - 5K

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Internet Contents Rating Association (ICRA) - 2K]    [Web site powered by FutureQuest.Net]