Skip to content

fix(ggml): compile error on centos 7.9 and gcc7 #227

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

Closed
wants to merge 1 commit into from

Conversation

tpoisonooo
Copy link

@tpoisonooo tpoisonooo commented Mar 17, 2023

fix build error on CentOS 7.9 and gcc7/gcc9

ggml.c:309:19: error: ‘CLOCK_MONOTONIC’ undeclared (first use in this function)
     clock_gettime(CLOCK_MONOTONIC, &ts);

Here is my OS version

$ lsb_release -a
LSB Version:    :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch
Distributor ID: CentOS
Description:    CentOS Linux release 7.9.2009 (Core)
Release:        7.9.2009
Codename:       Core

After fix it works.

I llama.cpp build info: 
I UNAME_S:  Linux
I UNAME_P:  x86_64
I UNAME_M:  x86_64
I CFLAGS:   -I.              -O3 -DNDEBUG -std=c11   -fPIC -pthread -mavx -mavx2 -mfma -mf16c -msse3
I CXXFLAGS: -I. -I./examples -O3 -DNDEBUG -std=c++11 -fPIC -pthread
I LDFLAGS:  
I CC:       cc (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5)
I CXX:      g++ (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5)

@tpoisonooo tpoisonooo closed this Mar 17, 2023
AAbushady pushed a commit to AAbushady/llama.cpp that referenced this pull request Jan 27, 2024
merging this, please let me know if anything breaks.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant