Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
 parse description bug
Yesterday, 10:08 pm
By Remcon
Couple bugs
Dec 12, 2017, 5:42 pm
By Remcon
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
Bug in will_fall( )
Oct 23, 2017, 1:35 am
By GatewaySysop
Bug in do_zap( ), do_brandish( )
Oct 18, 2017, 1:52 pm
By GatewaySysop
LOP 1.45
Author: Remcon
Submitted by: Remcon
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Memwatch
Author: Johan Lindh
Submitted by: Vladaar
Users Online
CommonCrawl, Yahoo!, Google, Yandex, DotBot

Members: 0
Guests: 7
Stats
Files
Topics
Posts
Members
Newest Member
477
3,706
19,240
608
LAntorcha
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Codebases » AFKMud Support & Development » Compiling on OS X
Forum Rules | Mark all | Recent Posts

Compiling on OS X
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Oct 2, 2009, 8:13 pm
Go to the top of the page
Go to the bottom of the page

Namreg
Fledgling
GroupMembers
Posts7
JoinedOct 2, 2009

Hello all,

I'm new to programming, and just sort of experimenting and messing with code out of curiosity. I'm trying to compile AFK under OSX 10.5, and getting the following errors:

Building AFKMud....
make -j2 -s afkmud
  Compiling o/act_comm.o....
  Compiling o/imc.o....
  Compiling o/act_info.o....
  Compiling o/act_move.o....
  Compiling o/act_obj.o....
  Compiling o/act_wiz.o....
  Compiling o/archery.o....
  Compiling o/area.o....
  Compiling o/areaconvert.o....
  Compiling o/auction.o....
  Compiling o/ban.o....
  Compiling o/bits.o....
  Compiling o/boards.o....
  Compiling o/build.o....
  Compiling o/calendar.o....
  Compiling o/channels.o....
  Compiling o/character.o....
  Compiling o/chess.o....
  Compiling o/clans.o....
  Compiling o/color.o....
  Compiling o/comm.o....
  Compiling o/commands.o....
  Compiling o/comments.o....
commands.cpp: In function ‘void interpret(char_data*, std::string)’:
commands.cpp:832: warning: format ‘%06ld’ expects type ‘long int’, but argument 9 has type ‘__darwin_suseconds_t’
  Compiling o/connhist.o....
  Compiling o/const.o....
  Compiling o/db.o....
  Compiling o/deity.o....
  Compiling o/descriptor.o....
descriptor.cpp: In function ‘void close_socket(descriptor_data*, bool)’:
descriptor.cpp:1908: error: ‘kill’ was not declared in this scope
make[1]: *** [o/descriptor.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [all] Error 2


Has anyone been able to compile properly? Thank you in advance for your help.
       
Post is unread #2 Oct 2, 2009, 8:16 pm
Go to the top of the page
Go to the bottom of the page

Zeno
Sorcerer
GroupMembers
Posts723
JoinedMar 5, 2005

Can you show us some lines from the descriptor.cpp error?

That doesn't seem like an OSX issue.
       
Post is unread #3 Oct 2, 2009, 8:21 pm
Go to the top of the page
Go to the bottom of the page

Namreg
Fledgling
GroupMembers
Posts7
JoinedOct 2, 2009

void close_socket( descriptor_data * d, bool force )
{
   char_data *ch;
   auth_data *old_auth;

#if !defined(WIN32)
   if( d->ipid != -1 )
   {
      int status;

      kill( d->ipid, SIGKILL );
      waitpid( d->ipid, &status, 0 );
   }
   if( d->ifd != -1 )
      close( d->ifd );
#endif


This is where the error occurs. Any idea what it could be, if not an OSX issue?
       
Post is unread #4 Oct 2, 2009, 8:23 pm
Go to the top of the page
Go to the bottom of the page

Zeno
Sorcerer
GroupMembers
Posts723
JoinedMar 5, 2005

Ah, I see. Yeah, then this is an OSX issue. It must not have kill()
       
Post is unread #5 Oct 2, 2009, 8:38 pm
Go to the top of the page
Go to the bottom of the page

Namreg
Fledgling
GroupMembers
Posts7
JoinedOct 2, 2009

Well commenting it out solved the issue, thank you.

Now I'm having problems compiling overland.cpp since it seems the GD library is missing. I'm downloading that now, and I'll reply here later to say if commenting that code out really fixes everything.
       
Post is unread #6 Oct 2, 2009, 8:49 pm
Go to the top of the page
Go to the bottom of the page

Zeno
Sorcerer
GroupMembers
Posts723
JoinedMar 5, 2005

       
Post is unread #7 Oct 2, 2009, 9:35 pm
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,639
JoinedJan 1, 2002

Up at the top of your file it seems like you need to move this:

#include <csignal>

down so that it's not sitting inside the __FreeBSD__ block anymore.
       
Post is unread #8 Oct 2, 2009, 10:25 pm
Go to the top of the page
Go to the bottom of the page

Namreg
Fledgling
GroupMembers
Posts7
JoinedOct 2, 2009

Thank you very much, that worked also, and it's definitely better than commenting out the code. It's now compiling perfectly all the way up to web.cpp, with only a few warnings. When it gets to web.cpp, this is what happens:

Compiling o/web.o....
ld: unknown option: -export-dynamic
collect2: ld returned 1 exit status
make[2]: *** [afkmud] Error 1
make[1]: *** [all] Error 2
make: *** [clean] Error 2


Any idea what it means? Thanks a lot for the patience, you guys are extremely helpful.
       
Post is unread #9 Oct 3, 2009, 12:15 pm
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,639
JoinedJan 1, 2002

EXPORT_SYMBOLS = -export-dynamic

In the Makefile, put a # in front of that line and try again. I guess OS X doesn't like that one either.
       
Post is unread #10 Oct 3, 2009, 2:52 pm
Go to the top of the page
Go to the bottom of the page

Namreg
Fledgling
GroupMembers
Posts7
JoinedOct 2, 2009

Building AFKMud....
make -j2 -s afkmud
ld: library not found for -lgd
collect2: ld returned 1 exit status
make[1]: *** [afkmud] Error 1
make: *** [all] Error 2


Alright, this is what is happening now, after it compiles everything up to web.cpp

Maybe I should try running Cygwin in a Wine box? Anyone know if that works well at all? The fact that a lot of libraries are missing from Apple's Xcode seems to just be causing more problems with compiling under OSX...
       
Post is unread #11 Oct 3, 2009, 5:51 pm
Go to the top of the page
Go to the bottom of the page

Zeno
Sorcerer
GroupMembers
Posts723
JoinedMar 5, 2005

It's still not see the gdb library.
       
Post is unread #12 Oct 4, 2009, 11:54 am
Go to the top of the page
Go to the bottom of the page

David Haley
Sorcerer
GroupMembers
Posts903
JoinedJan 29, 2007

You need to install libgd (not gdb) one way or another. You can try various OSX package managers (e.g., fink) or you can download and install the library yourself.

If you're going to run a virtual machine, I would run a Linux one, not Cygwin-on-Windows... Cygwin has enough sources of headache, and it's what Windows people use to get closer to Unix/Linux.
       
Post is unread #13 Oct 5, 2009, 2:47 pm
Go to the top of the page
Go to the bottom of the page

ayuri
Magician
GroupMembers
Posts239
JoinedJun 13, 2008

As an OS X user I'd suggest Fink (just be sure to set your path to include the /sw/bin and whatever else Fink sets up). The downside of Fink is that the packages are not always up to date, and in some cases that can cause problems. However installing them by hand can lead to other problems as said packages will look for other lib's that might be missing.

It can be done, you'll just have to spend some time digging a wee bit deeper than most.

Having said that, it has been a long while since I've actively ran a mud off an OS X system.
ayuri
       
Post is unread #14 Oct 5, 2009, 6:32 pm
Go to the top of the page
Go to the bottom of the page

Namreg
Fledgling
GroupMembers
Posts7
JoinedOct 2, 2009

Well guys I finally did it, I properly installed the GD library and all is going smoothly now.

Thank you so much for all your help and patience =)
       
Pages:<< prev 1 next >>