12 Apr, 2007, LuckyIam wrote in the 1st comment:
Votes: 0
i have spent the last 2 days trying to get silly to run on cygwin

The first time i compled it, it spit a ton of log errors at me and a few strdup conflit messages. I spent hours going through each file and deleting all log and strdup arguements i can find and i actually got it to compile but when i go to run the server it starts loading each area then stops at "Last Area" with no apparent error message…it just stops


ive recently decided that maybe going through each file and deleting all arguements that give errors isnt the best solution so ive decided to fix the problem rather then deleting it, but the lack of sillymud support online makes it very hard for someone with a basic knowledge of C and linux, but if anyone here can help that would be great

ive played on sillymuds for years but for some reason its the only codebase i never got to work…so im rather determined

here are my errors from a fresh untar


$ make
gcc -g -DIMPL_SECURITY -DNEW_RENT -DLEVEL_LOSS -DNEWEXP -DGRO
URITY -DNEW_RENT -DLEVEL_LOSS -DNEWEXP -DGROUP_NAMES -c -o c
In file included from comm.c:21:
protos.h:21: error: conflicting types for 'strdup'
protos.h:21: error: conflicting types for 'strdup'
comm.c: In function `main':
comm.c:133: error: incompatible type for argument 1 of `log'
comm.c:141: error: incompatible type for argument 1 of `log'
comm.c:147: error: incompatible type for argument 1 of `log'
comm.c:152: error: incompatible type for argument 1 of `log'
comm.c:171: error: incompatible type for argument 1 of `log'
comm.c:179: error: incompatible type for argument 1 of `log'
comm.c: In function `run_the_game':
comm.c:226: error: incompatible type for argument 1 of `log'
comm.c:229: error: incompatible type for argument 1 of `log'
comm.c:234: error: incompatible type for argument 1 of `log'
comm.c:240: error: incompatible type for argument 1 of `log'
comm.c:249: error: incompatible type for argument 1 of `log'
comm.c:253: error: incompatible type for argument 1 of `log'
comm.c: In function `game_loop':
comm.c:287: warning: passing arg 2 of `gettimeofday' from inc
ype
comm.c:340: warning: passing arg 2 of `gettimeofday' from inc
ype
comm.c: In function `write_to_q':
comm.c:630: error: incompatible type for argument 1 of `log'
comm.c:637: error: incompatible type for argument 1 of `log'
comm.c: In function `init_socket':
comm.c:747: warning: passing arg 2 of `bind' from incompatibl
comm.c:747: error: too many arguments to function `bind'
comm.c:771:8: macro names must be identifiers
comm.c: In function `printhost':
comm.c:809: warning: passing arg 1 of `gethostbyaddr' from in
type
comm.c:810: warning: assignment discards qualifiers from poin
comm.c: In function `printhostaddr':
comm.c:828: warning: passing arg 1 of `gethostbyaddr' from in
type
comm.c:829: warning: assignment discards qualifiers from poin
comm.c: In function `new_descriptor':
comm.c:881: warning: passing arg 2 of `strncpy' makes pointer
ut a cast
comm.c: In function `process_input':
comm.c:1002: error: incompatible type for argument 1 of `log'
comm.c: In function `close_sockets':
comm.c:1083: error: incompatible type for argument 1 of `log'
comm.c: In function `close_socket':
comm.c:1124: error: incompatible type for argument 1 of `log'
comm.c:1141: error: incompatible type for argument 1 of `log'
comm.c:1146: error: incompatible type for argument 1 of `log'
comm.c: In function `coma':
comm.c:1239: error: incompatible type for argument 1 of `log'
comm.c:1258: error: incompatible type for argument 1 of `log'
comm.c:1271: error: incompatible type for argument 1 of `log'
comm.c:1277: error: incompatible type for argument 1 of `log'
comm.c: In function `act':
comm.c:1524: error: incompatible type for argument 1 of `log'
comm.c:1525: error: incompatible type for argument 1 of `log'
12 Apr, 2007, Conner wrote in the 2nd comment:
Votes: 0
Not that I'm that likely to be of much help with this, but perhaps with the extra info others could be of more help so I'll ask, could you show us the code from 'log' and from the sections (or if they're all the same, one of them) in comm.c that are producing these errors? Maybe the code around line 21 of proto.h too?
12 Apr, 2007, LuckyIam wrote in the 3rd comment:
Votes: 0
sure thing




from comm.c


while ((pos < argc) && (*(argv[pos]) == '-')) {
switch (*(argv[pos] + 1)) {
case 'l':
lawful = 1;
log("Lawful mode selected.");
break;
case 'd':
if (*(argv[pos] + 2))
dir = argv[pos] + 2;
else if (++pos < argc)
dir = argv[pos];
else {
log("Directory arg expected after option -d.");

*the log entries are pretty much the same as dikumud (which compiles fine) from what i see


from protos.h


void slog(char *str);

*closest thing i can find to log in protos.h


from utilitiy.c



void log (char *s) { log_sev(s, 1); } /*thought this was a prototype - heheh */



void slog(char *str)
{
long ct;
char *tmstr;

ct = time(0);
tmstr = asctime(localtime(&ct));
*(tmstr + strlen(tmstr) - 1) = '\0';
fprintf(stderr, "%s :: %s\n", tmstr, str);

}







hope that helps
12 Apr, 2007, LuckyIam wrote in the 4th comment:
Votes: 0
ohh wait i think i see the problem


i think maybe slog is suppose to be log…also in:
void log (char *s) { log_sev(s, 1); } /*thought this was a prototype - heheh */

i went ahead and added tr to *s to make *str
12 Apr, 2007, LuckyIam wrote in the 5th comment:
Votes: 0
meh…haha now im getting the following errors



gcc -g -DIMPL_SECURITY -DNEW_RENT -DLEVEL_LOSS -DNEWEXP -DGROUP_NAMES -DIMPL_SEC
URITY -DNEW_RENT -DLEVEL_LOSS -DNEWEXP -DGROUP_NAMES -c -o comm.o comm.c
In file included from comm.c:21:
protos.h:21: error: conflicting types for 'strdup'
protos.h:21: error: conflicting types for 'strdup'
protos.h:1784: warning: conflicting types for built-in function 'log'
comm.c: In function `game_loop':
comm.c:287: warning: passing arg 2 of `gettimeofday' from incompatible pointer t
ype
comm.c:340: warning: passing arg 2 of `gettimeofday' from incompatible pointer t
ype
comm.c: In function `init_socket':
comm.c:747: warning: passing arg 2 of `bind' from incompatible pointer type
comm.c:747: error: too many arguments to function `bind'
comm.c:771:8: macro names must be identifiers
comm.c: In function `printhost':
comm.c:809: warning: passing arg 1 of `gethostbyaddr' from incompatible pointer
type
comm.c:810: warning: assignment discards qualifiers from pointer target type
comm.c: In function `printhostaddr':
comm.c:828: warning: passing arg 1 of `gethostbyaddr' from incompatible pointer
type
comm.c:829: warning: assignment discards qualifiers from pointer target type
comm.c: In function `new_descriptor':
comm.c:881: warning: passing arg 2 of `strncpy' makes pointer from integer witho
ut a cast
make: *** [comm.o] Error 1


maybe someone can help with that one ?
12 Apr, 2007, Conner wrote in the 6th comment:
Votes: 0
I think the protos.h issues are probably just reflections of the problem in comm.c (i.e., the problem's in comm.c not protos.h), though the line 1784 in protos.h appears to be trying to use log in a way that's counter to what's built-in for C, although it's very possible that these may still just be symptoms of the problems in comm.c as well.
Let's see, regarding the other errors…
In comm.c on lines 287, 340, 809, and 828, it appears from the compiler warnings, that you're passing a number where it's expecting a string or vice versa.. perhaps you've got %d there and it should be %ld?
In comm.c on line 829, this one make go away if you fix the line before it.
In comm.c on line 881 and protos.h on line 21, you might find that these go away if you get the gethostbyaddr and gettimeofday complaints too.
In comm.c on line 747 & the one on line 771.8 (?) if those don't go away from fixing the others, you may be beyond my help, but there are plenty of other folk here who are quite capable with code.. or, in any event, I'm not coming up with anything helpful for that error at the moment. *shrug*
If any of the above helps, awesome! If not, well… others here are welcome to come point and snicker, provided they offer some attempt to be useful too. :tongue:
13 Apr, 2007, Guest wrote in the 7th comment:
Votes: 0
Wow. Sillymud. I haven't seen anyone take an interest in that since Crystal Shard closed down years ago. Assuming you got this here…..

protos.h, line 21:
char *strdup(char *source);


That no longer needs to be there as pretty much all modern systems including Cygwin define strdup.

Quote
comm.c: In function `act':
comm.c:1524: error: incompatible type for argument 1 of `log'
comm.c:1525: error: incompatible type for argument 1 of `log'


This can be solved by adding -fno-builtin to the CPPFLAGS option line in the makefile. That will eliminate a fairly large amount of your compiler spam.

Quote
comm.c:287: warning: passing argument 2 of 'gettimeofday' from incompatible pointer type

gettimeofday(&last_time, (struct timeval *) 0);


The gettimeofday call should look like:
gettimeofday(&last_time, NULL);
and should be similarly changed elsewhere if the second argument wants a zero value.

Quote
comm.c:747: error: too many arguments to function 'bind'

if (bind(s, &sa, sizeof(sa), 0) < 0)


Should probably look like:
if( bind( s, ( struct sockaddr * )&sa, sizeof( sa ) ) == -1 )


Quote
comm.c:881: warning: passing argument 2 of 'strncpy' makes pointer from integer without a cast

if ((long) strncpy(newd->host, inet_ntoa(sock.sin_addr), 49) > 0)


Should probably be:
if ((long) strncpy(newd->host, (char*)inet_ntoa(sock.sin_addr), 49) > 0)


This otta get you a bit closer. Some of the other stuff I'll need more time to figure out myself. Sillymud is a decent codebase once you get past some of its quirks. I'll probably upload a gcc4 updated version once I'm done trying to get this thing compiled.
13 Apr, 2007, Conner wrote in the 8th comment:
Votes: 0
So all his issues were basically GCC4 compatibility?
13 Apr, 2007, Guest wrote in the 9th comment:
Votes: 0
Can't really tell you just yet. I've only just begun and the "warning: cast to pointer from integer of different size" is bugging me since I can't really see what the problem is. It allows it to continue compiling though, so we'll just have to wait and see.
13 Apr, 2007, LuckyIam wrote in the 10th comment:
Votes: 0
thanks alot

i actually got it to compile this morning before reading any of your answers by pretty much butchering the lines i was having problems with

i forgot exaclty what i did but i had to mess with the log function alot and i deleted the strdup


id actually rather compile a src that i didnt delete alot of thigns i probably shouldnt have deleted, so im very much interested in your solutions still so keep me posted


im going to untar a fresh package and try your fixes


again…thank you very much
13 Apr, 2007, LuckyIam wrote in the 11th comment:
Votes: 0
on a side note:

anyone contributing to this post will be pretty much writing the ONLY compile help on the entire internet…believe me..ive scoured it


probably explains the dwindling sillymud codebase and lack of (if any) derivatives


the end of that line lol
13 Apr, 2007, Zeno wrote in the 12th comment:
Votes: 0
No, I've seen plenty of compiling help. Such as:
http://www.gammon.com.au/smaug/howtocomp...
13 Apr, 2007, LuckyIam wrote in the 13th comment:
Votes: 0
thats for smaug..and its just basic instructions


i was referring to silly mud and more of troubleshooting problems
13 Apr, 2007, Zeno wrote in the 14th comment:
Votes: 0
Ah, you didn't mention you were looking for Silly MUD specific compiling help. I just figured you couldn't find any compiling help in general.
20 Apr, 2007, Guest wrote in the 15th comment:
Votes: 0
Sillymud is pretty obscure, but in the end code is code. It's just a matter of figuring out what gcc wants from it when you're trying to compile it. Weird errors are always interesting stuff.
20 Apr, 2007, Conner wrote in the 16th comment:
Votes: 0
That's exactly the principle I was working with when I tried to help out at the beginning of this thread. I'd heard of Sillymud before but never seen it, but I've dealt with GCC errors before. This is also probably why Samson had to come in and take over helping out, but at least I could be of some small help with part of the problems. :wink:
13 Mar, 2008, Draun wrote in the 17th comment:
Votes: 0
Sorry to bump an old thread, but did anyone make anymore progress on SillyMud? I've been tinkering with it off and on for a while, and I never seem to make any real progress.
15 May, 2009, jamez wrote in the 18th comment:
Votes: 0
Checking the dates on this thread I'm not sure if anyone still has an interest in Silly. However i'll share what i've found and also have a few questions if anyone has found out anything new. I managed to get silly compiled, still figuring out how the scripts work. The bootscript is trying to add my username to the begining of the path for the directories it uses, but since I am on a VPS my username is not the dir I am using. I've just started compiling this earlier today so am still figuring things out about the code. Also was trying to run without the script by doing ./dmserver 4444 just to logon real quick and check out a few things, but it doesn't seem to want to run without the script. I get the following

Thu May 14 21:00:13 2009 :: Running game on port 4444.
Thu May 14 21:00:13 2009 :: Using .. as data directory.
Thu May 14 21:00:13 2009 :: Signal trapping.
Thu May 14 21:00:13 2009 :: Opening mother connection.
Thu May 14 21:00:13 2009 :: Boot db – BEGIN.
Thu May 14 21:00:13 2009 :: Resetting the game time:
Thu May 14 21:00:13 2009 :: Current Gametime: 11H 27D 13M 637Y.
Thu May 14 21:00:13 2009 :: Reading newsfile, credits, help-page, info and motd.
file-to-string: No such file or directory
file-to-string: No such file or directory
file-to-string: No such file or directory
file-to-string: No such file or directory
file-to-string: No such file or directory
file-to-string: No such file or directory
file-to-string: No such file or directory
file-to-string: No such file or directory
Thu May 14 21:00:13 2009 :: Initializing Script Files.
Thu May 14 21:00:13 2009 :: Unable to open file "scripts.dat".
Thu May 14 21:00:13 2009 :: Opening mobile, object and help files.
boot: No such file or directory

I could not find the boot file it is looking for. Nor did I see a scripts.dat file. Do I need these files?
18 Nov, 2009, Elervan wrote in the 19th comment:
Votes: 0
Sorry to bump this again, but I've got a working version for cygwin. So if anyone tries using this codebase and runs into a issue just bump the thread and I'll respond.
0.0/19