Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
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
Bug in get_exp_worth( )
Oct 10, 2017, 1:26 am
By GatewaySysop
Bug in do_drag( )
Oct 8, 2017, 12:40 am
By GatewaySysop
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
Beastmaster 6D sound files
Author: Vladaar
Submitted by: Vladaar
Users Online
CommonCrawl, Yandex, Yahoo!

Members: 0
Guests: 7
Stats
Files
Topics
Posts
Members
Newest Member
476
3,704
19,231
608
LAntorcha
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Codebases » AFKMud Support & Development » Mac Support
Forum Rules | Mark all | Recent Posts

Mac Support
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Feb 3, 2007, 5:51 am
Go to the top of the page
Go to the bottom of the page

Thara
Apprentice
GroupMembers
Posts10
JoinedAug 27, 2005

Would the new codebase compile on a Mac?

I have tried but getting the following:

Building AFKMud....
make -s afkmud
  Compiling o/imc.o....
  Compiling o/act_comm.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....
calendar.cpp: In function 'char* c_time(time_t, int)':
calendar.cpp:152: error: pointer to a function used in arithmetic
calendar.cpp:152: error: invalid conversion from 'char* (*)(int, int)' to 'time_t'
calendar.cpp: In function 'char* mini_c_time(time_t, int)':
calendar.cpp:194: error: pointer to a function used in arithmetic
calendar.cpp:194: error: invalid conversion from 'char* (*)(int, int)' to 'time_t'
make[2]: *** [o/calendar.o] Error 1
make[1]: *** [all] Error 2
make: *** [clean] Error 2
       
Post is unread #2 Feb 3, 2007, 10:51 am
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,639
JoinedJan 1, 2002

Well hmm. The only thing I can figure from that is that on the Mac, "timezone" is an actual function and not a variable of some sort. Without some further knowledge of how that works on a Mac, I wouldn't have any idea how to solve the problem for you.
       
Post is unread #3 Feb 20, 2008, 5:40 pm
Go to the top of the page
Go to the bottom of the page

Noplex
Apprentice
GroupMembers
Posts62
JoinedAug 30, 2005

It should work the same way it does on a BSD system. I haven't tried compiling AFK, but I'll do it later if there's still a problem.
       
Post is unread #4 Feb 20, 2008, 5:45 pm
Go to the top of the page
Go to the bottom of the page

David Haley
Sorcerer
GroupMembers
Posts903
JoinedJan 29, 2007

I had several issues compiling FUSS (not AFK) on a Mac some time ago. Somewhere around here I have a diff of what I needed to change, although I no longer have access to a Mac to play with this more.
       
Post is unread #5 Feb 20, 2008, 8:55 pm
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,639
JoinedJan 1, 2002

Noplex, how does it work on a BSD system? I don't have ready access to one to play with to find out :)
       
Post is unread #6 Feb 24, 2008, 1:54 pm   Last edited Feb 24, 2008, 2:49 pm by Noplex
Go to the top of the page
Go to the bottom of the page

Noplex
Apprentice
GroupMembers
Posts62
JoinedAug 30, 2005

Sorry about the delay. Calculus and Financial Mathematics are killing me. Ugh. I hate college.
diff stock/Makefile src/Makefile
12c12
< EXPORT_SYMBOLS = -export-dynamic
---
> #EXPORT_SYMBOLS = -export-dynamic
72c72
< 	$(CC) -export-dynamic -o smaug $(O_FILES) $(L_FLAGS)
---
> 	$(CC) $(EXPORT_SYMBOLS) -o smaug $(O_FILES) $(L_FLAGS)
Only in src: dependencies.d
diff stock/handler.c src/handler.c
463c463
<       bug( "%s: midlist control block (%zd).", __FUNCTION__, *trash - trw_heap );
---
>       bug( "%s: midlist control block (%zd).", __FUNCTION__, (signed size_t)(*trash - trw_heap) );
diff stock/interp.c src/interp.c
556c556
<                        ch->in_room ? ch->in_room->vnum : 0, time_used.tv_sec, time_used.tv_usec );
---
>                        ch->in_room ? ch->in_room->vnum : 0, time_used.tv_sec, (long int)time_used.tv_usec );
937c937
<    ch_printf( ch, "Timing took %ld.%06ld seconds.\r\n", etime.tv_sec, etime.tv_usec );
---
>    ch_printf( ch, "Timing took %ld.%06ld seconds.\r\n", etime.tv_sec, (long int)etime.tv_usec );
985,986c985,986
<               "\r\n", vtime->min_time.tv_sec, vtime->min_time.tv_usec, ntime.tv_sec,
<               ntime.tv_usec, vtime->max_time.tv_sec, vtime->max_time.tv_usec );
---
>               "\r\n", vtime->min_time.tv_sec, (long int)vtime->min_time.tv_usec, ntime.tv_sec,
>               (long int)ntime.tv_usec, vtime->max_time.tv_sec, (long int)vtime->max_time.tv_usec );
diff stock/mud.h src/mud.h
41a42,46
> #if defined(__APPLE__)
> #include <sys/types.h>
> #include <time.h>
> #endif
> 
Common subdirectories: stock/o and src/o
Only in src: resolver
Only in src: resolver.o
diff stock/sha256.c src/sha256.c
34c34
< #else
---
> #elif !defined(__APPLE__)
Only in src: smaug

With those changes it compiles and runs fine on my system, OS X 10.5.2 running GCC 4.0.1 (version shipped with Apple's Leopard xCode package). He was a little ambiguous about what version he is running. I am assuming he is using OS X and at least GCC 4 (although I can't quite remember what shipped with Tiger, I think it was GCC4). If he's using an old version of the operating system he can download Fink which is essentially apt-get for OS X. I believe they are distributing GCC 4.2.
       
Post is unread #7 Feb 24, 2008, 6:18 pm
Go to the top of the page
Go to the bottom of the page

Noplex
Apprentice
GroupMembers
Posts62
JoinedAug 30, 2005

Same changes apply to SmaugFUSS 1.9 (with my same configuration, obviously).
       
Post is unread #8 Feb 24, 2008, 6:29 pm
Go to the top of the page
Go to the bottom of the page

David Haley
Sorcerer
GroupMembers
Posts903
JoinedJan 29, 2007

       
Post is unread #9 Feb 25, 2008, 7:58 am
Go to the top of the page
Go to the bottom of the page

Noplex
Apprentice
GroupMembers
Posts62
JoinedAug 30, 2005

I didn't think of checking to see if the endian was included. I'll find out later where it is on the Mac and include it in the SHA library. But you should change __ppc__ to __APPLE__ due to more recent Intel Macs. The only change that looks like might cause a problem is the endian include. Everything else is essentially the same thing I did.
       
Post is unread #10 Feb 25, 2008, 1:13 pm
Go to the top of the page
Go to the bottom of the page

David Haley
Sorcerer
GroupMembers
Posts903
JoinedJan 29, 2007

Oh yeah. I should have mentioned that I did all that on a PPC, before having access to a MacIntel... __APPLE__ would be better, yes.

I found the conditionals on the printfs to be pretty annoying; I'm not sure a one-size-fits-all solution is appropriate because the data types are different IIRC. That's why I have those printfs whose format specifiers change depending on apple vs. non-apple... :sigh:
       
Post is unread #11 Feb 25, 2008, 2:38 pm
Go to the top of the page
Go to the bottom of the page

Noplex
Apprentice
GroupMembers
Posts62
JoinedAug 30, 2005

sha256.c
#if !defined(WIN32)
#include <sys/cdefs.h>
#if defined(__FreeBSD__)
#include <sys/endian.h>
#elif defined(__APPLE__)
#include <machine/endian.h>
#else
#include <endian.h>
#endif

That should work pcc/intel OS X.
       
Pages:<< prev 1 next >>