Disable ccache option not working
Please include information about your system, the steps to reproduce the bug, and the version of llama.cpp that you are using. If possible, please provide a minimal code example that reproduces the bug.
I am running the latest version of llama.cpp.
- I interrupted the
makebuild process usingctrl+c. - Subsequent build with
makefails with the error messageI ccache found, compilation results will be cached. Disable with LLAMA_NO_CCACHE.
I ccache found, compilation results will be cached. Disable with LLAMA_NO_CCACHE.
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 -Wno-format-truncation -Wextra-semi
I NVCCFLAGS: -O3
I LDFLAGS:
I CC: cc (GCC) 12.3.1 20230508 (Red Hat 12.3.1-1)
I CXX: g++ (GCC) 12.3.1 20230508 (Red Hat 12.3.1-1)
/usr/bin/ccache 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 -Wno-format-truncation -Wextra-semi -c examples/main/main.cpp -o examples/main/main.o
/usr/bin/ccache 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 -Wno-format-truncation -Wextra-semi ggml.o llama.o common.o sampling.o grammar-parser.o build-info.o console.o ggml-alloc.o ggml-backend.o ggml-quants.o examples/main/main.o -o main
/usr/bin/ld: ggml.o: in function `ggml_init':
ggml.c:(.text+0x1c24a): undefined reference to `ggml_init_cublas'
/usr/bin/ld: ggml.o: in function `ggml_graph_compute_thread':
ggml.c:(.text+0x2f759): undefined reference to `ggml_cuda_compute_forward'
/usr/bin/ld: ggml.c:(.text+0x2f891): undefined reference to `ggml_cuda_compute_forward'
/usr/bin/ld: ggml.c:(.text+0x2f8b9): undefined reference to `ggml_cuda_compute_forward'
/usr/bin/ld: ggml.c:(.text+0x2f95a): undefined reference to `ggml_cuda_compute_forward'
/usr/bin/ld: ggml.c:(.text+0x2f9cf): undefined reference to `ggml_cuda_compute_forward'
/usr/bin/ld: ggml.o:ggml.c:(.text+0x2fa00): more undefined references to `ggml_cuda_compute_forward' follow
/usr/bin/ld: llama.o: in function `llm_load_tensors(llama_model_loader&, llama_model&, int, llama_split_mode, int, float const*, bool, bool (*)(float, void*), void*)':
llama.cpp:(.text+0x13257): undefined reference to `ggml_backend_cuda_host_buffer_type'
/usr/bin/ld: llama.cpp:(.text+0x132d4): undefined reference to `ggml_backend_cuda_host_buffer_type'
/usr/bin/ld: llama.cpp:(.text+0x1331e): undefined reference to `ggml_backend_cuda_buffer_type'
/usr/bin/ld: llama.cpp:(.text+0x13362): undefined reference to `ggml_backend_cuda_buffer_type'
/usr/bin/ld: llama.cpp:(.text+0x1336c): undefined reference to `ggml_backend_cuda_host_buffer_type'
/usr/bin/ld: llama.cpp:(.text+0x13395): undefined reference to `ggml_backend_cuda_host_buffer_type'
/usr/bin/ld: llama.cpp:(.text+0x135e5): undefined reference to `ggml_backend_cuda_buffer_type'
/usr/bin/ld: llama.cpp:(.text+0x13b94): undefined reference to `ggml_backend_cuda_get_device_count'
/usr/bin/ld: llama.cpp:(.text+0x13ba9): undefined reference to `ggml_backend_cuda_split_buffer_type'
/usr/bin/ld: llama.cpp:(.text+0x13bbf): undefined reference to `ggml_backend_cuda_get_device_count'
/usr/bin/ld: llama.cpp:(.text+0x13ef0): undefined reference to `ggml_backend_cuda_buffer_type'
/usr/bin/ld: llama.cpp:(.text+0x13f97): undefined reference to `ggml_backend_cuda_buffer_type'
/usr/bin/ld: llama.cpp:(.text+0x14093): undefined reference to `ggml_backend_cuda_get_device_memory'
/usr/bin/ld: llama.cpp:(.text+0x140c9): undefined reference to `ggml_backend_cuda_host_buffer_type'
/usr/bin/ld: llama.cpp:(.text+0x14113): undefined reference to `ggml_backend_cuda_host_buffer_type'
/usr/bin/ld: llama.cpp:(.text+0x14171): undefined reference to `ggml_backend_cuda_host_buffer_type'
/usr/bin/ld: llama.cpp:(.text+0x14189): undefined reference to `ggml_backend_cuda_host_buffer_type'
/usr/bin/ld: llama.cpp:(.text+0x15484): undefined reference to `ggml_backend_cuda_host_buffer_type'
/usr/bin/ld: llama.o: in function `llama_new_context_with_model':
llama.cpp:(.text+0x2a2db): undefined reference to `ggml_backend_cuda_init'
/usr/bin/ld: llama.cpp:(.text+0x2a610): undefined reference to `ggml_backend_cuda_get_device_count'
/usr/bin/ld: llama.cpp:(.text+0x2a621): undefined reference to `ggml_backend_cuda_init'
/usr/bin/ld: llama.cpp:(.text+0x2aeab): undefined reference to `ggml_backend_cuda_host_buffer_type'
/usr/bin/ld: llama.cpp:(.text+0x2af61): undefined reference to `ggml_backend_cuda_host_buffer_type'
/usr/bin/ld: llama.cpp:(.text+0x2b29b): undefined reference to `ggml_backend_cuda_host_buffer_type'
/usr/bin/ld: ggml-backend.o: in function `ggml_backend_reg_get_count':
ggml-backend.c:(.text+0x33a1): undefined reference to `ggml_backend_cuda_reg_devices'
/usr/bin/ld: ggml-backend.o: in function `ggml_backend_reg_find_by_name':
ggml-backend.c:(.text+0x33fb): undefined reference to `ggml_backend_cuda_reg_devices'
/usr/bin/ld: ggml-backend.o: in function `ggml_backend_reg_get_name':
ggml-backend.c:(.text+0x34a2): undefined reference to `ggml_backend_cuda_reg_devices'
/usr/bin/ld: ggml-backend.o: in function `ggml_backend_reg_get_default_buffer_type':
ggml-backend.c:(.text+0x3542): undefined reference to `ggml_backend_cuda_reg_devices'
/usr/bin/ld: ggml-backend.o: in function `ggml_backend_reg_alloc_buffer':
ggml-backend.c:(.text+0x35ea): undefined reference to `ggml_backend_cuda_reg_devices'
/usr/bin/ld: ggml-backend.o:ggml-backend.c:(.text+0x369a): more undefined references to `ggml_backend_cuda_reg_devices' follow
collect2: error: ld returned 1 exit status
make: *** [Makefile:637: main] Error 1
I tried passing LLAMA_NO_CCACHE as an option but that doesn't work.
Question
- How do I disable / ignore or force build the make process again?
What specific commands are you running? On my system ccache can be disabled with:
make clean && time make LLAMA_NO_CCACHE=1
oh I was trying the wrong command earlier. That worked for me, thank you.
I have a similar issue, how did you fix it?
I have a similar issue, how did you fix it?
make clean && time make LLAMA_NO_CCACHE=1