SMAUG FUSS/Cygwin2.427 Compiler problems

Posted by Sparro on Sat 01 May 2004 08:03 PM — 14 posts, 39,677 views.

USA #0
Ok, I have been trying to get SMAUG to compile for me. I downloaded Cygwin (v2.427) with all the plugins I need (Pretty sure anyway) according to the walkthru of installing cygwin here. I am using SMAUG FUSS downloaded from this site. I am running on a WIN2000 machine. I also have searched this forum for a couple hours looking for ANYONE with the same problem I have, with no luck. I am trying to make from the src directory.

The exact error I am getting is:

$ make
make -s smaug
Compiling o/imc.o....
Assembler messages:
FATAL: can't create o/imc.o: No such file or directory
make[1]: *** [o/imc.o] Error 1
make: *** [all] Error 2

I am guessing the problem is in the Makefile, but the only change I made to it was to uncomment Line 6 since I am using Cygwin. I also tried Commenting out the IMC support in the makefile, but then I would get the same error for I3. If I comment that out too, then I get the same error for act_comm. The only thing I can figure is that something is either screwy in the Makefile, but other people on the forum seem to be able to compile it fine, or the directory structure maybe? CYGWIN problem? I dunno. Any help GREATLY appreciated. Also, please try and explain it as simply as you can, I am a novice(C)/rusty(FORTRAN) coder, and have little experience with compiler problems.
Australia Forum Administrator #1
Quote:

Compiling o/imc.o....


What's the "o"?

I don't get that line at all when I compile, and I don't know about the "o/" part. Have you got the normal directory structure? Like, if you go up one level out of "src" and type "ls" do you see this:


$ ls
Bugfixes.txt  boards    clans    corpses   deity  gods  log     races  system
area          building  classes  councils  doc    i3    player  src    watch

USA #2
Going up one level I have :

$ ls
Bugfixes.txt boards classes deity gods imc races system
area clans councils doc i3 player src
Australia Forum Administrator #3
If you type:

make clean
make


What do you see exactly? (Don't add the -s).
USA #4

Manager@ams-dell /fuss/smaugfuss/src
$ dir
Makefile    build.c     fight.c    imc.h       mud.h        services.c
act_comm.c  clans.c     grub.c     imccfg.h    mud_comm.c   shops.c
act_info.c  color.c     handler.c  imm_host.c  mud_prog.c   skills.c
act_move.c  color.h     hashstr.c  interp.c    planes.c     special.c
act_obj.c   comm.c      i3.c       magic.c     planes.h     startup
act_wiz.c   comments.c  i3.h       makeobjs.c  player.c     tables.c
ban.c       const.c     i3cfg.h    mapout.c    polymorph.c  track.c
bet.h       db.c        ident.c    misc.c      reset.c      update.c
boards.c    deity.c     imc.c      mpxset.c    save.c

Manager@ams-dell /fuss/smaugfuss/src
$ make clean
rm -f *.o smaug.exe *~

Manager@ams-dell /fuss/smaugfuss/src
$ make
make -s smaug
  Compiling o/imc.o....
Assembler messages:
FATAL: can't create o/imc.o: No such file or directory
make[1]: *** [o/imc.o] Error 1
make: *** [all] Error 2

Manager@ams-dell /fuss/smaugfuss/src
$
USA #5
Here is my Makefile if that helps...

CC      = gcc
#PROF    = -p
NOCRYPT =

#Uncomment to compile in Cygwin
CYGWIN = -DCYGWIN

# 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 undefined crypt errors
NEED_CRYPT = -lcrypt

#Intermud-3 - Comment out to disable I3 support in your code
I3 = 1

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

#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

C_FLAGS = $(OPT_FLAG) -O -g2 -Wall $(PROF) $(NOCRYPT) $(SOLARIS_FLAG)
L_FLAGS = $(OPT_FLAG) $(PROF) $(SOLARIS_LINK) $(NEED_CRYPT)

C_FILES = act_comm.c act_info.c act_move.c act_obj.c act_wiz.c boards.c \
          build.c clans.c color.c comm.c comments.c const.c db.c deity.c fight.c \
          handler.c hashstr.c ident.c interp.c magic.c makeobjs.c \
          mapout.c misc.c mpxset.c mud_comm.c mud_prog.c player.c polymorph.c \
          reset.c save.c shops.c skills.c special.c tables.c \
          track.c update.c grub.c ban.c services.c planes.c \
          imm_host.c

ifdef I3
   C_FILES := i3.c $(C_FILES)
   C_FLAGS := $(C_FLAGS) -DI3 -DI3SMAUG
endif

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

ifdef CYGWIN
smaug: $(O_FILES)
	rm -f smaug.exe
	$(CC) -o smaug.exe $(O_FILES) $(L_FLAGS)
	echo "Done compiling mud.";
	chmod g+w smaug.exe
	chmod a+x smaug.exe
	chmod g+w $(O_FILES)

clean:
	rm -f *.o smaug.exe *~
else
smaug: $(O_FILES)
	rm -f smaug
	$(CC) -o smaug $(O_FILES) $(L_FLAGS)
	echo "Done compiling mud.";
	chmod g+w smaug
	chmod a+x smaug
	chmod g+w $(O_FILES)

clean:
	rm -f o/*.o smaug *~
endif

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

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

USA #6
This happens alot. You need to use the Cygwin command prompt to unpack the archive so that it creates all the empty directories the mud will need to run. One of which is src/o so that the Makefile won't complain. You're also missing numerous other ones btw. Not just src/o :P

Unpacking tgz files using Winzip will result in missing dirs.
USA #7
OK, THANKS A LOT for the responses Nick & Samson! I will try that next. How exactly do I extract with cygwin tho? I am unfamiliar with it's commands. I will search the forums again, if it happens alot, it's bound to be there somewhere right? :)
USA #8
Ok, I got the files extracted using tar in Cygwin like Samson suggested, and everything is compiling smoothly. Not done yet, but past the point of the problem. Thanks again guys! Stupid Winzip!
Australia Forum Administrator #9
You got it working so you obviously found it, but in case someone was wondering ...

You unpack an archive with:


tar xvzf (filename)


The flags mean:

  • x - extract
  • v - verbose (ie., list which files are unpacked)
  • z - unzip (if the file is compressed)
  • f - filename follows
USA #10
Everything compiled BEAUTIFULLY! I got it up and running and don't have the SAVE problem I was having with 1.4a... Thanks again!
#11
I finally got cygwin to work the way it's supposed to on my box, but I am having this same problem when I try to compile...

I untarred the fuss file using cygwin, like Samson suggested, but I am still getting the the same exact error as was posted above.

I'm going to try a different fuss release and see if there is a problem with the release that I am using.

Thanx,
Juras
#12
Ok I used the normal 1.4a file, and that gave me problems as well. I think that part of the problem might have something to do with something that I noticed was happening while untarring any of the packages...

tar: dist/system/REQUESTS: Cannot mkfifo: Function not implemented


That was an error that I saw was happening while unpacking it. I went back to the cygwin site, and they dont have anything containing the mkfifo command. Heck, I'm not even sure what it is that it's trying to do...

Also, after I compile, do I run it from the shell using the

bash ./startup &

command or do I just use the *.exe that compilation creates?
Australia Forum Administrator #13
You shouldn't see that. However if I type "man mkfifo" in Cygwin it does explain what it is.

As for running it, you can change to the "area" directory and type:

../src/smaug.exe

That should work. The startup script has extra stuff to start the server up again if it goes down.