Please check out Final Fantasy MUX !

Member Discussions

terms



[Previous] [Next] [Post] [Reply] [Topics] [Summary] [Search]


1. Has anyone ever got Dystopia to compile on Mac OS X? Tue Nov 4, 2003 [7:04 PM]
Fleck0
robwgypsy@yahoo.com
member since: Nov 4, 2003
Reply
All I can get to compile 'out of the box' is circle (boring!)

If anyone has successfully gotten dystopia (or any Godwars for that
matter) to compile under OS X, please tell me how, or point me to a
helpful link

-Fleck0


2. RE: Has anyone ever got Dystopia to compile on Mac OS X? Tue Nov 4, 2003 [7:56 PM]
Ghasatta
Email not supplied
member since: Jun 17, 2002
In Reply To
Reply
I've found that most merc-derived codebases (like Godwars, and ROM)
can be compiled by adding "-Dunix" to the end of the C_FLAGS line in
the Makefile. Try that.

HTH.
-Ghasatta
P.S. Even if that doesn't take care of it, it should be fairly easy to port the
code over with minimal changes. If you are still having troubles, post
here with a more detailed description of the problem (including the
actual text of the errors). I'm sure someone will be able to help you.


3. RE: Has anyone ever got Dystopia to compile on Mac OS X? Wed Nov 5, 2003 [4:57 PM]
Fleck0
robwgypsy@yahoo.com
member since: Nov 4, 2003
In Reply To
Reply
Well, I tried adding -Dunix to the C_FLAGS of the makefiles of several
merc based codes, and while it seemed to work a little bit better, I am
still unable to successfully compile anything other than circle.

Here's some info and an example of what happens when I try to compile
godwars deluxe.

I'm on OS x 10.2, and using the Terminal in ttyp1 mode with all the
developers tools installed. Here's a transcript of what the terminal gives
me when I try to compile after adding -Dunix to the makefile

----------

bash-2.05a$ make
gcc -c -Wall -DMERC -Dunix act_comm.c
gcc -c -Wall -DMERC -Dunix act_info.c
gcc -c -Wall -DMERC -Dunix act_move.c
gcc -c -Wall -DMERC -Dunix act_obj.c
gcc -c -Wall -DMERC -Dunix act_wiz.c
act_wiz.c:3662: warning: ANSI C forbids newline in string constant
act_wiz.c:3715: warning: ANSI C forbids newline in string constant
act_wiz.c:3819: warning: ANSI C forbids newline in string constant
act_wiz.c:3664:1: warning: multi-line string literals are deprecated
act_wiz.c:3718:1: warning: multi-line string literals are deprecated
act_wiz.c:3821:1: warning: multi-line string literals are deprecated
gcc -c -Wall -DMERC -Dunix comm.c
gcc -c -Wall -DMERC -Dunix const.c
gcc -c -Wall -DMERC -Dunix db.c
gcc -c -Wall -DMERC -Dunix fight.c
gcc -c -Wall -DMERC -Dunix handler.c
gcc -c -Wall -DMERC -Dunix interp.c
interp.c:897:41: warning: trigraph ??' ignored
interp.c:898:41: warning: trigraph ??' ignored
interp.c:899:46: warning: trigraph ??' ignored
interp.c:900:47: warning: trigraph ??' ignored
interp.c:901:47: warning: trigraph ??' ignored
gcc -c -Wall -DMERC -Dunix magic.c
gcc -c -Wall -DMERC -Dunix save.c
gcc -c -Wall -DMERC -Dunix special.c
gcc -c -Wall -DMERC -Dunix update.c
gcc -c -Wall -DMERC -Dunix clan_table.c
gcc -c -Wall -DMERC -Dunix kav_wiz.c
kav_wiz.c:1006: warning: ANSI C forbids newline in string constant
kav_wiz.c:1007:1: warning: multi-line string literals are deprecated
gcc -c -Wall -DMERC -Dunix kav_fight.c
gcc -c -Wall -DMERC -Dunix kav_info.c
gcc -c -Wall -DMERC -Dunix clan.c
gcc -c -Wall -DMERC -Dunix more.c
gcc -c -Wall -DMERC -Dunix artifact.c
gcc -c -Wall -DMERC -Dunix home.c
gcc -c -Wall -DMERC -Dunix rot_wiz.c
gcc -c -Wall -DMERC -Dunix demon.c
gcc -c -Wall -DMERC -Dunix werewolf.c
gcc -c -Wall -DMERC -Dunix olc.c
gcc -c -Wall -DMERC -Dunix string.c
gcc -c -Wall -DMERC -Dunix bit.c
gcc -c -Wall -DMERC -Dunix core.c
rm -f merc
gcc -O -o merc 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 clan_table.o kav_wiz.o kav_fight.o kav_info.o clan.o more.o
artifact.o home.o rot_wiz.o demon.o werewolf.o olc.o string.o bit.o
core.o -lcrypt
ld: can't locate file for: -lcrypt
make: *** [merc] Error 1

------

I have very different problems when trying to compile a codebase based
off godwars (such as dystopia) but I figure I won't trouble everyone with
those problems yet ;-)

I'll try to get a handle on the base codes first.

-Fleck0


4. RE: Has anyone ever got Dystopia to compile on Mac OS X? Wed Nov 5, 2003 [6:04 PM]
Lykourgos
Email not supplied
member since: Sep 14, 2001
In Reply To
Reply
well, take the -lcrypt part out, and replace/remove calls to crypt where appropriate. also, the string and trigraph warnings should be easy to fix.


5. RE: Has anyone ever got Dystopia to compile on Mac OS X? Wed Nov 5, 2003 [6:55 PM]
xEteraredx
fallenempires2@hotmail.com
member since: Oct 21, 2003
In Reply To
Reply
You shouldn't really NEED to fix the multi-line string literals, just makes the code look nicer ;)


6. RE: Has anyone ever got Dystopia to compile on Mac OS X? Wed Nov 5, 2003 [8:36 PM]
Ghasatta
Email not supplied
member since: Jun 17, 2002
In Reply To
Reply
Quite frankly, you can ignore those warnings for the time being. The
thing that is holding your compiling* up is the problem with -lcrypt.
Most BSD-based systems (including Mac OS X, which is based on
FreeBSD) require less hand-holding from the user in determining which
libraries need to be linked, so you can actually just remove"-lcrypt" from
your makefile, and "make" again, and it should work.

From your posts, I get the impression that you are just beginning to
learn programming. I think it would be good practice for you to try
researching the warnings the compiler is spitting at you, and attempt to
fix them yourself.

Good luck,
-Ghasatta

* Technically speaking, your individual object files compiled fine, but the
"linking" is failing. Linking is the process by which all those individual
compiled object files like act_info.o get combined into one program,
which is the actual mud you run.


7. RE: Has anyone ever got Dystopia to compile on Mac OS X? Thu Nov 6, 2003 [12:45 AM]
Fleck0
robwgypsy@yahoo.com
member since: Nov 4, 2003
In Reply To
Reply
You're right to assume that I'm a beginner. Thanks to everybodies help I
got Godwars running alright. So now I'v emoved up to working on my
ultimate goal, which is to get dystopia to compile.

I've generally made it a habit to add -Dunix and take out -lcrypt if it
presents any problems.

however now I've run into a few other problems that keep dystopia from
properly compiling into the merc file.

again i had a bunch of ANSI C warnings, but they don't seem to be a big
problem,

I tried compiling 4 different versions of dystopia

and generally they all gave me these messages...

mccp.c: In function `processCompressed':
mccp.c:189: `ENOSR' undeclared (first use in this function)
mccp.c:189: (Each undeclared identifier is reported only once
mccp.c:189: for each function it appears in.)
make: *** [mccp.o] Error 1

and then down the line...

comm.c: In function `lookup_address':
comm.c:1024: warning: implicit declaration of function
`gethostbyaddr_r'

everything else goes very smoothly

-Flecko

p.s. thanks a ton for all the help and suggestions everyone has offered



8. RE: Has anyone ever got Dystopia to compile on Mac OS X? Thu Nov 6, 2003 [1:26 AM]
Fleck0
robwgypsy@yahoo.com
member since: Nov 4, 2003
In Reply To
Reply
alright, one more godwars related question,

I've tried to compile the Vampire Wars codebase, and when I do every
single .c file, brings up the fact that it can't find 'header file 'crypt.h'

here's an example (however every single ***.c comes up with this:

save.c
merc.h:2292: header file 'crypt.h' not found
cpp-precomp: warning: errors during smart preprocessing, retrying in
basic mode
make: *** [obj/save.o] Error 1


9. RE: Has anyone ever got Dystopia to compile on Mac OS X? Thu Nov 6, 2003 [3:08 AM]
jobo
Email not supplied
member since: May 25, 2000
In Reply To
Reply
the error ENOSR means out of stream resources, not sure why it's not part of the OS X error messages, but I guess you could try simply removing that check (keep the EAGAIN part).

The gethostbyaddr_r() function call could be missing from the OS X libraries, so you could either remove the threads completely, or use gethostbyaddr().

Of course, if you remove ENOSR and replace gethostbyaddr_r with gethostbyaddr, then your program is no longer thread safe, and it might also crash in the MCCP part.

To be safe, remove threads and the MCCP, or research alternatives to gethostbyaddr_r and ENOSR on google.

Brian


10. RE: Has anyone ever got Dystopia to compile on Mac OS X? Fri Nov 7, 2003 [6:06 AM]
Samson
Email not supplied
member since: Jul 24, 1999
In Reply To
Reply
merc.h has an include for crypt.h and your system doesn't have that file. Just comment it out.
SmaugMuds.org: http://www.smaugmuds.org
My Blog. Leave your political correctness at the door: http://www.iguanadons.net




[Previous] [Next] [Post] [Reply] [Topics] [Summary] [Search]