Prerequisites
Your exact command line to replicate the issue
cmake .. -DLLAMA_CUBLAS=ON -DLLAMA_STATIC=1
make
Environment and Context
-
Physical (or virtual) hardware you are using, e.g. for Linux:
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
-
Operating System, e.g. for Linux:
CentOS 7 + gcc11.3 + cuda 11.6
Steps to Reproduce
- cmake .. -DLLAMA_CUBLAS=ON -DLLAMA_STATIC=1
- make
Failure Logs
...
Consolidate compiler generated dependencies of target quantize-stats
/usr/bin/ld: cannot find -ldl
/usr/bin/ld: attempted static link of dynamic object `/usr/lib64/librt.so'
/usr/bin/ld: cannot find -ldl
/usr/bin/ld: attempted static link of dynamic object `/usr/lib64/librt.so'
/usr/bin/ld: cannot find -ldl
/usr/bin/ld: attempted static link of dynamic object `/usr/lib64/librt.so'
/usr/bin/ld: cannot find -ldl
/usr/bin/ld: attempted static link of dynamic object `/usr/lib64/librt.so'
collect2: error: ld returned 1 exit status
make[2]: *** [bin/test-sampling] Error 1
collect2: error: ld returned 1 exit status
make[2]: *** [bin/test-quantize-perf] Error 1
collect2: error: ld returned 1 exit status
make[1]: *** [tests/CMakeFiles/test-sampling.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make[2]: *** [bin/falcon_quantize] Error 1
collect2: error: ld returned 1 exit status
make[1]: *** [tests/CMakeFiles/test-quantize-perf.dir/all] Error 2
make[1]: *** [examples/falcon_quantize/CMakeFiles/falcon_quantize.dir/all] Error 2
make[2]: *** [bin/test-quantize-fns] Error 1
make[1]: *** [tests/CMakeFiles/test-quantize-fns.dir/all] Error 2
When adding CMAKE_VERBOSE_MAKEFILE=1:
g++ -O3 -DNDEBUG -static CMakeFiles/quantize-stats.dir/quantize-stats.cpp.o -o ../../bin/quantize-stats
-L/usr/local/cuda/targets/x86_64-linux/lib/stubs -L/usr/local/cuda/targets/x86_64-linux/lib
../../libllama.a -pthread /usr/local/cuda/lib64/libcudart_static.a -pthread -ldl
/usr/lib64/librt.so /usr/local/cuda/lib64/libcublas_static.a /usr/local/cuda/lib64/libcublasLt_static.a
/usr/local/cuda/lib64/libculibos.a -lcudadevrt -lcudart_static
-lrt -lpthread -ldl
For some reasons (mainly the added "-static"), cmake adds both "/usr/lib64/librt.so" (not a static lib) and "-lrt" (that one is usually acceptable even for a static build).
Prerequisites
Your exact command line to replicate the issue
Environment and Context
Physical (or virtual) hardware you are using, e.g. for Linux:
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
Operating System, e.g. for Linux:
CentOS 7 + gcc11.3 + cuda 11.6
Steps to Reproduce
Failure Logs
When adding CMAKE_VERBOSE_MAKEFILE=1:
For some reasons (mainly the added "-static"), cmake adds both "/usr/lib64/librt.so" (not a static lib) and "-lrt" (that one is usually acceptable even for a static build).