13 Aug, 2009, Jarl wrote in the 1st comment:
Votes: 0
Hey everyone, I was curious if anyone has gotten the Static Chaos/Chaosium code by Alathon to work and/or what they did to get it working. I put it on my MU* host
this morning and for the life of me can't get it to make at all! I know a bit about coding and any work I did with muds was always just screwing around on a Win port of
Rom or something. There isn't any documentation really in the release and I am new to using the shells for this. Essentially what I did was read the makefile to make sure
it was the right one, then I uploaded the whole thing thing to my host. Then I cd to the source folder where all the code and the makefile was and ran a make. I dont know
whats up with this one at all and any help would be appreciated. I just wanted to get it up for myself and some friends and possibly reopen it to the public. I will post below
the makefile and what make returned to me.

Makefile
CC      = gcc
PROF = -g
NOCRYPT =
C_FLAGS = -O -Wall $(PROF) $(NOCRYPT)
L_FLAGS = -O $(PROF)

O_FILES = act_comm.o act_info.o act_move.o act_obj.o act_wiz.o bit.o board.o clan.o \
comm.o const.o db.o fight.o fist.o handler.o interp.o mazoku.o magic.o \
mem.o mob_commands.o mob_prog.o olc.o olc_act.o olc_save.o patryn.o \
quest.o saiyan.o save.o special.o soldier.o sorcerer.o string.o suit.o \
update.o

chaosium: $(O_FILES)
rm -f chaosium
$(CC) $(L_FLAGS) -o chaosium $(O_FILES)

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

clean:
rm -f *.o chaosium



—————————————————————-
make
gcc -c -O -Wall -g act_comm.c
act_comm.c: In function ‘do_suicide’:
act_comm.c:1791: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result
act_comm.c:1793: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result
gcc -c -O -Wall -g act_info.c
act_info.c: In function ‘do_finger’:
act_info.c:2820: warning: ‘kills[3]’ may be used uninitialized in this function
act_info.c:2820: warning: ‘kills[2]’ may be used uninitialized in this function
gcc -c -O -Wall -g act_move.c
act_move.c: In function ‘do_humiliate’:
act_move.c:2282: warning: comparison with string literal results in unspecified behavior
act_move.c: In function ‘do_train’:
act_move.c:995: warning: ‘scost[1]’ may be used uninitialized in this function
act_move.c:995: warning: ‘scost[2]’ may be used uninitialized in this function
act_move.c:995: warning: ‘scost[3]’ may be used uninitialized in this function
gcc -c -O -Wall -g act_obj.c
gcc -c -O -Wall -g act_wiz.c
act_wiz.c: In function ‘copyover’:
act_wiz.c:3640: warning: reading through null pointer (argument 8)
gcc -c -O -Wall -g bit.c
gcc -c -O -Wall -g board.c
gcc -c -O -Wall -g clan.c
gcc -c -O -Wall -g comm.c
comm.c: In function ‘new_descriptor’:
comm.c:882: warning: pointer targets in passing argument 3 of ‘getsockname’ differ in signedness
comm.c:883: warning: pointer targets in passing argument 3 of ‘accept’ differ in signedness
comm.c:925: warning: pointer targets in passing argument 3 of ‘getpeername’ differ in signedness
comm.c: In function ‘bust_a_prompt’:
comm.c:1722: warning: format not a string literal and no format arguments
comm.c:1985:10: warning: missing terminating " character
comm.c: In function ‘nanny’:
comm.c:1985: error: missing terminating " character
comm.c:1986: error: ‘characters’ undeclared (first use in this function)
comm.c:1986: error: (Each undeclared identifier is reported only once
comm.c:1986: error: for each function it appears in.)
comm.c:1986: error: expected ‘)’ before ‘create’
comm.c:1986: error: stray ‘\’ in program
comm.c:1986: error: stray ‘\’ in program
comm.c:1986: error: stray ‘@’ in program
comm.c:1987: error: stray ‘\’ in program
comm.c:1987: error: stray ‘\’ in program
comm.c:1987: error: stray ‘\’ in program
comm.c:1987: error: stray ‘\’ in program
comm.c:1987:44: warning: missing terminating " character
comm.c:1987: error: missing terminating " character
comm.c:1990: error: too few arguments to function ‘write_to_buffer’
comm.c:1990: error: expected ‘;’ before ‘}’ token
comm.c:2253: warning: format not a string literal and no format arguments
make: *** [comm.o] Error 1


I was able to remove the comm.c:1985 error by condensing a statement to one line instead of being split up. Essentially it was:
write_to_buffer( d,
"Due to the large number of fuckheads using your ISP,\n\rusers may not create new
characters. To create a new character,\n\r email Alathon at chaosium@voyager.inetsolve.com
with the desired\n\rusername and class.\n\r", 0 );


So now the make reads out:
make
gcc -c -O -Wall -g comm.c
comm.c: In function ‘new_descriptor’:
comm.c:882: warning: pointer targets in passing argument 3 of ‘getsockname’ differ in signedness
comm.c:883: warning: pointer targets in passing argument 3 of ‘accept’ differ in signedness
comm.c:925: warning: pointer targets in passing argument 3 of ‘getpeername’ differ in signedness
comm.c: In function ‘bust_a_prompt’:
comm.c:1722: warning: format not a string literal and no format arguments
comm.c: In function ‘nanny’:
comm.c:2250: warning: format not a string literal and no format arguments
gcc -c -O -Wall -g const.c
gcc -c -O -Wall -g db.c
db.c: In function ‘copyover_recover’:
db.c:3476: warning: ignoring return value of ‘fscanf’, declared with attribute warn_unused_result
gcc -c -O -Wall -g fight.c
gcc -c -O -Wall -g fist.c
gcc -c -O -Wall -g handler.c
gcc -c -O -Wall -g interp.c
interp.c:1672:50: warning: trigraph ??' ignored, use -trigraphs to enable
interp.c:1673:50: warning: trigraph ??' ignored, use -trigraphs to enable
interp.c:1674:55: warning: trigraph ??' ignored, use -trigraphs to enable
interp.c:1675:56: warning: trigraph ??' ignored, use -trigraphs to enable
interp.c:1676:56: warning: trigraph ??' ignored, use -trigraphs to enable
gcc -c -O -Wall -g mazoku.c
gcc -c -O -Wall -g magic.c
gcc -c -O -Wall -g mem.c
gcc -c -O -Wall -g mob_commands.c
gcc -c -O -Wall -g mob_prog.c
mob_prog.c: In function ‘mprog_do_ifchck’:
mob_prog.c:354: warning: overflow in implicit constant conversion
mob_prog.c:356: warning: overflow in implicit constant conversion
mob_prog.c:359: warning: overflow in implicit constant conversion
mob_prog.c:362: warning: overflow in implicit constant conversion
mob_prog.c: In function ‘mprog_process_if’:
mob_prog.c:936: warning: function returns address of local variable
mob_prog.c:948: warning: function returns address of local variable
mob_prog.c:957: warning: function returns address of local variable
mob_prog.c:973: warning: function returns address of local variable
mob_prog.c:980: warning: function returns address of local variable
mob_prog.c:995: warning: function returns address of local variable
mob_prog.c:1009: warning: function returns address of local variable
mob_prog.c:1025: warning: function returns address of local variable
mob_prog.c:1040: warning: function returns address of local variable
mob_prog.c:1053: warning: function returns address of local variable
mob_prog.c:1063: warning: function returns address of local variable
mob_prog.c:1066: warning: function returns address of local variable
mob_prog.c:1078: warning: function returns address of local variable
gcc -c -O -Wall -g olc.c
gcc -c -O -Wall -g olc_act.c
gcc -c -O -Wall -g olc_save.c
gcc -c -O -Wall -g patryn.c
gcc -c -O -Wall -g quest.c
gcc -c -O -Wall -g saiyan.c
gcc -c -O -Wall -g save.c
save.c: In function ‘save_char_obj’:
save.c:122: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result
save.c: In function ‘write_finger’:
save.c:161: warning: format not a string literal and no format arguments
save.c: In function ‘fwrite_finger’:
save.c:197: warning: format not a string literal and no format arguments
save.c:203: warning: format not a string literal and no format arguments
save.c: In function ‘load_char_obj’:
save.c:651: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result
gcc -c -O -Wall -g special.c
gcc -c -O -Wall -g soldier.c
gcc -c -O -Wall -g sorcerer.c
gcc -c -O -Wall -g string.c
In function ‘strncat’,
inlined from ‘string_add’ at string.c:184:
/usr/include/bits/string3.h:153: warning: call to __builtin___strncat_chk might overflow destination buffer
gcc -c -O -Wall -g suit.c
gcc -c -O -Wall -g update.c
update.c: In function ‘save_wholist’:
update.c:1685: warning: format not a string literal and no format arguments
update.c: In function ‘save_llboards’:
update.c:1727: warning: format not a string literal and no format arguments
update.c:1749: warning: format not a string literal and no format arguments
update.c: In function ‘save_clanboard’:
update.c:1791: warning: format not a string literal and no format arguments
rm -f chaosium
gcc -O -g -o chaosium act_comm.o act_info.o act_move.o act_obj.o act_wiz.o bit.o board.o clan.o comm.o const.o db.o fight.o fist.o handler.o interp.o mazoku.o magic.o mem.o mob_commands.o mob_prog.o olc.o olc_act.o olc_save.o patryn.o quest.o saiyan.o save.o special.o soldier.o sorcerer.o string.o suit.o update.o
fist.o: In function `do_master':
/home/jarl/SC/src/fist.c:820: undefined reference to `pow'
/home/jarl/SC/src/fist.c:821: undefined reference to `pow'
/home/jarl/SC/src/fist.c:822: undefined reference to `pow'
/home/jarl/SC/src/fist.c:823: undefined reference to `pow'
/home/jarl/SC/src/fist.c:824: undefined reference to `pow'
fist.o:/home/jarl/SC/src/fist.c:825: more undefined references to `pow' follow
collect2: ld returned 1 exit status
make: *** [chaosium] Error 1



Any insight into this would be appreciated. Thank you.
14 Aug, 2009, David Haley wrote in the 2nd comment:
Votes: 0
/home/jarl/SC/src/fist.c:822: undefined reference to `pow'

Add -lm to your linker flags.

The rest are fairly routine cleanups; most of them are due to poor or otherwise sloppy programming practices. You can probably get away with ignoring them, though, although it would be better to fix them one way or another.
Random Picks
0.0/2