Home | Documentation | Atomic Chat | Github

Compile Errors on OSX. Why Mac, why?


#1

I’m trying to compile Atomic on a Mac, and I’m getting an error I can’t get past. I don’t believe it is an Atomic error, but some OSX thing. Can someone give some guidance on what to do about these lazy linking issues? From the command ./Build_AtomicEditor.sh --nonet

...
Script/AtomicWebViewEditor/typings/monaco.d.ts[5136, 35]: ' should be "
Script/AtomicWebViewEditor/typings/monaco.d.ts[5136, 46]: ' should be "
Script/AtomicWebViewEditor/typings/monaco.d.ts[5136, 58]: ' should be "
Script/AtomicWebViewEditor/typings/monaco.d.ts[5210, 34]: ' should be "
Script/AtomicWebViewEditor/typings/monaco.d.ts[5210, 43]: ' should be "
Script/AtomicWebViewEditor/typings/monaco.d.ts[5210, 53]: ' should be "
Script/AtomicWebViewEditor/typings/monaco.d.ts[5210, 71]: ' should be "
Script/AtomicWebViewEditor/typings/monaco.d.ts[5137, 10]: missing semicolon


Lint: Typescript linting complete.


dyld: lazy symbol binding failed: Symbol not found: _clock_gettime
  Referenced from: /Users/mac/Documents/AGE/AtomicGameEngine/Artifacts/Build/AtomicTool/AtomicTool
  Expected in: /usr/lib/libSystem.B.dylib

dyld: Symbol not found: _clock_gettime
  Referenced from: /Users/mac/Documents/AGE/AtomicGameEngine/Artifacts/Build/AtomicTool/AtomicTool
  Expected in: /usr/lib/libSystem.B.dylib

jake aborted.
Error: Process exited with error.
    at api.fail (/Users/mac/Documents/AGE/AtomicGameEngine/Build/node_modules/jake/lib/api.js:336:18)
    at null.<anonymous> (/Users/mac/Documents/AGE/AtomicGameEngine/Build/node_modules/jake/lib/utils/index.js:124:9)
(See full trace by running task with --trace)
make: *** [/Users/mac/Documents/AGE/AtomicGameEngine/Artifacts/Build/Mac/Source/AtomicTool/CMakeFiles/AtomicToolCheckScripts] Error 1
Command /bin/sh failed with exit code 2

** BUILD FAILED **


The following build commands failed:
	PhaseScriptExecution CMake\ Rules Artifacts/Build/Mac/Source/AtomicTool/Atomic.build/Release/AtomicToolCheckScripts.build/Script-2F2D5B196B964311A777376D.sh
(1 failure)
/Users/mac/Documents/AGE/AtomicGameEngine/Build/node_modules/jake/lib/api.js:340
        throw errObj;
        ^

Error: Process exited with error.
    at api.fail (/Users/mac/Documents/AGE/AtomicGameEngine/Build/node_modules/jake/lib/api.js:336:18)
    at null.<anonymous> (/Users/mac/Documents/AGE/AtomicGameEngine/Build/node_modules/jake/lib/utils/index.js:124:9)
    at emitTwo (events.js:88:13)
    at emit (events.js:173:7)
    at ChildProcess.<anonymous> (/Users/mac/Documents/AGE/AtomicGameEngine/Build/node_modules/jake/lib/utils/index.js:227:20)
    at emitTwo (events.js:88:13)
    at ChildProcess.emit (events.js:173:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:201:12)
Macs-Mac-mini:AtomicGameEngine mac$ 

#2

Using Urho3d here, so this applies to c++ only.
Clock_gettime is renowned for giving problems on os X. Turns out it is implemented by Apple on Os x depending on version…
Following is coming from civetweb.c. I commented the doubled code.

//
// commented because is implemented in osx 10.11 & 10.12
//
/* clock_gettime is not implemented on OSX */
//int clock_gettime(int clk_id, struct timespec *t);
//
//int clock_gettime(int clk_id, struct timespec t)
//{
// if (clk_id == CLOCK_REALTIME) {
// struct timeval now;
// int rv = gettimeofday(&now, NULL);
// if (rv) {
// return rv;
// }
// t->tv_sec = now.tv_sec;
// t->tv_nsec = now.tv_usec * 1000;
// return 0;
//
// } else if (clk_id == CLOCK_MONOTONIC) {
// static uint64_t start_time = 0;
// static mach_timebase_info_data_t timebase_ifo = {0, 0};
//
// uint64_t now = mach_absolute_time();
//
// if (start_time == 0) {
// kern_return_t mach_status = mach_timebase_info(&timebase_ifo);
//#if defined(DEBUG)
// assert(mach_status == KERN_SUCCESS);
//#else
// /
appease “unused variable” warning for release builds /
// (void)mach_status;
//#endif
// start_time = now;
// }
//
// now =
// (uint64_t)((double)(now - start_time) * (double)timebase_ifo.numer /
// (double)timebase_ifo.denom);
//
// t->tv_sec = now / 1000000000;
// t->tv_nsec = now % 1000000000;
// return 0;
// }
// return -1; /
EINVAL - Clock ID is unknown */
//}
#endif


#3

J, Thanks for the info. I had compiled Urho3d before, and made it thru ok. But at least I can check my versions and see if the Atomic build is doing the right thing.