ggerganov / llama.cpp

LLM inference in C/C++
MIT License
66.49k stars 9.56k forks source link

redhat7.7 compilation error: ggml.c:89:23: fatal error: stdatomic.h: No such file or directory #include <stdatomic.h> #4803

Closed chuanzhubin closed 6 months ago

chuanzhubin commented 9 months ago

[root@moneymarket01 llama.cpp]# make -j I llama.cpp build info: I UNAME_S: Linux I UNAME_P: x86_64 I UNAME_M: x86_64 I CFLAGS: -I. -Icommon -D_XOPEN_SOURCE=600 -D_GNU_SOURCE -DNDEBUG -std=c11 -fPIC -O3 -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wshadow -Wstrict-prototypes -Wpointer-arith -Wmissing-prototypes -Werror=implicit-int -Werror=implicit-function-declaration -pthread -march=native -mtune=native -Wdouble-promotion I CXXFLAGS: -I. -Icommon -D_XOPEN_SOURCE=600 -D_GNU_SOURCE -DNDEBUG -std=c++11 -fPIC -O3 -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wmissing-declarations -Wmissing-noreturn -pthread -march=native -mtune=native -Wno-array-bounds I NVCCFLAGS:
I LDFLAGS:
I CC: cc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44) /bin/sh: g++: command not found I CXX:

cc -I. -Icommon -D_XOPEN_SOURCE=600 -D_GNU_SOURCE -DNDEBUG -std=c11 -fPIC -O3 -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wshadow -Wstrict-prototypes -Wpointer-arith -Wmissing-prototypes -Werror=implicit-int -Werror=implicit-function-declaration -pthread -march=native -mtune=native -Wdouble-promotion -c ggml.c -o ggml.o g++ -I. -Icommon -D_XOPEN_SOURCE=600 -D_GNU_SOURCE -DNDEBUG -std=c++11 -fPIC -O3 -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wmissing-declarations -Wmissing-noreturn -pthread -march=native -mtune=native -Wno-array-bounds -c llama.cpp -o llama.o make: g++: Command not found make: [llama.o] Error 127 make: Waiting for unfinished jobs.... ggml.c:89:23: fatal error: stdatomic.h: No such file or directory

include

                   ^

compilation terminated. make: *** [ggml.o] Error 1 [root@moneymarket01 llama.cpp]# shutdown Shutdown scheduled for Sat 2024-01-06 22:26:00 EST, use 'shutdown -c' to cancel.

eminence commented 9 months ago

GCC 4.8.5 is very old. Can you use a newer version of GCC?

ggerganov commented 9 months ago

make: g++: Command not found

Install a C++ compiler

chuanzhubin commented 9 months ago

I can easily compile on Ubuntu 20 or 22. Is it that Redhat's support is not as good as Ubuntu's?

github-actions[bot] commented 7 months ago

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] commented 6 months ago

This issue was closed because it has been inactive for 14 days since being marked as stale.