fastLLaMa: Getting Error with make command
make[2]: *** No rule to make target `../fastLLaMa/libllama.a', needed by `fastLlama.so'. Stop.
make[1]: *** [CMakeFiles/fastLlama.dir/all] Error 2
make: *** [all] Error 2
Edit:
Getting Error with make
command from build.sh
file:
cc -I. -O3 -DNDEBUG -std=c11 -fPIC -pthread -mavx -mavx2 -mfma -mf16c -msse3 -c ggml.c -o ggml.o
ggml.c: In function 'ggml_time_ms':
ggml.c:308:21: error: storage size of 'ts' isn't known
308 | struct timespec ts;
| ^~
ggml.c:309:5: warning: implicit declaration of function 'clock_gettime' [-Wimplicit-function-declaration]
309 | clock_gettime(CLOCK_MONOTONIC, &ts);
| ^~~~~~~~~~~~~
ggml.c:309:19: error: 'CLOCK_MONOTONIC' undeclared (first use in this function)
309 | clock_gettime(CLOCK_MONOTONIC, &ts);
| ^~~~~~~~~~~~~~~
ggml.c:309:19: note: each undeclared identifier is reported only once for each function it appears in
ggml.c: In function 'ggml_time_us':
ggml.c:314:21: error: storage size of 'ts' isn't known
314 | struct timespec ts;
| ^~
ggml.c:315:19: error: 'CLOCK_MONOTONIC' undeclared (first use in this function)
315 | clock_gettime(CLOCK_MONOTONIC, &ts);
| ^~~~~~~~~~~~~~~
make: *** [ggml.o] Error 1
Unable to build static library 'libllama'
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 22 (8 by maintainers)
You can start with this as my machine is slow to build so I’m unsure at which stage it will not work. Possibly have to swap dev toolset from 10 to 11.
While I appreciate the enthusiasm, the fix I provided will work for his scenario based on his environment (I replicated it with Docker). So adding that line for everyone will produce issues that will not work, unless ofcourse it’s added in a
define
in the Makefile which unfortunately don’t know how to do. If anyone’s willing to do that he must handle the Makefile correctly. 🙏🏻try to export
CC
andCXX
with latest gcc toolchain.@imranraad07 add
CFLAGS += -D_POSIX_C_SOURCE=199309L
to line 160 in Makefile. @PotatoSpudowski you need to add support in the Makefile for CentOS if you like.Added CentOS (RHEL) support in #11
Thanks @amitsingh19975! It worked.