-
Notifications
You must be signed in to change notification settings - Fork 11.4k
Compilation failed on macOS 10.7-8-9: 'clock_gettime' produce warnings and errors #788
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
OS X 10.8 was released more than a decade ago. The last release was in 2015. I suspect if you want this project to work on such an old OS you'll probably need to do the work necessary yourself. |
I agree to do what I can! At least I need help in pointing out: what exactly to do, the direction. |
If you replace the following code in int64_t ggml_time_ms(void) {
struct timespec ts;
clock_gettime(CLOCK_MONOTONIC, &ts);
return (int64_t)ts.tv_sec*1000 + (int64_t)ts.tv_nsec/1000000;
}
int64_t ggml_time_us(void) {
struct timespec ts;
clock_gettime(CLOCK_MONOTONIC, &ts);
return (int64_t)ts.tv_sec*1000000 + (int64_t)ts.tv_nsec/1000;
} Replacement (most time values will be reported as 0): int64_t ggml_time_ms(void) {
return 0;
}
int64_t ggml_time_us(void) {
return 0;
} |
QA is always good to have! Run Ubuntu Linux in a VM perhaps? I'd only try the 7B model as it will likely be very slow. 4 cores and 8GB of RAM is about the minimum spec. |
@j-f1 Thanks a lot - replacement of the code allowed to move a little bit forward: I have force-applied clang usage as it seems to go better than even the latest gcc:
llama.o and common.o compiled with silence:
I even crossed fingers: it felt like success, only the last step left... but suddenly:
|
It looks like you may not be linking against the C++ standard library, but I’m not sure how you could fix that. |
@j-f1 oh... Well, I'm still ready to keep standing and fighting :) I have tried to compile it with Tigerbrew version of gcc-6 (latest gcc available in Tigerbrew) on OS Mavericks, but it even can't get pass ggml.o. Pity, they don't have clang11 in Tigerbrew... Current approach is the largest distance I got over: at least it compiled few files with no problem! Maybe, you have some more guessing or some workaround ?.. Should I try to compile gcc from sources? It's a bit of pain, but I don't know if it possibly can help... |
Which linker are you using? |
To fix the linking issue, you probably just need to set |
I did nothing with linker, it may be an OS default one. If you recommend another linker - I'll try to find it on MacPorts and switch to it somehow.. |
Did it. No way!.. It looks like...
Hold on, let me finish copying my weights here and try it... Can't believe. It must be something not working... :) |
I have also compiled alpaca.cpp for macOS 10.7 and looks like it is working on real machine with macOS 10.8:
...I love this 'We are' :) Haven't tried configuring it yet, but at least - it is compiled successfully and running. Thank you all very much for helping me out! |
@j-f1 can you, please, explain what can be the consequences of this 'return 0' replacement?.. |
As far as I can tell, the only consequence will be that the time values that will be printed out will all be 0. Feel free to open a PR adding an alternate timing mechanism that can be used if the more accurate one is unavailable? |
@j-f1 I have following warnings left with ggml.o:
Any idea about what is causing them? |
I wouldn’t worry too much about those if it works ok! |
Compiling from the source code on macOS 10.7-8-9 (clean OS): PREREQUISITES:
STEPS (base command line skills required):
KNOWN ISSUES AND WORKAROUNDS:
|
macOS 10.9 is EOL since 2016 src: https://endoflife.date/macos Is this really something we want someone to spend their time on? |
I have a similar problem on Ubuntu 22.04, so it's not only Macs. |
This issue was closed because it has been inactive for 14 days since being marked as stale. |
PREREQUISITES
EXPECTED BEHAVIOR
ACTUAL BEHAVIOR
ENVIRONMENT AND CONTEXT
FAILURE INFORMATION
STEPS TO REPRODUCE
FAILURE LOGS
CC=gcc and CXX=gcc env vars set:
CC=clang and CXX=clang env vars set:
The text was updated successfully, but these errors were encountered: