|
1. Error compiling EotS code in Cygwin
|
|
Sun Jul 1, 2012 [6:57 AM]
|
Calium
Email not supplied
member since: May 19, 2002
|
Reply
|
|
Finally, after 8 years of searching, I finally got my grubby little hands on the Eye of the Storm codebase. Unfortunately, my attempts to run a test-run of the game on Cygwin on a Windows 7 platform before I purchase server space has ran into a series of errors that I'm at a loss how to fix. I do the following using Cygwin:
Brian@BrianPC ~ $ cd eots
Brian@BrianPC ~/eots $ cd src
Brian@BrianPC ~/eots/src $ ls act_clan.c bit.c handler.c multiclass.c save.c act_comm.c chat_act.c hedit.h newbie.c scan.c act_comm.o chat_new.c id.c nohup.out special.c act_info.c chatmode.h identdst obj_flags startup act_info.o colors.h interp.c olc.c string.c act_move.c comm.c libdmalloc.a olc.h t_prog.c act_move.o const.c libdmalloclp.a olc_act.c track.c act_obj.c db.c magic.c olc_save.c update.c act_obj.o deathxp.c Makefile old.h vset.arena act_room.c DiffHelp.txt mem.c ore_prog.c war.c act_wiz.c dmalloc.h mem.txt quest.c zapfiles.c act_wiz.o fight.c merc.h raceskill.c astat.txt globe_prt.c mob_commands.c random_obj.c autom4te.cache gr_magic.c mob_prog.c remort.c
Brian@BrianPC ~/eots/src $ make gcc-3 -c -c -O -Wall -g3 comm.c comm.c: In function `new_descriptor': comm.c:1149: warning: implicit declaration of function `check_ban' comm.c: In function `read_from_buffer': comm.c:1403: warning: array subscript has type `char' comm.c: In function `nanny': comm.c:2061: warning: array subscript has type `char' comm.c:2205: warning: implicit declaration of function `check_newban' comm.c:2224: warning: implicit declaration of function `crypt' comm.c:2224: warning: passing arg 1 of `strcmp' makes pointer from integer without a cast comm.c:2288: warning: assignment makes pointer from integer without a cast comm.c:2311: warning: passing arg 1 of `strcmp' makes pointer from integer without a cast comm.c: In function `check_parse_name': comm.c:3124: warning: array subscript has type `char' comm.c: In function `show_string': comm.c:3448: warning: array subscript has type `char' comm.c: At top level: comm.c:3757: error: conflicting types for 'check_ban' comm.c:1149: error: previous implicit declaration of 'check_ban' was here comm.c:3817: error: conflicting types for 'check_newban' comm.c:2205: error: previous implicit declaration of 'check_newban' was here Makefile:32: recipe for target `comm.o' failed make: *** [comm.o] Error 1 Brian@BrianPC ~/eots/src
---
Anyone have any idea on what is happening? Is there a way to read a file (e.g. comm.c) using Cygwin and/or have Cygwin mark each line. I'd like to figure out what's on line 2205 (Clearly there's an error there) but it's not clear on how I can do that. I've settled using Word and having it count the lines but I'm not sure if that's the best method.
Also! I can purchase server space which is cheap but how much do Coders normally charge to "code" a game?
Thanks a bunch guys.
Brian
|
|
|
|
|
2. RE: Error compiling EotS code in Cygwin
|
|
Sun Jul 1, 2012 [8:20 AM]
|
dentin
soda@xirr.com
member since: Aug 21, 2008
|
In Reply To
Reply
|
That error is due to type differences in the headers and the actual function declaration. Probably the first thing you should consider doing is to ditch Word and find a real editor. Perhaps download and learn VIM; Word isn't a code editor, and it's like hammering nails with a shoe. You can find VPS nodes pretty much anywhere for cheap. As an example, take a look at http://www.bluemilecloud.com. I'm sure you could find even cheaper providers, but make sure you do your own backups in that case. As for programmers, find a volunteer. Real programmers cost a lot, quite possibly more than you make, and good ones are remarkably rare. -dentin Alter Aeon MUD http://www.alteraeon.com
|
|
|
|
|
3. RE: Error compiling EotS code in Cygwin
|
|
Sun Jul 1, 2012 [10:57 AM]
|
Tyche
Email not supplied
member since: Apr 4, 2000
|
In Reply To
Reply
|
|
Finally, after 8 years of searching, I finally got my grubby little hands on the Eye of the Storm codebase.
It was difficult to find because the author requested it be removed from distribution.
|
|
|
|
|
4. RE: Error compiling EotS code in Cygwin
|
|
Sun Jul 1, 2012 [1:52 PM]
|
Calium
Email not supplied
member since: May 19, 2002
|
In Reply To
Reply
|
|
Thank you for your help. I've downloaded VIM and played around with it and feel that I'm pretty much out of my breadth. If I'm going to go hire a coder, should I go ahead and purchase mud hosting space? Or should I find one, get the code fixed, and then purchase the space? Any advice would be appreciated.
Thanks.
(Comment added by Calium on Sun Jul 1 13:53:32 2012)
|
|
|
|
|
5. RE: Error compiling EotS code in Cygwin
|
|
Sun Jul 1, 2012 [4:41 PM]
|
nosty
Email not supplied
member since: Dec 12, 2000
|
In Reply To
Reply
|
|
if you could I'd recommend going a step further from cygwin and going with a full virtual box setup with a genuine linux to do your stuff with initially. With that sort of setup you can open ports even for someone to log in through say ssh directly to that linux VM and work on the mud among other advantages like portability.
As for the code part, fraid your best hope is to learn it yourself. Btw personally I find vi/vim to be rather cryptic editors with a far steeper learning curve. Try out nano/pico in linux or notepad++ under windows if you're going to keep editing the files there.
Very very worst case: That codebase probably compiled 'fine' under a much older GCC compiler, if you purposely picked a much older version of a linux distro you could probably get it running in a real pinch. I would really recommend just getting the code fixed up to more modern standards instead though, there's reasons why the compiler your using is rejecting that stuff.
(Comment added by nosty on Sun Jul 1 17:17:15 2012)
Btw for a bit of specific advice and since I saw your other post: Those implicit declarations are basically saying you've got functions being called prior to them being defined, and then there's also those lines about the mismatches which is the compiler saying that the function's arguments and/or return weren't what it was expecting. You fix all this by ensuring the functions are mentioned within a header file, adding those things like check_ban into say merc.h or some other header (.hs) before they get used somewhere else will resolve them.
(Comment added by nosty on Sun Jul 1 17:37:31 2012)
PPS: Oh hah right, even easier is just remove the -Wall from the compile arguments, its in the makefile. -Wall is what's warning you about all these issues. Again this is a really short-term solution to get something up and running and you really should fix these things properly but that should work as a stop-gap.
|
|
|
|
|
6. RE: Error compiling EotS code in Cygwin
|
|
Sun Jul 1, 2012 [8:38 PM]
|
Calium
Email not supplied
member since: May 19, 2002
|
In Reply To
Reply
|
|
Thank you. That helped tremendously. It ignores the errors and I get this at the end:
Building Entropy of the Soul II rm -f envy lcrypt -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 magic.o save.o special.o update.o remort.o bit.o mem.o olc.o olc_act.o olc_save.o string.o mob_commands.o mob_prog.o gr_magic.o id.o chat_new.o interp.o war.o random_obj.o chat_act.o ore_prog.o quest.o raceskill.o act_room.o track.o scan.o make: lcrypt: Command not found Makefile:20: recipe for target `envy' failed make: [envy] Error 127 (ignored) Done.
That looks like it's done but shouldn't this had generated an executable file for me to run the game? I tried looking in the bin files and no go. Any idea what I can do?
(Comment added by Calium on Sun Jul 1 20:52:58 2012)
This is the altered makefile in all it's glory. I removed a bunch of variables in the CC and WARN so that it'd be compilable. I can post the unaltered if anyone is interested.
CC = PROF = OPTOMIZ = -O2 -DNOCRYPT DEBUG = -g3 WARN = #C_FLAGS = $(PROF) $(OPTOMIZ) $(WARN) $(DEBUG) C_FLAGS = #L_FLAGS = -static -g -lcrypt L_FLAGS = SYSTEM =
O_FILES = 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 magic.o save.o special.o update.o remort.o \ bit.o mem.o olc.o olc_act.o olc_save.o string.o mob_commands.o \ mob_prog.o gr_magic.o id.o chat_new.o interp.o war.o random_obj.o \ chat_act.o ore_prog.o quest.o raceskill.o act_room.o track.o scan.o
envy: $(O_FILES) # @echo "." @echo "[1;35mBuilding Entropy of the [1;31mSoul [1;32mII[0;37m" rm -f envy $(CC) $(L_FLAGS) -o envy $(O_FILES) @echo "Done."
clean: rm -f *.o rm -f envy make
.c.o: merc.h # @echo -n "." $(CC) -c $(C_FLAGS) $(SYSTEM) $<
1234: # @echo "." @echo "Updating envy on 1234." # rm -f /home/kjodo/EotS/src/envy cp -f envy /home/kjodo/EotS/src @echo "Done."
2222: # @echo "." @echo "Updating envy on 2222." # rm -f /home/kjodo/EOSBUILD/src/envy cp -f envy /home/kjodo/EOSBUILD/src @echo "Done."
port: # make make 1234 make 2222
|
|
|
|
|
7. RE: Error compiling EotS code in Cygwin
|
|
Sun Jul 1, 2012 [8:51 PM]
|
nosty
Email not supplied
member since: Dec 12, 2000
|
In Reply To
Reply
|
|
Aye it was almost done but it needs the encryption library to finish it off (passwords in pfiles are encrypted using it), this is unfortunately where I don't know how you'd do that with a cygwin (haven't used it), but essentially you need the crypt package that it belongs to installed in a fashion that the compiler can call it and use it.
(Comment added by nosty on Mon Jul 2 7:24:33 2012)
Or again with the other suggestions as a stop-gap you could strip out the references to encryption (in comm.c where the incoming player is putting in the character's password) and in save.c where its loading & saving the password of a character. Then you could remove the need for the crypt library and that call in the Makefile. But yah I think those are the only spots within such a codebase that use encryption.
Again: I don't recommend doing this as a permanent fix, the better solution is figuring out how to get the package that contains lcrypt installed within your cygwin linux, or shifting to a genuine linux platform and doing it on there via its native package manager.
|
|
|
|
|
8. RE: Error compiling EotS code in Cygwin
|
|
Mon Jul 2, 2012 [10:12 AM]
|
dentin
soda@xirr.com
member since: Aug 21, 2008
|
In Reply To
Reply
|
I agree with Nosty, in that once you get a handle on the codebase, you should turn all the warnings back on and get it cleaned up. Here are the flags I currently use, for reference: -ansi -Wall -W -Wfloat-equal -Wundef -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wformat -Wstrict-aliasing -Wuninitialized -Waggregate-return -Wsign-promo -Wdisabled-optimization -Wsynth -Wredundant-decls -Wwrite-strings -Woverloaded-virtual -Wparentheses -Wno-unused-parameter Some of these are C++ specific, but honestly using the C++ compiler mode is probably better anyway, since it'll fail to link if you've got bad header declarations. Also, it would really be a good idea to follow up on the comment that the original author of the codebase wanted it removed from distribution. Odds are good no-one will stop you if you really want to use it, but it's pretty rude to use a codebase against the author's wishes. -dentin Alter Aeon MUD http://www.alteraeon.com
|
|
|
|
|
9. RE: Error compiling EotS code in Cygwin
|
|
Mon Jul 2, 2012 [2:00 PM]
|
Calium
dhidow@aol.com
member since: May 19, 2002
|
In Reply To
Reply
|
|
Well, you're right but I figure 17 years is a good statue of limitations. Frankly, I'd be happy to run it as a ROM and play in my own sandbox. IMO, it's pretty moot discussion because (1) my inability to fix the compile errors (2) inability to to get a coder to shore up the code. Goes to show you that money can buy you the code but it can't buy you a coder. Despite my initial enthusiasm that I might be able to get this off the ground, I'm thinking that this code (and the putative MUD thereof) isn't going anywhere.
|
|
|
|
|
10. RE: Error compiling EotS code in Cygwin
|
|
Tue Jul 3, 2012 [10:06 AM]
|
dentin
soda@xirr.com
member since: Aug 21, 2008
|
In Reply To
Reply
|
Money can buy you coders; it just takes a lot of it. As for the statute of limitations, it doesn't apply to copyright. Copyright expires at 75+ years after date of publication in most first world countries, meaning you've got at least 58 years left before it enters the public domain. -dentin Alter Aeon MUD http://www.alteraeon.com
|
|
|
|
|