[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]  Compiling the server
. . -> [Subject]  error when compiling smaugfuss1.9 in windows with cygwin.

Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?
(New message)
Subject: error when compiling smaugfuss1.9 in windows with cygwin.
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)

Posted by Gunner   Argentina  (12 posts)  [Biography] bio
Date Sat 14 May 2011 03:09 AM (UTC)  quote  ]
Message
Thank you! one more thing, how do I change the port?
Thanks for your patience. xD
[Go to top] top

Posted by Nick Gammon   Australia  (18,797 posts)  [Biography] bio   Forum Administrator
Date Sat 14 May 2011 02:04 AM (UTC)  quote  ]
Message
This line here:


#CYGWIN = -DCYGWIN


The "#" is a comment. Get rid of it:


CYGWIN = -DCYGWIN


Then do "make clean" followed by "make".

- Nick Gammon

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

Posted by Gunner   Argentina  (12 posts)  [Biography] bio
Date Sat 14 May 2011 02:00 AM (UTC)  quote  ]
Message
Sorry, but I do not understand.
My makefile is:
CC = g++
#PROF = -p

#Uncomment to compile in Cygwin
#CYGWIN = -DCYGWIN

#Uncomment the line below if you are getting undefined references to dlsym, dlopen, and dlclose.
#Comment it out if you get errors about ldl not being found.
NEED_DL = -ldl

#Some systems need this for dynamic linking to work.
EXPORT_SYMBOLS = -export-dynamic

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

#IMC2 - Comment out to disable IMC2 support
IMC = 1

W_FLAGS = -Wall -Werror -Wshadow -Wformat-security -Wpointer-arith -Wcast-align -Wredundant-decls -Wconversion

C_FLAGS = -g2 $(W_FLAGS) $(SOLARIS_FLAG) $(PROF) $(EXPORT_SYMBOLS)
L_FLAGS = $(PROF) $(SOLARIS_LINK) -lz $(NEED_DL)
#D_FLAGS : For the DNS Slave process. No need in linking all the extra libs for this.
D_FLAGS = -g2 -O $(PROF) $(SOLARIS_LINK)

C_FILES = act_comm.c act_info.c act_move.c act_obj.c act_wiz.c ban.c boards.c \
build.c calendar.c chess.c clans.c color.c comm.c comments.c const.c db.c deity.c \
dns.c fight.c handler.c hashstr.c hint.c hotboot.c imm_host.c interp.c \
liquids.c magic.c makeobjs.c mapout.c mapper.c mccp.c \
misc.c mpxset.c mud_comm.c mud_prog.c news.c planes.c player.c polymorph.c \
renumber.c reset.c save.c services.c sha256.c shops.c skills.c special.c tables.c \
track.c update.c variables.c weather.c

ifdef IMC
C_FILES := imc.c $(C_FILES)
C_FLAGS := $(C_FLAGS) -DIMC -DIMCSMAUG
endif

O_FILES := $(patsubst %.c,o/%.o,$(C_FILES))

H_FILES = $(wildcard *.h)

all:
$(MAKE) -s smaug
$(MAKE) -s dns

# pull in dependency info for *existing* .o files
-include dependencies.d

ifdef CYGWIN
smaug: $(O_FILES)
rm -f smaug.exe
dlltool --export-all --output-def smaug.def $(O_FILES)
dlltool --dllname smaug.exe --output-exp smaug.exp --def smaug.def
$(CC) -o smaug.exe $(O_FILES) smaug.exp $(L_FLAGS)
@echo "Generating dependency file ...";
@$(CC) -MM $(C_FLAGS) $(C_FILES) > dependencies.d
@perl -pi -e 's.^([a-z]).o/$$1.g' dependencies.d
@echo "Done compiling mud.";
chmod g+w smaug.exe
chmod a+x smaug.exe
chmod g+w $(O_FILES)

clean:
@rm -f o/*.o smaug.exe dependencies.d resolver.exe resolver.o *~

else
smaug: $(O_FILES)
rm -f smaug
$(CC) -export-dynamic -o smaug $(O_FILES) $(L_FLAGS)
@echo "Generating dependency file ...";
@$(CC) -MM $(C_FLAGS) $(C_FILES) > dependencies.d
@perl -pi -e 's.^([a-z]).o/$$1.g' dependencies.d
@echo "Done compiling mud.";
chmod g+w smaug
chmod a+x smaug
chmod g+w $(O_FILES)

clean:
@rm -f o/*.o smaug dependencies.d resolver resolver.o *~
endif

dns: resolver.o
rm -f resolver
$(CC) $(D_FLAGS) -o resolver resolver.o
@echo "Done compiling DNS resolver.";
chmod g+w resolver
chmod a+x resolver
chmod g+w resolver.o

indent:
indent -ts3 -nut -nsaf -nsai -nsaw -npcs -npsl -ncs -nbc -bls -prs -bap -cbi0 -cli3 -bli0 -l125 -lp -i3 -cdb -c1 -cd1 -sc -pmt $(C_FILES)
indent -ts3 -nut -nsaf -nsai -nsaw -npcs -npsl -ncs -nbc -bls -prs -bap -cbi0 -cli3 -bli0 -l125 -lp -i3 -cdb -c1 -cd1 -sc -pmt $(H_FILES)

indentclean:
rm *.c~ *.h~

o/%.o: %.c
echo " Compiling $@....";
$(CC) -c $(C_FLAGS) $< -o $@

.c.o: mud.h
$(CC) -c $(C_FLAGS) $<
What should I do?
[Go to top] top

Posted by Nick Gammon   Australia  (18,797 posts)  [Biography] bio   Forum Administrator
Date Fri 13 May 2011 10:26 PM (UTC)  quote  ]
Message
Does look to me you are in the right directory. You should be in the area directory, not the smaugfuss directory.

Also make sure you uncommented the "cygwin" line near the top of Makefile, otherwise the dynamic linking of commands doesn't work. There was another post about that recently.

If you had not amended the Makefile, do a "make clean" after you change it and then another "make".

- Nick Gammon

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

Posted by Gunner   Argentina  (12 posts)  [Biography] bio
Date Fri 13 May 2011 06:33 PM (UTC)  quote  ]
Message
Marcos@Marcos1 ~
$ cd smaugfuss
Marcos@Marcos1 ~/smaugfuss
$ ./src/smaug
Fri May 13 14:30:56 2011 :: Booting Database
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Fri May 13 14:30:56 2011 :: [*****] BOOT: ---------------------[ Boot Log ]-----
---------------
Fri May 13 14:30:56 2011 :: Initializing libdl support...
Fri May 13 14:30:56 2011 :: Loading commands...
Fri May 13 14:30:56 2011 :: [*****] BUG: Cannot open ../system/commands.dat
[Go to top] top

Posted by Gunner   Argentina  (12 posts)  [Biography] bio
Date Fri 13 May 2011 06:24 PM (UTC)  quote  ]
Message
thanks! I have a problem and a question:
the problem is I have no command, all I can do is to use socials.
and the question is, How do I change the port?
[Go to top] top

Posted by Nick Gammon   Australia  (18,797 posts)  [Biography] bio   Forum Administrator
Date Fri 13 May 2011 07:41 AM (UTC)  quote  ]
Message

$ cd smaugfuss/src

Marcos@Marcos1 ~/smaugfuss/src
$ nohup ../smaug


Wrong directory. You are in src but using ../smaug looks in the parent directory.


Marcos@Marcos1 ~/smaugfuss/src
$ nohup /smaug
nohup: ignoring input and appending output to `nohup.out'
nohup: failed to run command `/smaug': No such file or directory
It won't be in the root directory.

Marcos@Marcos1 ~/smaugfuss/src
$ smaug
bash: smaug: command not found


You need to specify the current directory:


nohup ./smaug


In any case, it won't run from the src directory (no area files). You need to do:


cd ../area
../src/smaug




- Nick Gammon

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

Posted by Twisol   USA  (2,230 posts)  [Biography] bio
Date Thu 12 May 2011 11:25 PM (UTC)  quote  ]
Message
Might need to run `chmod +x startup` first.

'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
[Go to top] top

Posted by Gunner   Argentina  (12 posts)  [Biography] bio
Date Thu 12 May 2011 11:15 PM (UTC)  quote  ]
Message

Marcos@Marcos1 ~
$ cd smaugfuss

Marcos@Marcos1 ~/smaugfuss
$ cd src

Marcos@Marcos1 ~/smaugfuss/src
$ nohup ../startup &
[1] 1116

Marcos@Marcos1 ~/smaugfuss/src
$ nohup: ignoring input and appending output to `nohup.out'
nohup: failed to run command `../startup': No such file or directory
nohup ./startup &
[2] 5528
[1] Exit 127 nohup ../startup

Marcos@Marcos1 ~/smaugfuss/src
$ nohup: ignoring input and appending output to `nohup.out'
nohup: failed to run command `./startup': Permission denied
[Go to top] top

Posted by Zeno   USA  (2,868 posts)  [Biography] bio   Moderator
Date Thu 12 May 2011 10:45 PM (UTC)  quote  ]
Message
You should be starting the MUD in src using this command:

nohup ./startup &

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

Posted by Twisol   USA  (2,230 posts)  [Biography] bio
Date Thu 12 May 2011 10:07 PM (UTC)  quote  ]
Message
Just reply with the rest, or paste to pastebin.com and give us the link when it's posted.

'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
[Go to top] top

Posted by Gunner   Argentina  (12 posts)  [Biography] bio
Date Thu 12 May 2011 10:06 PM (UTC)  quote  ]
Message
sorry, I can not copy because it exceeds the number of characters.
[Go to top] top

Posted by Gunner   Argentina  (12 posts)  [Biography] bio
Date Thu 12 May 2011 09:57 PM (UTC)  quote  ]
Message
Hi, I have several problems to compile and run Smaug.
The first is this warning:

$ make
make -s smaug
Compiling o/imc.o....
Compiling o/act_comm.o....
Compiling o/act_info.o....
Compiling o/act_move.o....
Compiling o/act_obj.o....
Compiling o/act_wiz.o....
Compiling o/ban.o....
Compiling o/boards.o....
Compiling o/build.o....
Compiling o/calendar.o....
Compiling o/chess.o....
Compiling o/clans.o....
Compiling o/color.o....
Compiling o/comm.o....
Compiling o/comments.o....
Compiling o/const.o....
Compiling o/db.o....
Compiling o/deity.o....
Compiling o/dns.o....
Compiling o/fight.o....
Compiling o/handler.o....
Compiling o/hashstr.o....
Compiling o/hint.o....
Compiling o/hotboot.o....
Compiling o/imm_host.o....
Compiling o/interp.o....
Compiling o/liquids.o....
Compiling o/magic.o....
Compiling o/makeobjs.o....
Compiling o/mapout.o....
Compiling o/mapper.o....
Compiling o/mccp.o....
Compiling o/misc.o....
Compiling o/mpxset.o....
Compiling o/mud_comm.o....
Compiling o/mud_prog.o....
Compiling o/news.o....
Compiling o/planes.o....
Compiling o/player.o....
Compiling o/polymorph.o....
Compiling o/renumber.o....
Compiling o/reset.o....
Compiling o/save.o....
Compiling o/services.o....
Compiling o/sha256.o....
Compiling o/shops.o....
Compiling o/skills.o....
Compiling o/special.o....
Compiling o/tables.o....
Compiling o/track.o....
Compiling o/update.o....
Compiling o/variables.o....
Compiling o/weather.o....
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/bin/ld: warning: --
export-dynamic is not supported for PE targets, did you mean --export-all-symbol
s?
Generating dependency file ...
Done compiling mud.
make -s dns
Done compiling DNS resolver.

I can not run Smaug from the cygwin console:

Marcos@Marcos1 ~
$ cd smaugfuss/src

Marcos@Marcos1 ~/smaugfuss/src
$ nohup ../smaug
nohup: ignoring input and appending output to `nohup.out'
nohup: failed to run command `../smaug': No such file or directory

Marcos@Marcos1 ~/smaugfuss/src
$ smaug
bash: smaug: command not found

Marcos@Marcos1 ~/smaugfuss/src
$ nohup /smaug
nohup: ignoring input and appending output to `nohup.out'
nohup: failed to run command `/smaug': No such file or directory

Marcos@Marcos1 ~/smaugfuss/src

I try to run from cmd.exe, copying files cygwin1.dll, cygz.dll cyggcc_s-1.dll and giving me these problems:
[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.


2,964 views.

[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]