Alrighty, so, I am attempting to convert my laptop to a linux mud server, and I'm using the SWRiP code (1.1 or so), and after figuring out why make wouldn't work on it (didn't have the GCC stuff installed), I've managed to get it to work partially.
However, after trying the make command again, it made it to act_move.c, where it displayed the following:
Quote:
gcc -c -g3 -Wall -DREQUESTS act_move.c
act_move.c: In function 'generate_exit':
act_move.c:606: error: invalid lvalue in assignment
make[1]: *** [act_move.o] Error 1
make[1]: Leaving directory '/home/James/Desktop/releaserip/src'
make: *** [all] Error 2
I would attach a copy of the file, but I don't know how, so if you think you can help, I can send you a copy of it.
I got it fixed, thanks. I had to remove the stuff in the brackets and place an * before the pexit. Now, I gotta figure out which code I want to base my mud off of. So far, it may be FotE.
I dont understand what you are saying ive tried to highlight copy ive tried to control and use the arrow keys to copy so could ya give me instructions on how to copy...sry for being so uneducated but the only way i will learn is to ask questions
make swrip
make[1]: Entering directory `/cygdrive/c/Phobos/swrip200/src'
g++ -c -g3 -Wall -DMCCP act_wiz.c
act_wiz.c: In function `void do_form_password(CHAR_DATA*, char*)':
act_wiz.c:4973: error: `crypt' undeclared (first use this function)
act_wiz.c:4973: error: (Each undeclared identifier is reported only once for eac
h function it appears in.)
make[1]: *** [act_wiz.o] Error 1
make[1]: Leaving directory `/cygdrive/c/Phobos/swrip200/src'
make: *** [all] Error 2
ok thats what im getting now and ive tried to go to act_wiz.c and incert the #include<cyrpt>
Ok i see that someone says to make a folder named that but i don't want to mess anything up by putting extra files in so can you tell me if its correct or not please
I've checked the forum and cant find a fix to this error
save.c: In function `void load_corpses()':
save.c:2158: error: cannot convert `dirent*' to `direct*' in assignment
save.c:2160: error: invalid use of undefined type `struct direct'
save.c:2145: error: forward declaration of `struct direct'
save.c:2162: error: invalid use of undefined type `struct direct'
save.c:2145: error: forward declaration of `struct direct'
make[1]: *** [save.o] Error 1
make[1]: Leaving directory `/cygdrive/c/Phobos/swrip200/src'
make: *** [all] Error 2
ive looked for the cant convert one and cant find it so if you could direct me in the direction i need to go to find the answer since i cant find it or help me with posting the answer to one or more of the above errors i would be greatfull.
OMG that helped alot but after compiling several other files i got this massive file so much that looking at it makes me want to go have a smoke because it looks like so much work...so heres the message..
/cygdrive/c/Phobos/swrip200/src/act_info.c:3409: undefined reference to `_crypt'
act_wiz.o: In function `_Z16do_form_passwordP9char_dataPc':
/cygdrive/c/Phobos/swrip200/src/act_wiz.c:4973: undefined reference to `_crypt'
build.o: In function `_Z7do_msetP9char_dataPc':
/cygdrive/c/Phobos/swrip200/src/build.c:1656: undefined reference to `_crypt'
comm.o: In function `_Z19write_to_descriptoriPci':
/cygdrive/c/Phobos/swrip200/src/comm.c:1462: undefined reference to `_deflate'
comm.o: In function `_Z5nannyP15descriptor_dataPc':
/cygdrive/c/Phobos/swrip200/src/comm.c:1732: undefined reference to `_crypt'
/cygdrive/c/Phobos/swrip200/src/comm.c:1821: undefined reference to `_crypt'
/cygdrive/c/Phobos/swrip200/src/comm.c:1842: undefined reference to `_crypt'
comm.o: In function `_Z13compressStartP15descriptor_datah':
/cygdrive/c/Phobos/swrip200/src/comm.c:3837: undefined reference to `_deflateIni
t_'
comm.o: In function `_Z11compressEndP15descriptor_data':
/cygdrive/c/Phobos/swrip200/src/comm.c:3869: undefined reference to `_deflate'
/cygdrive/c/Phobos/swrip200/src/comm.c:3875: undefined reference to `_deflateEnd
'
misc.o: In function `_Z10do_suicideP9char_dataPc':
/cygdrive/c/Phobos/swrip200/src/misc.c:3000: undefined reference to `_crypt'
collect2: ld returned 1 exit status
make[1]: *** [swrip] Error 1
make[1]: Leaving directory `/cygdrive/c/Phobos/swrip200/src'
make: *** [all] Error 2
crazy right i know ok well if you can help that would be great im not sure if you can direct me somewhere i will try searching the forum for each single one if you arnt able to help but im posting this hoping you can help and i dont have to search for like all night to try and find some answers...thanks alot
You really have two major problems here, one is "crypt", the other is "deflate" and its variants. Search the forum for crypt, that one comes up a lot, and deflate is part of the zlib library. Search for deflate or zlib.
Ok i see that all of my deflate error are in comm.c but i cant find anything helpfull searching the forum i see theres a couple things on deflate but they all say the same thing and non of them apply to the 2.0 swr smaug i have set up so if someone could post with something a little more swr oriented i would be greatfull
~ill be trying to fix the crypt probs as i wait for an answer on the deflate prob~
Install the zlib library files. This problem has nothing to do with SWR in specific and everything to do with knowing how to set up a development environment. You are missing library files; you need to install them. If you are using Cygwin, use Cygwin's setup program. If you are using Linux, use your distribution's package installer to get them. (apt-get under Debian-based systems; yum under Fedora.)
/cygdrive/c/Phobos/swrip200/src/act_info.c:3409: undefined reference to `_crypt'
act_wiz.o: In function `_Z16do_form_passwordP9char_dataPc':
/cygdrive/c/Phobos/swrip200/src/act_wiz.c:4973: undefined reference to `_crypt'
build.o: In function `_Z7do_msetP9char_dataPc':
/cygdrive/c/Phobos/swrip200/src/build.c:1656: undefined reference to `_crypt'
comm.o: In function `_Z19write_to_descriptoriPci':
/cygdrive/c/Phobos/swrip200/src/comm.c:1462: undefined reference to `_deflate'
comm.o: In function `_Z5nannyP15descriptor_dataPc':
/cygdrive/c/Phobos/swrip200/src/comm.c:1732: undefined reference to `_crypt'
/cygdrive/c/Phobos/swrip200/src/comm.c:1821: undefined reference to `_crypt'
/cygdrive/c/Phobos/swrip200/src/comm.c:1842: undefined reference to `_crypt'
comm.o: In function `_Z13compressStartP15descriptor_datah':
/cygdrive/c/Phobos/swrip200/src/comm.c:3837: undefined reference to `_deflateIni
t_'
comm.o: In function `_Z11compressEndP15descriptor_data':
/cygdrive/c/Phobos/swrip200/src/comm.c:3869: undefined reference to `_deflate'
/cygdrive/c/Phobos/swrip200/src/comm.c:3875: undefined reference to `_deflateEnd
'
misc.o: In function `_Z10do_suicideP9char_dataPc':
/cygdrive/c/Phobos/swrip200/src/misc.c:3000: undefined reference to `_crypt'
collect2: ld returned 1 exit status
make[1]: *** [swrip] Error 1
make[1]: Leaving directory `/cygdrive/c/phobos/swrip200/src'
make: *** [all] Error 2
so if you have anything else you or anyone else might think will help im more then open for suggestions...seeing that im clueless. :(
You might need to get the "development files" version of the library; it might be called zlib-dev or something like that. See if Cygwin has one of those; if so install it. And if it doesn't, you should search the forums for cygwin zlib, because this has come up several times over the years.
Ok i checked the forum for it after i checked cygwin for the development files and i checked for anything relating to it in cygwin and didn't find anything so if anyone has any other suggestions i am open to trying just about anything
Ok i downloaded zlib off a source site and extracted it to the src in my code and make clean but i havent been ablt to get ride of any of the error message
I'm not sure if im installing the file right so if anyone could help me with remote assistance or something so i can get this compiled this is being a pain in the neck. Restating error message...
trivia.o -lm
act_info.o: In function `_Z11do_passwordP9char_dataPc':
/cygdrive/c/phobos/swrip200/src/act_info.c:3392: undefined reference to `_crypt'
/cygdrive/c/phobos/swrip200/src/act_info.c:3409: undefined reference to `_crypt'
act_wiz.o: In function `_Z16do_form_passwordP9char_dataPc':
/cygdrive/c/phobos/swrip200/src/act_wiz.c:4973: undefined reference to `_crypt'
build.o: In function `_Z7do_msetP9char_dataPc':
/cygdrive/c/phobos/swrip200/src/build.c:1656: undefined reference to `_crypt'
comm.o: In function `_Z19write_to_descriptoriPci':
/cygdrive/c/phobos/swrip200/src/comm.c:1462: undefined reference to `_deflate'
comm.o: In function `_Z5nannyP15descriptor_dataPc':
/cygdrive/c/phobos/swrip200/src/comm.c:1732: undefined reference to `_crypt'
/cygdrive/c/phobos/swrip200/src/comm.c:1821: undefined reference to `_crypt'
/cygdrive/c/phobos/swrip200/src/comm.c:1842: undefined reference to `_crypt'
comm.o: In function `_Z13compressStartP15descriptor_datah':
/cygdrive/c/phobos/swrip200/src/comm.c:3837: undefined reference to `_deflateIni
t_'
comm.o: In function `_Z11compressEndP15descriptor_data':
/cygdrive/c/phobos/swrip200/src/comm.c:3869: undefined reference to `_deflate'
/cygdrive/c/phobos/swrip200/src/comm.c:3875: undefined reference to `_deflateEnd
'
misc.o: In function `_Z10do_suicideP9char_dataPc':
/cygdrive/c/phobos/swrip200/src/misc.c:3000: undefined reference to `_crypt'
collect2: ld returned 1 exit status
make[1]: *** [swrip] Error 1
make[1]: Leaving directory `/cygdrive/c/phobos/swrip200/src'
make: *** [all] Error 2
[1]+ Exit 127 ./startup
It looks like you haven't done the crypt fix. It's all over the forums; you'll be able to find it easily. You should try doing that to get rid of the crypt errors.
(It's also a comment in the Makefile, if I remember correctly, at least for the FUSS makefiles. You might want to look there too.)
Ok well i have fixed the crypt files before by putting in
#include <crypt.h>
at the top of the files that
/cygdrive/c/phobos/swrip200/src/comm.c:1842: undefined reference to `_crypt'
this apears in a couple files in different lines so if theres something more then #include <crypt.h> i need to put in please let me know so i can get rid of these crypt errors so the error will be less and easier to look at and break down.
You need to either install the libcrypt library from Cygwin, if such a thing exists, and then add "-lcrypt" to your linker flags; or, disable the crypt function which is suggested in several forum posts.
Ok i downloaded zlib off a source site and extracted it to the src in my code and make clean but i havent been ablt to get ride of any of the error message
Did you do what I suggested about "extern C"? Since you don't get an error message about not finding the z library I don't think the lack of installation is the problem.
I have not done the C thing because you said replace the zlib with extern c zlib or whatever it was and i couldnt find anything in the files saying zlib to modify or replace
You should read what Nick suggested again more carefully, he told you to change the part of the file that includes zlib.h. If you can't find it, you should use a search utility such as grep or whatever you use to search in files. ('man grep')
I have used <control f> to use the find command and searched for zlib.h in all the files and zlib without the .h on it and came up with nothing in searching every file in the src folder
/***************************************************************************
* STAR WARS REALITY 1.0 *
*--------------------------------------------------------------------------*
* Star Wars Reality Code Additions and changes from the Smaug Code *
* copyright (c) 1997, 1998 by Sean Cooper *
* -------------------------------------------------------------------------*
* Starwars and Starwars Names copyright (c) Lucasfilm Ltd. *
*--------------------------------------------------------------------------*
* SMAUG 1.0 (C) 1994, 1995, 1996 by Derek Snider *
* SMAUG code team: Thoric, Altrag, Blodkai, Narn, Haus, *
* Scryn, Rennard, Swordbearer, Gorog, Grishnakh and Tricops *
* ------------------------------------------------------------------------ *
* Merc 2.1 Diku Mud improvments copyright (C) 1992, 1993 by Michael *
* Chastain, Michael Quan, and Mitchell Tse. *
* Original Diku Mud copyright (C) 1990, 1991 by Sebastian Hammer, *
* Michael Seifert, Hans Henrik St{rfeldt, Tom Madsen, and Katja Nyboe. *
* ------------------------------------------------------------------------ *
* Main mud header file *
****************************************************************************/
#include <stdlib.h>
#include <limits.h>
#include <sys/cdefs.h>
#include <sys/time.h>
#include <math.h>
#include <stdio.h>
#ifdef MCCP
#include <zlib.h>
#endif
I was suggesting changing that line to:
extern "C" {
#include <zlib.h>
}
Quote:
I have used <control f> to use the find command and searched for zlib.h in all the files and zlib without the .h on it and came up with nothing in searching every file in the src folder
I don't understand how that could happen, the reference was right there. In fact, mud.h is the first file I would normally look in, as that is included into most other files.
(The reason I suggested *.* was because I wasn't sure if all source files were .c and .h, since g++ is in the picture here. I wasn't sure that it would be clear to grep over source files, so in doubt I suggested *.*...)
I am not sure what you are doing, but I just installed Cygwin on this PC, downloaded swripv200.tar.gz and compiled it OK (and ran it) after making some minor changes. Here they are:
After changing those lines (the above is a diff file, but you can see the file names and line numbers if you want to do it manually), I typed "make" and got this:
I did not in the beginning thought zlib is installed now and i have make clean and maid then the messages left after everyones help is this...
/cygdrive/c/phobos/swrip200/src/act_info.c:3393: undefined reference to `_crypt'
/cygdrive/c/phobos/swrip200/src/act_info.c:3410: undefined reference to `_crypt'
act_wiz.o: In function `_Z16do_form_passwordP9char_dataPc':
/cygdrive/c/phobos/swrip200/src/act_wiz.c:4973: undefined reference to `_crypt'
build.o: In function `_Z7do_msetP9char_dataPc':
/cygdrive/c/phobos/swrip200/src/build.c:1656: undefined reference to `_crypt'
comm.o: In function `_Z19write_to_descriptoriPci':
/cygdrive/c/phobos/swrip200/src/comm.c:1462: undefined reference to `_deflate'
comm.o: In function `_Z5nannyP15descriptor_dataPc':
/cygdrive/c/phobos/swrip200/src/comm.c:1732: undefined reference to `_crypt'
/cygdrive/c/phobos/swrip200/src/comm.c:1821: undefined reference to `_crypt'
/cygdrive/c/phobos/swrip200/src/comm.c:1842: undefined reference to `_crypt'
comm.o: In function `_Z13compressStartP15descriptor_datah':
/cygdrive/c/phobos/swrip200/src/comm.c:3837: undefined reference to `_deflateIni
t_'
comm.o: In function `_Z11compressEndP15descriptor_data':
/cygdrive/c/phobos/swrip200/src/comm.c:3869: undefined reference to `_deflate'
/cygdrive/c/phobos/swrip200/src/comm.c:3875: undefined reference to `_deflateEnd
'
misc.o: In function `_Z10do_suicideP9char_dataPc':
/cygdrive/c/phobos/swrip200/src/misc.c:3000: undefined reference to `_crypt'
collect2: ld returned 1 exit status
make[1]: *** [swrip] Error 1
make[1]: Leaving directory `/cygdrive/c/phobos/swrip200/src'
make: *** [all] Error 2
so im not sure where to go from here everyones asked me the same questions over and over and i have posted several time what i have done and i am not trying to sound like im not appreshiating what everyone is doing for me but i have been told to not post things over and over even in a topic so if theres confusion on what i have done please read over the whole topic i know theres 4 pages but most of it is repeditive so it wont take long that way we can try to move forword.
I can reproduce your problem if I turn MCCP support on, and am investigating this. Meanwhile, for a clean compile, disable MCCP, by editing the Makefile:
#Uncomment the next line if you want MCCP support
#DBUGFLG = -DMCCP <--- comment out MCCP support
is what i have i took out the -lcrypt -lz
and im left with
L_FLAGS = $(PROF)
The second change gcc $(L_FLAGS) -o swrip $(O_FILES) -lm
i could not find this line in the makefile so im not sure what you would like me to do about that but i changed the first one
CC = g++
PROF =
#NOCRYPT = -DNOCRYPT
#Uncomment the next line if you want MCCP support
#DBUGFLG = -DMCCP
C_FLAGS = -g3 -Wall $(PROF) $(NOCRYPT) $(DBUGFLG)
L_FLAGS = $(PROF)
Omg im so happy!!! that fixed those errors now i need to fix the crypt parts i have put the #include <crypt.h> in the files to try and fix them but after doing that i still have these ones left
act_info.o: In function `_Z11do_passwordP9char_dataPc':
/cygdrive/c/phobos/swrip200/src/act_info.c:3393: undefined reference to `_crypt'
/cygdrive/c/phobos/swrip200/src/act_info.c:3410: undefined reference to `_crypt'
act_wiz.o: In function `_Z16do_form_passwordP9char_dataPc':
/cygdrive/c/phobos/swrip200/src/act_wiz.c:4973: undefined reference to `_crypt'
build.o: In function `_Z7do_msetP9char_dataPc':
/cygdrive/c/phobos/swrip200/src/build.c:1656: undefined reference to `_crypt'
comm.o: In function `_Z5nannyP15descriptor_dataPc':
/cygdrive/c/phobos/swrip200/src/comm.c:1732: undefined reference to `_crypt'
comm.o:/cygdrive/c/phobos/swrip200/src/comm.c:1821: more undefined references to
`_crypt' follow
collect2: ld returned 1 exit status
make[1]: *** [swrip] Error 1
make[1]: Leaving directory `/cygdrive/c/phobos/swrip200/src'
make: *** [all] Error 2
so i thank you a ton for helping me fix the big problem now if you wouldn't mind also helping me with this i would be greatfull
Ok the errors are gone now what do i do i thought i was suppose to do ./startup & but it says bash: ./startup: No such file or directory so im not sure what to do since its compiled how do i start it
so if anyone can help me i'd apreshiate it also how would i change the authorization so i can make myself an immy without having to graduate the academt because the mobprog is messed up and the child wont give me the luke action figure
As for making yourself an imm, you can edit your pfile to set your level to 65. But the game might come with an imm character already; check the docs. (SmaugFUSS 1.8 for instance comes with an 'Admin' character.)
Ok reading that leaves me with more questions then i started with but i havent changed anything and i guess that means it is just unexpected behavior so if anyone knows how i would narrow this problem down because im not getting anything in gdb please help!
It goes a bit beyond the scope of what we can offer here, to tease out of you every last bit of information, to assist in such crashes.
Quote:
... i was in the academy trying to get the doll ...
What doll? I haven't played SWRIP myself, so I have no idea what this refers to.
Quote:
... i had a crash ...
What sort of crash? What was the error message?
Quote:
... im not getting anything in gdb ...
Not getting anything? Did you run it under gdb? Did you reproduce the crash? If so, did you see any useful error messages? When I ran under gdb I saw something along these lines:
$ gdb ../bin/swrip.exe
GNU gdb 6.5.50.20060706-cvs (cygwin-special)
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i686-pc-cygwin"...
(gdb) run
Starting program: /home/Owner/swrip200_modified/bin/swrip.exe
Loaded symbols for /cygdrive/c/WINDOWS/system32/ntdll.dll
Loaded symbols for /cygdrive/c/WINDOWS/system32/kernel32.dll
Loaded symbols for /usr/bin/cygwin1.dll
Loaded symbols for /cygdrive/c/WINDOWS/system32/advapi32.dll
Loaded symbols for /cygdrive/c/WINDOWS/system32/rpcrt4.dll
Loaded symbols for /usr/bin/cygz.dll
Fri Nov 2 10:42:42 2007 :: PID: 2576
Fri Nov 2 10:42:42 2007 :: Booting Database
... rest of booting messages ...
You really need to try to help yourself. A message like "I got a crash, please help" is so vague we can't actually help you at all.
I want to point out that these code bases are not professionally supported. The coders of them have tailored them to suit themselves, and they have very kindly made them publicly available. The general idea is that, if you want to run one yourself, you should have some basic programming and Unix knowledge. Otherwise you are going to get very frustrated.
$ gdb ../bin/swrip.exe
GNU gdb 6.5.50.20060706-cvs (cygwin-special)
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i686-pc-cygwin"...../bin/swrip.exe: No such file or
directory.
(gdb) run
Starting program:
No executable specified, use `target exec'.
(gdb)
i have tried gdb ../bin/swrip.exe and it wont show the file so im not sure how i would get gdb to open it and show me what has happen so i can narrow down what caused the crash
You have decided to not follow my suggestions, and then you post a message about how it doesn't work. I previously posted (on an earlier page now) this:
Quote:
You need to be in the area directory. This is how I got it to work - after compiling.
$ cd ../area
$ ../bin/swrip.exe
That is, you change to the area directory, and then by typing "../bin/swrip.exe" you run the program, which is in a different directory. If you wanted to debug, you just add "gdb" to the start of the line, like this:
Ok thank you now I'm seeking the file that the authorization would be, There is a mobprogram in the newbie academy that is not working so i can't graduate the academy and the profile for a player is not made untill you graduate so i cant make myself an immortal how would i go about changing the authorization so it authorizes my pfile without having to go through the academy like making it authorize me in the first room in the academy so i can advance myself to immortal and fix the mobprog in the game instead of having to do it in the area files
"How do I get players to go through the beginner training area?"
In your case, you need to do the opposite, which is to set the "Waitforauth" setting to zero.
Can you please start a new thread if you are asking a completely different question? This is really nothing to do with "SWRiP Make error" or "Compiling the server".