Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ SMAUG
➜ Compiling the server
➜ Problem Compiling SWR
It is now over 60 days since the last post. This thread is closed.
Refresh page
Pages: 1 2
| Posted by
| Riley Mccoy
Australia (10 posts) Bio
|
| Date
| Sun 12 May 2002 03:54 AM (UTC) |
| Message
| Ok so here my third attempt at getting this right.
So i've tried various SWR codes,yet i keep running into the same problem most people have and posted here,but i haven't and won't give up.
I'm using Cygwin,finally figured out how to use it,after forgetting 2 files<G>,got that sorted out.so now i try to compile this file from here swl http://pballgi.com/swl.rar
All goes well until i Make,and i end up getting this error message
$ make
make swreality
make[1]: Entering directory `/home/kristy/swl/swr/dist/src'
rm -f swreality
gcc -o swreality act_comm.o act_info.o act_move.o act_obj.o act_wiz.o boards.o
build.o clans.o comm.o comments.o const.o db.o fight.o handler.o hashstr.o id.o
interp.o magic.o makeobjs.o misc.o mud_comm.o mud_prog.o player.o requests.o res
et.o save.o shops.o skills.o special.o tables.o track.o update.o space.o bounty.
o swskills.o -lm -lcrypt
/usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-5/../../../../i686-pc-cygwin/bin/ld: cann
ot find -lcrypt
collect2: ld returned 1 exit status
make[1]: *** [swreality] Error 1
make[1]: Leaving directory `/home/kristy/swl/swr/dist/src'
make: *** [all] Error 2
All i want is SWR to work,thats all,i like the whole idea of SMAUG,and the combination of SWR.
I'd be happy if i can get a working version of any SWR. I've been up the last oh 12 hours trying to get it to work,i got SWR1.0 to work then it crashed,afew times,i couldn't add areas,change skills,without it having a hissy fit.And i aint going to bed until i get it fixed and running and running.Any help would be greatful! And i'll be buying AreaEditor and Mushclient,both excellent.
Keep up the Good work! Long live the Aussies <G> | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #1 on Sun 12 May 2002 05:55 AM (UTC) |
| Message
| It's a rather big download, as he seems, bizarrely, to have left in all the .o files from his compilation. That just makes the download bigger for no real gain.
Anyway, do this ...
- Edit 'makefile' and change the NOCRYPT line to read:
NOCRYPT = -DNOCRYPT
Also change the line:
chmod g+w swreality
to
chmod g+w swreality.exe
- Edit the file 'fight.c' and comment out the include for dir.h, like this:
// #include <sys/dir.h>
- Edit the file 'save.c' and change the line:
#include <sys/dir.h>
to
#include <dirent.h>
Also change line 2143 from:
struct direct *de;
to
struct dirent *de;
(Change the "c" to a "n").
- Type "make clean" to get rid of the old .o files.
- Type "make".
It should then compile and link OK. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #2 on Sun 12 May 2002 05:59 AM (UTC) |
| Message
| There seem to be a whole lot of warnings about SPELL_ACTION being redefined. Just as well, as the original definition in mud.h looks strangely incomplete ...
#define SPELL_ACTION(skill) ( ((skill)->fla \
{ \
if ( (ch)->substate == SUB_RESTRICTED ) \
{ \
send_to_char( "You cannot use this command from within another command.\n\r",
ch ); \
return; \
} \
} while(0)
You could probably delete those lines, they don't seem to achieve much, other than generate warnings. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Riley Mccoy
Australia (10 posts) Bio
|
| Date
| Reply #3 on Sun 12 May 2002 06:35 AM (UTC) |
| Message
| Well that didn't work at all.....and i followed to the T and it still didn't work. Man i must be doing something wrong. Everything goes alright,until the end,the Bang!
Ayhow heres the error message,once again
gcc -o swreality act_comm.o act_info.o act_move.o act_obj.o act_wiz.o boards.o
build.o clans.o comm.o comments.o const.o db.o fight.o handler.o hashstr.o id.o
interp.o magic.o makeobjs.o misc.o mud_comm.o mud_prog.o player.o requests.o res
et.o save.o shops.o skills.o special.o tables.o track.o update.o space.o bounty.
o swskills.o -lm -lcrypt
/usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-5/../../../../i686-pc-cygwin/bin/ld: cann
ot find -lcrypt
collect2: ld returned 1 exit status
make[1]: *** [swreality] Error 1
make[1]: Leaving directory `/home/kristy/swl/swr/dist/src'
make: *** [all] Error 2
man i can't figure it out
Thanks for your help,and no i havent given up
Riley | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #4 on Sun 12 May 2002 06:50 AM (UTC) |
| Message
| In makefile, change the line:
rm -f swreality
to
rm -f swreality.exe
And (more importantly) change:
$(CC) $(L_FLAGS) -o swreality $(O_FILES) -lm -lcrypt
to
$(CC) $(L_FLAGS) -o swreality $(O_FILES) -lm
In other words, get rid of the reference to library "crypt", which you obviously don't have. :)
If you do that, it should link OK. ;) |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Riley Mccoy
Australia (10 posts) Bio
|
| Date
| Reply #5 on Sun 12 May 2002 06:52 AM (UTC) |
| Message
| ok i tried compiling SWRIP, seeing what was wrong with that,all went well till this error
gcc -c -g3 -Wall -DNOCRYPT -DREQUESTS mud_comm.c
gcc -c -g3 -Wall -DNOCRYPT -DREQUESTS mud_prog.c
gcc -c -g3 -Wall -DNOCRYPT -DREQUESTS newarena.c
gcc -c -g3 -Wall -DNOCRYPT -DREQUESTS player.c
gcc -c -g3 -Wall -DNOCRYPT -DREQUESTS requests.c
gcc -c -g3 -Wall -DNOCRYPT -DREQUESTS reset.c
gcc -c -g3 -Wall -DNOCRYPT -DREQUESTS save.c
save.c: In function `load_char_obj':
save.c:966: warning: suggest explicit braces to avoid ambiguous `else'
save.c: In function `load_corpses':
save.c:2145: warning: assignment from incompatible pointer type
save.c:2147: dereferencing pointer to incomplete type
save.c:2149: dereferencing pointer to incomplete type
make[1]: *** [save.o] Error 1
make[1]: Leaving directory `/home/kristy/swrip/src'
make: *** [all] Error 2
And i honestly thought it was gonna work that time,am i asking for too much to have a SWR that i can actually compile? or am i a Star Wars Nut? Anyhow i still havent given up.
I will not give up!
Thanks for all your help
Riley | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #6 on Sun 12 May 2002 06:52 AM (UTC) |
| Message
| You should have a file:
/usr/lib/libcrypt.a
If not, that is why you got the link errors. You might want to investigate that. Perhaps you didn't install the crypt component of Cygwin? |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Riley Mccoy
Australia (10 posts) Bio
|
| Date
| Reply #7 on Sun 12 May 2002 08:48 AM (UTC) Amended on Sun 12 May 2002 08:51 AM (UTC) by Riley Mccoy
|
| Message
| Arrrrrggggggghhhhhhhh!
Ok i'm getting really close to tossing my PC out the Window,that or placing a sign up..Will pay good money for SWRIP working on my PC.Either SWRIP or SWL,both are what i'm after. So now i'm getting this error message.
$ make
make swrip
make[1]: Entering directory `/home/kristy/swrip/src'
gcc -c -g3 -Wall -DREQUESTS act_comm.c
gcc: installation problem, cannot exec `cpp0': No such file or directory
make[1]: *** [act_comm.o] Error 1
make[1]: Leaving directory `/home/kristy/swrip/src'
make: *** [all] Error 2
I'm going bonkers here, and yes its 28 hours straight,all so i can get this working....Please Please Help, i didnt have that last file,got it now..it compiled it it,then went nuts,started it up,went thru the whole thing,then bang,gone again.
Thanks for the patience Nick
Riley | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #8 on Sun 12 May 2002 09:32 PM (UTC) |
| Message
| Hang on Riley, you have now changed the ground here.
My earlier suggestion, for SWL, should have worked. You had a clean compile, and the only problem was linking against a library (crypt) that you didn't have.
By changing the makefile, you didn't need that library, so all you have to do is go back to SWL, change the makefile to remove the -lcrypt reference, and it should work OK.
Whatever you did recently, to give the cpp0 error, has now corrupted your Cygwin install.
If you can't get it to work any other way, I suggest ...
1. Remove Cygwin
2. Reinstall, including compilers etc.
3. Redo the steps for SWL as described below
Oh yes, and ...
0. Get some sleep first. :) |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Riley Mccoy
Australia (10 posts) Bio
|
| Date
| Reply #9 on Mon 13 May 2002 04:12 AM (UTC) |
| Message
| Yaaaaaaaaa! Throws a huge party! Thanks so much for all your help Nick! it worked.
As you can see here
rm -f swreality.exe
gcc -o swreality act_comm.o act_info.o act_move.o act_obj.o act_wiz.o boards.o
build.o clans.o comm.o comments.o const.o db.o fight.o handler.o hashstr.o id.o
interp.o magic.o makeobjs.o misc.o mud_comm.o mud_prog.o player.o requests.o res
et.o save.o shops.o skills.o special.o tables.o track.o update.o space.o bounty.
o swskills.o -lm
chmod g+w swreality.exe
chmod g+w act_comm.o act_info.o act_move.o act_obj.o act_wiz.o boards.o build.o
clans.o comm.o comments.o const.o db.o fight.o handler.o hashstr.o id.o interp.o
magic.o makeobjs.o misc.o mud_comm.o mud_prog.o player.o requests.o reset.o sav
e.o shops.o skills.o special.o tables.o track.o update.o space.o bounty.o swskil
ls.o
make[1]: Leaving directory `/home/kristy/swr/dist/src'
Ok now that i finally got it to compile,what do i do now,lile lastime i tried it,it went funny. So how do i run it without it having a hissy fit.The SWReality.exe is in the SRC Dir,where its meant to be,i hope thats where its meant to be. Now what?
And thanks again for all your help nick.
Riley | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #10 on Mon 13 May 2002 04:34 AM (UTC) |
| Message
| Ah yes, what next?
The first thing I would do is change to the area directory, and run it ...
cd ../area
../src/swreality.exe
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Riley Mccoy
Australia (10 posts) Bio
|
| Date
| Reply #11 on Mon 13 May 2002 04:50 AM (UTC) |
| Message
| ok now i've run into this
Resetting: eze.are
Resetting: latty.are
Resetting: mechis3.are
Resetting: krrugr.are
Resetting: mon_cal.are
Resetting: land.vehicles
Resetting: karnt2.are
Resetting: hawkins.are
Resetting: naboo.are
Resetting: ezekiel.are
Mon May 13 14:49:28 2002 :: Initializing socket
Init_socket: bind: errno EADDRNOTAVAIL triggered
So how do i fix that?
Riley | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #12 on Mon 13 May 2002 06:37 AM (UTC) |
| Message
| OK, let's look at a bit of debugging technique ...
The error message suggests that there is problem initialising the socket (ie. TCP/IP) with the error "address not available" (guessing here). It was generated by the routine "bind".
Mon May 13 14:49:28 2002 :: Initializing socket
Init_socket: bind: errno EADDRNOTAVAIL triggered
Search for "bind" to see where that might be ...
$ grep bind *.c
comm.c: if ( bind( fd, (struct sockaddr *) &sa, sizeof(sa) ) == -1 )
comm.c: perror( "Init_socket: bind" );
OK, it's in comm.c. Edit that and look for the word 'bind' ...
inet_aton("216.162.171.220", &sa.sin_addr);
if ( bind( fd, (struct sockaddr *) &sa, sizeof(sa) ) == -1 )
Hmm - one line before "bind" is a reference to a specific IP address - "216.162.171.220". I am deeply suspicious of this line, a hard-coded IP address is hardly going to work for everybody, and is probably why you got "address not available. Comment it out ...
//inet_aton("216.162.171.220", &sa.sin_addr);
Type "make" to rebuild, and try again ...
Resetting: eze.are
Resetting: latty.are
Resetting: mechis3.are
Resetting: krrugr.are
Resetting: mon_cal.are
Resetting: land.vehicles
Resetting: karnt2.are
Resetting: hawkins.are
Resetting: naboo.are
Resetting: ezekiel.are
Mon May 13 16:35:54 2002 :: Initializing socket
Mon May 13 16:35:54 2002 :: Star Wars Reality ready on port 4000.
There you are! Working. :) |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Riley Mccoy
Australia (10 posts) Bio
|
| Date
| Reply #13 on Mon 13 May 2002 07:13 AM (UTC) |
| Message
| Nick you are a Legend,great patience,very helpful,man alot of thanks go out to you!
While i was waiting for a response to my post, i decided to fiddle with SWRIP,kill the time,that or throw my PC out the window,anyhow spent about 10 or 15 mins, typed make,and Bang it starts to compile,next thing i started it up and it working,perfectly!
I will however finish fixing SWL, but for the meantime,i'm taking a break and playing SWRIP,it'll do for the meantime.
28 hours i did straight,nuts comes to mind! Then slept most of the day away<G>
Anyhow keep up the great work Nick,and thanks again!
Riley | | Top |
|
| Posted by
| Riley Mccoy
Australia (10 posts) Bio
|
| Date
| Reply #14 on Mon 13 May 2002 09:25 AM (UTC) Amended on Mon 13 May 2002 09:26 AM (UTC) by Riley Mccoy
|
| Message
| Ok,things are working fine,not sure if this is a server or coding error. The game runs well, afew minor things,but this one error is driving me nuts,hopefully you might be able to help,anyhow here it is...
Mon May 13 19:18:01 2002 :: [*****] BUG: Load_ship_file: # not found.
Mon May 13 19:18:01 2002 :: [*****] BUG: Load_ship_file: # not found.
Mon May 13 19:18:01 2002 :: [*****] BUG: Load_ship_file: # not found.
Mon May 13 19:18:01 2002 :: [*****] BUG: Load_ship_file: # not found.
Mon May 13 19:18:01 2002 :: [*****] BUG: Cannot load ship file: coruscant.shuttl
e
Mon May 13 19:18:01 2002 :: [*****] BUG: Load_ship_file: # not found.
Mon May 13 19:18:01 2002 :: Done ships
Mon May 13 19:18:01 2002 :: Loading bounties
Mon May 13 19:18:01 2002 :: Loading disintigrations...
Mon May 13 19:18:01 2002 :: Done bounties
Mon May 13 19:18:01 2002 :: Loading governments
Mon May 13 19:18:01 2002 :: Loading planets...
Mon May 13 19:18:01 2002 :: $
Mon May 13 19:18:01 2002 :: Done planets
Mon May 13 19:18:01 2002 :: Resetting areas
Resetting: limbo.are
Resetting: newacad.are
Resetting: space.are
Mon May 13 19:18:01 2002 :: [*****] BUG: Equip_char: already equipped (16).
Resetting: omni_complex
The part i'm talking about is mainly Load_ship_file errors.
It has me totally stumped. Theres another major error,but forgot to copy it,i'll do that shortly.Basically thats the ship from the Academy to the Space area.
Anyhow thanks
Riley | | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
55,779 views.
This is page 1, subject is 2 pages long: 1 2
It is now over 60 days since the last post. This thread is closed.
Refresh page
top