Register forum user name Search FAQ

Gammon Forum

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 ➜ ROM ➜ Compiling the server ➜ Compiling Icy Depths

Compiling Icy Depths

It is now over 60 days since the last post. This thread is closed.     Refresh page


Pages: 1 2  

Posted by Lumpei   (6 posts)  Bio
Date Fri 05 Mar 2004 10:14 PM (UTC)
Message
Greetings, All!

First, let me say how much I am learning from reading these forums. Nick, don't know who you are, but I appreciate how helpful you are to all of us.

So. I am trying to compile the iceydepths codebase (which is a derivative of anatolia). Here is the Makefile:

#
# $Id: Makefile,v 1.42 1998/12/29 16:47:57 fjoe Exp $
#
CC = gcc
LD = gcc
INCLUDES = -I . -I ../msgdb

CFLAGS = -Wall -O $(INCLUDES)
LFLAGS =
LIBS =
INSTALL_PATH = ..

#
# for SUNOS
#CFLAGS += -DSUNOS
#LIBS += -lsocket -lnsl
#CFILES += compat/strsep.c compat/snprintf.c
#OFILES += strsep.o snprintf.o

#
# for FreeBSD
#CFLAGS += -DBSD44
#LIBS += -lcrypt

#
# for Linux
CFLAGS += -DLINUX -DNOCRYPT
#LIBS +=

#
# for Unixware 2.x
#CFLAGS += -DSVR4 -DOLD_RAND
#LIBS += -lsocket -lnsl -lcrypt
#CFILES += compat/strsep.c
#OFILES += strsep.o

#
# Generally Makefile should not be edited below this line
#
COMM_CFILES = comm/ban.c comm/charset.c comm/comm.c comm/comm_act.c\
comm/comm_colors.c comm/comm_info.c comm/resolver.c
COMM_OFILES = ban.o charset.o comm.o comm_act.o\
comm_colors.o comm_info.o resolver.o

DB_CFILES = db/cmd.c db/db.c db/db_area.c db/db_clan.c db/db_class.c\
db/db_skills.c db/db_lang.c db/db_race.c\
db/gsn.c db/lang.c db/msg.c db/resource.c db/spellfn.c db/word.c
DB_OFILES = cmd.o db.o db_area.o db_clan.o db_class.o\
db_skills.o db_lang.o db_race.o\
gsn.o lang.o msg.o resource.o spellfn.o word.o

OLC_CFILES = olc/olc.c olc/olc_area.c olc/olc_clan.c olc/olc_help.c\
olc/olc_lang.c olc/olc_mob.c olc/olc_mpcode.c olc/olc_msg.c\
olc/olc_room.c olc/olc_obj.c olc/olc_save.c olc/olc_word.c
OLC_OFILES = olc.o olc_area.o olc_clan.o olc_help.o\
olc_lang.o olc_mob.o olc_mpcode.o olc_msg.o\
olc_room.o olc_obj.o olc_save.o olc_word.o

CFILES = act_comm.c act_info.c act_move.c act_obj.c act_wiz.c auction.c\
buffer.c clan.c class.c\
effects.c fight.c flag.c handler.c healer.c help.c hometown.c\
hunt.c interp.c log.c lookup.c magic.c magic2.c martial_art.c mem.c\
mlstring.c mob_cmds.c mob_prog.c namedp.c note.c obj_prog.c quest.c\
race.c raffects.c rating.c recycle.c religion.c repair.c\
save.c skills.c special.c str.c string_edit.c\
tables.c update.c util.c varr.c\
$(COMM_CFILES) $(DB_CFILES) $(OLC_CFILES)

OFILES = act_comm.o act_info.o act_move.o act_obj.o act_wiz.o auction.o\
buffer.o clan.o class.o\
effects.o fight.o flag.o handler.o healer.o help.o hometown.o\
hunt.o interp.o log.o lookup.o magic.o magic2.o martial_art.o mem.o\
mlstring.o mob_cmds.o mob_prog.o namedp.o note.o obj_prog.o quest.o\
race.o raffects.o rating.o recycle.o religion.o repair.o\
save.o skills.o special.o str.o string_edit.o\
tables.o update.o util.o varr.o\
$(COMM_OFILES) $(DB_OFILES) $(OLC_OFILES)

muddy: $(OFILES)
rm -f muddy
$(LD) $(LFLAGS) -o muddy $(OFILES) $(LIBS)

.c.o:
$(CC) $(CFLAGS) -c $<

depend:
mkdep $(CFLAGS) $(CFILES)

clean:
rm -f *.o *.core muddy

ctags:
ctags -dtw $(CFILES) *.h

install: muddy
install -cp -m 770 muddy $(INSTALL_PATH)/bin

And here is the error I get when i try to compile in Cygwin (running on XPhome sp1):

gcc -Wall -O -I . -I ../msgdb -DLINUX -DNOCRYPT -c act_comm.c
In file included from act_comm.c:55:
merc.h:49: warning: ignoring #pragma warning
In file included from merc.h:66,
from act_comm.c:55:
str.h:43: error: conflicting types for 'strlwr'
/usr/include/string.h:71: error: previous declaration of 'strlwr'
comm.c: In function 'do_quit_org':
comm.c:1096: warning: suggest explicit braces to avoid ambiguous 'else'
make: *** [act_comm.o] Error 1.

Now (and sorry for the length), i tried to be clever and went into the makefile and changed it to look like this:

CC = gcc
LD = gcc
INCLUDES = -I . -I ../msgdb
PROF = -O -g
NOCRYPT = -DNOCRYPT

CFLAGS = -Wall $(PROF) $(NOCRYPT) -DOLD_RAND
#CFLAGS = -Wall -O $(INCLUDES)
LFLAGS =
LIBS =
INSTALL_PATH = ..

Still no luck. Any ideas, anyone? I am having nothing but trouble trying to compile ANYTHING on cygwin. smaug won't work, rom, anatolia, nothing. the only thing that has thus far compiled is the win32 version of rom2.4. I would LOVE to get iceydepths working (i have really enjoyed playing on an iceydepths mud).

Much appreciated. Peace, y'all!



Top

Posted by Nick Gammon   Australia  (23,140 posts)  Bio   Forum Administrator
Date Reply #1 on Sat 06 Mar 2004 12:04 AM (UTC)
Message
Sounds like some issue with using 'strlwr' before including a declaration for it.

Maybe the order things are included? Personally I have got SMAUG to compile perfectly under Cygwin, and, I think, ROM.

If you tell me exactly where you got the source I can try and see what happens.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Samson   USA  (683 posts)  Bio
Date Reply #2 on Sat 06 Mar 2004 02:49 AM (UTC)
Message
I too have had good luck getting various Smaug derivs to cooperate in Cygwin, and recently cooerced stock Rom2.4b6 to do the same. Although it really didn't take much cooersion :P

Anyway.....

Quote:

str.h:43: error: conflicting types for 'strlwr'
/usr/include/string.h:71: error: previous declaration of 'strlwr'


This is the problem right here. str.h which I assume comes with icydepths is defining a strlwr function or prototype which string.h already has. string.h is a system library, and usually I find it's best to defer to those to resolve issues like this.
Top

Posted by Lumpei   (6 posts)  Bio
Date Reply #3 on Mon 08 Mar 2004 04:00 PM (UTC)
Message
Thanks for the responses!

I downloaded the iceydepths code from game.org:

http://ftp.game.org/cgi-bin/directory?/pub/mud/diku/merc/rom/anatolia/iceydepths

I am, as stated, a complete neophyte when it comes to things like this, but i am learning. So, Samson, I understood the words of your post, but not their content :)

Practically speaking, what would i have to do to the code to get it to work?

Thanks!
Top

Posted by Nick Gammon   Australia  (23,140 posts)  Bio   Forum Administrator
Date Reply #4 on Tue 09 Mar 2004 08:52 PM (UTC)

Amended on Tue 09 Mar 2004 08:53 PM (UTC) by Nick Gammon

Message
I have got it to compile OK - still some warnings but at least it got there. There were a few problems with conflicting declarations, and occasional lines where a string went over a line break. Here are my diffs:



Common subdirectories: src/CVS and src.new/CVS
diff -c src/act_info.c src.new/act_info.c
*** src/act_info.c	Mon Apr 19 10:33:56 1999
--- src.new/act_info.c	Wed Mar 10 07:36:06 2004
***************
*** 3975,3989 ****
  
      if ( !IS_NPC(ch) && IS_SET(ch->comm, COMM_NOGOSSIP))
      {
! 	send_to_char("But you have the gossip channel turned
! off!\n\r",ch);
  	return;
      }
  
      if ( !IS_NPC(ch) && IS_SET(ch->comm, COMM_NOCHANNELS))
      {
! 	send_to_char("The gods have revoked your channel
! priviliges.\n\r",ch);
  	return;
      }
  
--- 3975,3987 ----
  
      if ( !IS_NPC(ch) && IS_SET(ch->comm, COMM_NOGOSSIP))
      {
! 	send_to_char("But you have the gossip channel turned off!\n\r",ch);
  	return;
      }
  
      if ( !IS_NPC(ch) && IS_SET(ch->comm, COMM_NOCHANNELS))
      {
! 	send_to_char("The gods have revoked your channel priviliges.\n\r",ch);
  	return;
      }
  
diff -c src/act_wiz.c src.new/act_wiz.c
*** src/act_wiz.c	Wed Apr 14 10:56:46 1999
--- src.new/act_wiz.c	Wed Mar 10 07:40:01 2004
***************
*** 844,850 ****
  			char_puts("You are too pumped to pray now.\n", ch);
  			return;
  		}
! #ifdef 0
  		if (!IS_SET(ch->in_room->room_flags, ROOM_PEACE)) {
  			char_puts("You must be in a safe place in order "
  				  "to make a transportation.\n", ch);
--- 844,850 ----
  			char_puts("You are too pumped to pray now.\n", ch);
  			return;
  		}
! #if 0
  		if (!IS_SET(ch->in_room->room_flags, ROOM_PEACE)) {
  			char_puts("You must be in a safe place in order "
  				  "to make a transportation.\n", ch);
***************
*** 2963,2972 ****
  break;
                case CON_PICK_WEAPON:			 st = " Weapon ";
  break;
! 			  case CON_READ_IMOTD:			 st = "
! IMOTD  "; 	break;
! 			  case CON_BREAK_CONNECT:		 st =
! "LINKDEAD";	break;
                case CON_READ_MOTD:            st = "  MOTD  ";    break;
                default:                       st = "UNKNOWN!";    break;
             }           count++;           
--- 2963,2970 ----
  break;
                case CON_PICK_WEAPON:			 st = " Weapon ";
  break;
! 			  case CON_READ_IMOTD:			 st = " IMOTD  "; 	break;
! 			  case CON_BREAK_CONNECT:		 st = "LINKDEAD";	break;
                case CON_READ_MOTD:            st = "  MOTD  ";    break;
                default:                       st = "UNKNOWN!";    break;
             }           count++;           
Common subdirectories: src/comm and src.new/comm
Common subdirectories: src/compat and src.new/compat
Common subdirectories: src/db and src.new/db
diff -c src/db.c src.new/db.c
*** src/db.c	Sun Apr  4 11:15:19 1999
--- src.new/db.c	Wed Mar 10 07:43:37 2004
***************
*** 84,91 ****
  	int getpid();
  	time_t time(time_t *tloc);
  #elif defined(LINUX)
! 	long random();
! 	void srandom(unsigned int);
  	int getpid();
  	time_t time(time_t *tloc);
  #endif
--- 84,91 ----
  	int getpid();
  	time_t time(time_t *tloc);
  #elif defined(LINUX)
! //	long random(void);
! //	void srandom(unsigned int);
  	int getpid();
  	time_t time(time_t *tloc);
  #endif
diff -c src/merc.h src.new/merc.h
*** src/merc.h	Thu Apr 15 13:23:36 1999
--- src.new/merc.h	Wed Mar 10 07:41:05 2004
***************
*** 46,52 ****
  #if	defined (LINUX) || defined (WIN32)
  #	undef  NOCRYPT
  #	define NOCRYPT
! #	pragma warning (disable : 4244 4018 4761)
  #endif
  
  #include <limits.h>
--- 46,52 ----
  #if	defined (LINUX) || defined (WIN32)
  #	undef  NOCRYPT
  #	define NOCRYPT
! //#	pragma warning (disable : 4244 4018 4761)
  #endif
  
  #include <limits.h>
Only in src.new: muddy.exe
Common subdirectories: src/mudprogs and src.new/mudprogs
Common subdirectories: src/olc and src.new/olc
diff -c src/str.c src.new/str.c
*** src/str.c	Thu Nov 26 02:17:46 1998
--- src.new/str.c	Wed Mar 10 07:40:41 2004
***************
*** 249,255 ****
  	return dest;
  }
  
! char *strlwr(const char *s)
  {
  	static char buf[MAX_STRING_LENGTH];
  	char *p;
--- 249,255 ----
  	return dest;
  }
  
! char *strlwr(char *s)
  {
  	static char buf[MAX_STRING_LENGTH];
  	char *p;
diff -c src/str.h src.new/str.h
*** src/str.h	Mon Nov  2 16:28:31 1998
--- src.new/str.h	Wed Mar 10 07:35:08 2004
***************
*** 40,46 ****
  char *	strnzcat(char *dest, const char *src, size_t);
  char *	strnzncat(char *dest, const char *src, size_t len, size_t count);
  #if !defined (WIN32)
! char *	strlwr(const char *s);
  #endif
  
  int	str_cmp		(const char *astr, const char *bstr);
--- 40,46 ----
  char *	strnzcat(char *dest, const char *src, size_t);
  char *	strnzncat(char *dest, const char *src, size_t len, size_t count);
  #if !defined (WIN32)
! char *	strlwr(char *s);
  #endif
  
  int	str_cmp		(const char *astr, const char *bstr);



Tale the text between the lines and save as "fixups.diff" (or some file name) and then go into the "src" directory, and apply the patches like this:


$ patch < ../fixups.diff
patching file act_info.c
patching file act_wiz.c
patching file db.c
patching file merc.h
patching file str.c
patching file str.h


Your command may differ slightly depending on where you save the diffs file. That should patch the files mentioned, and then a "make" should work. There are a few warnings still that it might be worth getting rid of.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Lumpei   (6 posts)  Bio
Date Reply #5 on Wed 10 Mar 2004 11:39 PM (UTC)
Message
Nick, as ever, you're a genius.

OK, so i patched the code, and it compiled. Viola! Wonderful!

Now, and i am having the good graces to blush, i cannot get it to run. I thought i was clever and went into the comm.c file and changed the ip binding to my pc's ip. I recompiled. Then, when i went to run it, i am typing:

./muddy

and i get:

lang.lst: no such file or directory.

OK. so i could be doing several things incorrectly. Is this the wrong executable to run? I could find no 'startup' file that exists in the ubiquitous directions for running these muds. Any help you could give to get this thing running would be great.

I promise to ease off the questions once i get this thing running. i swear!

peace!
Top

Posted by Samson   USA  (683 posts)  Bio
Date Reply #6 on Thu 11 Mar 2004 04:52 AM (UTC)
Message
I spent the better part of 5 hours puzzling over why this would be, and eventually had to perform some uncool hackishness to get the thing to actually load. Now, these hacks were being done as a favor to someone who wanted the multilanguage support. So it's not something I'd be comfortable recommending for a production mud. Frankly, with all the problems this base had even AFTER fixing the compiler issues, I'd not recommend this base to anyone. You'd be better off with something of far better quality, such as Dawn of Time.
Top

Posted by Lumpei   (6 posts)  Bio
Date Reply #7 on Thu 11 Mar 2004 04:56 PM (UTC)
Message
So are you saying it is possible to get this mud running without the language support? I have been playing on this codebase on dungeons and dragons mud and have enjoyed it immensely. I would like to at least get it running for a small group of people.

On another note, is it possible to port the areas/classes/skills over to another codebase? Or is it totally incompatible? Say i wanted some of these areas in, say, the Smaug code. I can't imagine it's as easy as copying the .are files into the Smaug area folder, is it?

Anway, thanks to all for their help. Be well.
Top

Posted by Samson   USA  (683 posts)  Bio
Date Reply #8 on Thu 11 Mar 2004 08:23 PM (UTC)
Message
Getting it to load without the language support would take even more poking since several parts of the game expect it to be there. What I did was perhaps one of the ugliest hackjobs I've ever needed to do, but since the person I did it for was only interested in seeing the language support in action, it was worth it.

In your case, if all you're looking to do is grab area files, you might give the Orb editor a shot. I understand it's capable of converting Rom zones to Smaug format. Not sure about Nick's editor, he can comment on that. Thing is, I'm not sure how "stock" the IceyDepths format is for Rom.
Top

Posted by Nick Gammon   Australia  (23,140 posts)  Bio   Forum Administrator
Date Reply #9 on Fri 12 Mar 2004 02:59 AM (UTC)
Message
If it's stock ROM, my editor will convert reasonably well, load as ROM, save as SMAUG. Just copying the area files will not work.

Make sure you have the flag meanings set up correctly (in the configuration file) otherwise various flags may switch meanings.

Failing that, you can hack out the "load area" code and make it re-save as SMAUG (or stock ROM or whatever).

One day I'm planning to do a generic area editor that can be customised to (virtually) any area file format, but it isn't started yet. :)

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Hashard   (1 post)  Bio
Date Reply #10 on Sun 20 Jun 2004 03:31 AM (UTC)
Message
I've done that patch.. And this is what I've got....
Can anyone help me?


$ make
gcc -Wall -O -I . -I ../msgdb -DLINUX -DNOCRYPT -c act_comm.c
In file included from act_comm.c:55:
merc.h:49: error: syntax error before '!' token
In file included from merc.h:67,
from act_comm.c:55:
str.h:43: error: syntax error before '!' token
act_comm.c: In function `do_quit_org':
act_comm.c:1096: warning: suggest explicit braces to avoid ambiguous `else'
make: *** [act_comm.o] Error 1

Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #11 on Sun 20 Jun 2004 03:34 AM (UTC)
Message
Could you show the lines of code along with the surrounding lines? (Make sure you tell us which one has the error)

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by Spear   (4 posts)  Bio
Date Reply #12 on Tue 26 Apr 2005 10:37 AM (UTC)
Message
I am also playing at dungeons and dragons mud , based on Icey Depths codebase :) I have decided to test my coding skills, as well as try to implement several ideas, so i downloaded it from http://ftp.game.org/cgi-bin/directory?/pub/mud/diku/merc/rom/anatolia/iceydepths
as well as Cygwin.
I have done that before i actually found this place (A Great one, i should admit), so i solved those problems with typos in the source, on my own and successfully compiled the code, receiving muddy.exe as the output.
But here i get the problem, not mentioned in this topic above - when i try to run this program, i get a message:
"init_socket: bind: Cannot assign requested address"
I have searched the net for such message, and as far as i understand it has smth to do with problems with networking, i tried to run it with port argument, but the error message is the same. I did that at work, where i have LAN and lots of programs installed, and thus using many ports, so i tried to take the source to home, where have less programs, that can prevent muddy.exe from using network, and besides that, i dont have LAN at home, but the problem was still the same.
Top

Posted by Robert Powell   Australia  (367 posts)  Bio
Date Reply #13 on Tue 26 Apr 2005 10:49 AM (UTC)

Amended on Tue 26 Apr 2005 10:52 AM (UTC) by Robert Powell

Message
I knew icey depths sounded familuar. Something about mudmagic that is good is the fact that we all can make reviews about code and codebases.
Quote:

Don't bother to download this, there has been many atempts to get this code base running. The error is with the lang.lst file not being found. I have see alot of coders try to fix this with out any sucess.

The fact that Samson can make some hack to get it to work says lots about his skill as a programer. Sometimes the best advice is to follow and beleive the review.

Peace.

Oh AreaEditor is great for converting Rom to Smaug, with some files you might need to change the #AREADATA section to be like the older #AREA area section, but aside from that, it rocks.

Just a guy having a bit of fun. Nothing more, nothing less, I do not need I WIN to feel validated.
Top

Posted by Spear   (4 posts)  Bio
Date Reply #14 on Tue 26 Apr 2005 11:20 AM (UTC)
Message
But i saw many muds running on this codebase and i dont have the problem with this lang.1st file. It compiles w/o errors, i think there should be just slight adjustment made somewhere.
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.


66,663 views.

This is page 1, subject is 2 pages long: 1 2  [Next page]

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.