01 Sep, 2006, oosie wrote in the 1st comment:
Votes: 0
More than a decade ago I came across various MUDs during my time at the university. I thought it would be fun to try it out again! I downloaded EnvyMUD 2.0 and 2.2 and tried to build them on my Fedora Core 4 machine. However for both versions I'm running into the following problem:

[root@localhost src]# make
gcc -c -O -Wall -g act_comm.c
gcc -c -O -Wall -g act_info.c
gcc -c -O -Wall -g act_move.c
act_move.c: In function move_char:
act_move.c:230: warning: suggest explicit braces to avoid ambiguous else
gcc -c -O -Wall -g act_obj.c
gcc -c -O -Wall -g act_wiz.c
act_wiz.c: In function do_sset:
act_wiz.c:2296: warning: suggest explicit braces to avoid ambiguous else
gcc -c -O -Wall -g comm.c
comm.c:161: error: conflicting types for accept
/usr/include/sys/socket.h:210: error: previous declaration of accept was here
comm.c:162: error: conflicting types for bind
/usr/include/sys/socket.h:111: error: previous declaration of bind was here
comm.c:164: error: conflicting types for getpeername
/usr/include/sys/socket.h:129: error: previous declaration of getpeername was here
comm.c:165: error: conflicting types for getsockname
/usr/include/sys/socket.h:115: error: previous declaration of getsockname was here
make: *** [comm.o] Error 1


With my limited C-skills I'm able to get rid of the warnings, but that isn't the problem. How do I get rid off the errors and have a build as result?

Thanks in advance,
Jack…
01 Sep, 2006, Tyche wrote in the 2nd comment:
Votes: 0
Remove the prototypes for accept, bind, getpeername, getsockname, etc. in comm.c as they are already pulled in with the system headers.
05 Sep, 2006, oosie wrote in the 3rd comment:
Votes: 0
Thanks for the help so far!

Ok, I commented out the mentioned lines in comm.c (161, 162, 164 & 164), ran "make clean" and then "make" again. It seems to get a bit further, with some warnings, but I still get an error in the end:

[root@localhost src]# make
gcc -c -O -Wall -g act_comm.c
gcc -c -O -Wall -g act_info.c
gcc -c -O -Wall -g act_move.c
gcc -c -O -Wall -g act_obj.c
gcc -c -O -Wall -g act_wiz.c
gcc -c -O -Wall -g comm.c
comm.c: In function new_descriptor:
comm.c:869: warning: pointer targets in passing argument 3 of getsockname differ in signedness
comm.c:870: warning: pointer targets in passing argument 3 of accept differ in signedness
comm.c:913: warning: pointer targets in passing argument 3 of getpeername differ in signedness
gcc -c -O -Wall -g const.c
gcc -c -O -Wall -g db.c
gcc -c -O -Wall -g fight.c
gcc -c -O -Wall -g handler.c
gcc -c -O -Wall -g interp.c
interp.c:436:50: warning: trigraph ??' ignored, use -trigraphs to enable
interp.c:437:50: warning: trigraph ??' ignored, use -trigraphs to enable
interp.c:438:55: warning: trigraph ??' ignored, use -trigraphs to enable
interp.c:439:56: warning: trigraph ??' ignored, use -trigraphs to enable
interp.c:440:56: warning: trigraph ??' ignored, use -trigraphs to enable
gcc -c -O -Wall -g magic.c
gcc -c -O -Wall -g save.c
gcc -c -O -Wall -g special.c
gcc -c -O -Wall -g update.c
rm -f envy
gcc -O -o envy act_comm.o act_info.o act_move.o act_obj.o act_wiz.o comm.o const.o db.o fight.o handler.o interp.o magic.o save.o special.o update.o
act_info.o(.text+0x3dc0): In function `do_password':
/usr/local/envy/src/act_info.c:1996: undefined reference to `crypt'
act_info.o(.text+0x3e44):/usr/local/envy/src/act_info.c:2013: undefined reference to `crypt'
comm.o(.text+0x17a7): In function `nanny':
/usr/local/envy/src/comm.c:1624: undefined reference to `crypt'
comm.o(.text+0x19aa):/usr/local/envy/src/comm.c:1683: undefined reference to `crypt'
comm.o(.text+0x1a56):/usr/local/envy/src/comm.c:1706: undefined reference to `crypt'
collect2: ld returned 1 exit status
make: *** [envy] Error 1


Can you help me a bit further?

Thanks in advance,
Jack…
05 Sep, 2006, Tyche wrote in the 4th comment:
Votes: 0
In your make file add the crypt library to the link step:
$(CC) $(L_FLAGS) -o envy $(O_FILES)

should be..
$(CC) $(L_FLAGS) -o envy $(O_FILES) -lcrypt
11 Sep, 2006, oosie wrote in the 5th comment:
Votes: 0
Thanks for your help, Tyche!

Everything seems to work now, and I'm able to play it once again!

It's my own fault by the way… I didn't read the whole README file (dumb me!):
If you have problems with crypt, add to the NOCRYPT line in your Makefile
-DNOCRYPT.

I still get the warning messages, but I guess they don't cause any problems, right? Or is there an easy way to get rid off them as well?

Just one final question: if I want to upgrade from EnvyMUD 2.0 to 2.2, can I just copy the player files from 2.0 into the new 2.2?

Thanks again!
Jack…
12 Sep, 2006, Tyche wrote in the 6th comment:
Votes: 0
Quote
If you have problems with crypt, add to the NOCRYPT line in your Makefile
-DNOCRYPT.


Well I wouldn't. Bears on your player file question. If you turn crypt on at a later point all your existing players won't be able to log in. Storing passwords in plain text on a public mud host is just asking for trouble.

People tend to use the same password on multiple muds and sometimes for other things. While that's not advisable, it's frankly just something that people will do. I always use encryption as not only can your mud server be compromised, but players accounts on other services (other muds, email hosts, etc.) Do them a favor.
0.0/6