Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
auth_update crash
Dec 23, 2017, 10:15 pm
By Remcon
check_tumble
Dec 18, 2017, 7:21 pm
By Remcon
parse description bug
Dec 15, 2017, 10:08 pm
By Remcon
Couple bugs
Dec 12, 2017, 5:42 pm
By Remcon
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Users Online
CommonCrawl, Yahoo!, Sogou

Members: 0
Guests: 8
Stats
Files
Topics
Posts
Members
Newest Member
478
3,708
19,242
612
Jacki72H
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » General » General Discussions » Compiling errors with smaugfu...
Forum Rules | Mark all | Recent Posts

Compiling errors with smaugfuss 1.9 on ubuntu 9.04
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Mar 26, 2010, 12:45 am
Go to the top of the page
Go to the bottom of the page

feltsu
Fledgling
GroupMembers
Posts4
JoinedMar 26, 2010

thomas@ubuntu-desktop:~/mudserver/smaugfuss/src$ make
make -s smaug
Compiling o/imc.o....
In file included from mud.h:389,
from imc.c:59:
weather.h:63: error: variably modified ‘weatherMap’ at file scope
weather.h:63: error: array type has incomplete element type
weather.h:64: error: variably modified ‘weatherDelta’ at file scope
weather.h:64: error: array type has incomplete element type
In file included from imc.c:59:
mud.h:4484: error: conflicting types for ‘smash_tilde’
mud.h:4483: error: previous declaration of ‘smash_tilde’ was here
mud.h:4790: error: conflicting types for ‘interpret’
mud.h:4789: error: previous declaration of ‘interpret’ was here
mud.h:4794: error: conflicting types for ‘one_argument’
mud.h:4793: error: previous declaration of ‘one_argument’ was here
imc.c: In function ‘imc_find_social’:
imc.c:7494: error: ‘for’ loop initial declaration used outside C99 mode
make[1]: *** [o/imc.o] Error 1
make: *** [all] Error 2

Very nice little bugfeed, I don't have a clue as what to do! I googled that for loop error, and found a solution and when I apply it the error before imc.c persists, so now the error looks like:

thomas@ubuntu-desktop:~/mudserver/smaugfuss/src$ make
make -s smaug
Compiling o/imc.o....
In file included from mud.h:389,
from imc.c:59:
weather.h:63: error: variably modified ‘weatherMap’ at file scope
weather.h:63: error: array type has incomplete element type
weather.h:64: error: variably modified ‘weatherDelta’ at file scope
weather.h:64: error: array type has incomplete element type
In file included from imc.c:59:
mud.h:4484: error: conflicting types for ‘smash_tilde’
mud.h:4483: error: previous declaration of ‘smash_tilde’ was here
mud.h:4790: error: conflicting types for ‘interpret’
mud.h:4789: error: previous declaration of ‘interpret’ was here
mud.h:4794: error: conflicting types for ‘one_argument’
mud.h:4793: error: previous declaration of ‘one_argument’ was here
make[1]: *** [o/imc.o] Error 1
make: *** [all] Error 2

Any help please??

       
Post is unread #2 Mar 26, 2010, 12:59 am
Go to the top of the page
Go to the bottom of the page

Kayle
Off the Edge of the Map
GroupAdministrators
Posts1,195
JoinedMar 21, 2006

Can you post your makefile?
       
Post is unread #3 Mar 26, 2010, 1:22 am
Go to the top of the page
Go to the bottom of the page

feltsu
Fledgling
GroupMembers
Posts4
JoinedMar 26, 2010

CC = gcc
#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

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 mssp.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) $<
       
Post is unread #4 Mar 26, 2010, 1:26 am   Last edited Mar 26, 2010, 1:31 am by Kayle
Go to the top of the page
Go to the bottom of the page

Kayle
Off the Edge of the Map
GroupAdministrators
Posts1,195
JoinedMar 21, 2006

feltsu said:

CC = gcc


This is your problem. SmaugFUSS compiles as C++ and makes use of operator function overloading, switching to g++ will solve the issues that you're having.

[Edit:] I always get the two mixed up...
       
Post is unread #5 Mar 26, 2010, 1:27 am
Go to the top of the page
Go to the bottom of the page

Kayle
Off the Edge of the Map
GroupAdministrators
Posts1,195
JoinedMar 21, 2006

Also, restoring the original line back in imc.c will work fine once the compiler is switched back to g++
       
Post is unread #6 Mar 26, 2010, 1:28 am
Go to the top of the page
Go to the bottom of the page

feltsu
Fledgling
GroupMembers
Posts4
JoinedMar 26, 2010

yeah! now it works! wohoo \o/
(I mean it's still compiling, we'll see :P)

okay it works! thanks!
       
Post is unread #7 Mar 26, 2010, 1:36 am   Last edited Mar 26, 2010, 1:48 am by feltsu
Go to the top of the page
Go to the bottom of the page

feltsu
Fledgling
GroupMembers
Posts4
JoinedMar 26, 2010

what the hell!! what does this error mean?

thomas@ubuntu-desktop:~/mudserver/smaugfuss/src$ nohup ./startup &
nohup: ignoring input and appending output to `/home/thomas/nohup.out'
nohup: cannot run command `./startup': No such file or directory
[1] 20991
[1]+ Exit 127 nohup ./startup

I hate this! damn it!

I read the readme and it said that after compiling (which went good no errors) i should start the server with the command nohup ./startup &

EDIT: I tried to change the startup file's folders and got a permission denied error (also with and without sudo) so now I'm truly lost.. I thought this would be a walk in the park easy thing to setup, but nooo-uuuu.. :(

I tried it with sudo too, but no help..
       
Post is unread #8 Mar 26, 2010, 11:25 am
Go to the top of the page
Go to the bottom of the page

David Haley
Sorcerer
GroupMembers
Posts903
JoinedJan 29, 2007

Where did you get this copy? It's very bizarre that the makefile was set to gcc: I think it's been using g++ since 1.8. That makes me suspicious as to what else might have been broken...

Anyhow, you might need tcsh, but that should be installed with Ubuntu by default. Make sure that the startup file is there, and that it's chmodded +x.
       
Pages:<< prev 1 next >>