<!-- begin site header -->
<div id=

Author Topic: (Re)-Porting to MacOS  (Read 9955 times)


  • Newbie
  • *
  • Posts: 21
    • View Profile
(Re)-Porting to MacOS
« on: August 01, 2012, 12:02:32 pm »
Spent a bit of time fiddling in the man pages to try make ms1 build on mac. Fixed to files but simply changing

Code: [Select]
#ifdef linux //adding mac ifdefs

Couldn't find a suitable function for tools.cpp:392 clock_gettime(CLOCK_MONOTONIC, &now); as the CLOCK_MONOTONIC and clock_gettime functions aren't there. Just made the function return 0 for now. After getting it to compile and link I was rewarded with a Bus Error  >:(

Code: [Select]
(gdb) run
Starting program: /Users/tim/src/mineserver/bin/mineserver
Reading symbols for shared libraries +++++. done
Config not found
Parser opening file
Couldn't open file:

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x0000000100000008
0x00000001000052a8 in __gnu_cxx::__atomic_add (__mem=0x100000008, __val=1) at atomicity.h:55
55   { __sync_fetch_and_add(__mem, __val); }
(gdb) bt
#0  0x00000001000052a8 in __gnu_cxx::__atomic_add (__mem=0x100000008, __val=1) at atomicity.h:55
#1  0x00000001000052d6 in __gnu_cxx::__atomic_add_dispatch (__mem=0x100000008, __val=1) at atomicity.h:98
#2  0x0000000100005b80 in std::tr1::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_add_ref_copy (this=0x100000000) at boost_shared_ptr.h:134
#3  0x0000000100005bb8 in std::tr1::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count (this=0x7fff5fbff458, __r=@0x1005002a0) at boost_shared_ptr.h:307
#4  0x0000000100022e4d in std::tr1::__shared_ptr<Logger, (__gnu_cxx::_Lock_policy)2>::__shared_ptr (this=0x7fff5fbff450) at boost_shared_ptr.h:504
#5  0x0000000100022e6d in std::tr1::shared_ptr<Logger>::shared_ptr (this=0x7fff5fbff450) at boost_shared_ptr.h:974
#6  0x0000000100022e93 in Mineserver::logger (this=0x100500110) at mineserver.h:196
#7  0x0000000100080c93 in main (argc=1, argv=0x7fff5fbff548) at /Users/tim/src/mineserver/src/mineserver.cpp:132

Well meh.