ccache的caffe cmake错误

Pen*_* Lu 6 gcc cmake deep-learning caffe

当我成功'cmake ...'caffe build时,我先用'make all'命令,但在下面发现了一个错误.我不知道NVCC或gcc是否有问题.

[  1%] Built target proto
[  1%] Building NVCC (Device) object src/caffe/CMakeFiles/cuda_compile.dir/layers/cuda_compile_generated_split_layer.cu.o
/usr/bin/ccache: invalid option -- 'E'
Usage:
ccache [options]
ccache compiler [compiler options]
compiler [compiler options]          (via symbolic link)

Options:
-c, --cleanup         delete old files and recalculate size counters
                      (normally not needed as this is done automatically)
-C, --clear           clear the cache completely
-F, --max-files=N     set maximum number of files in cache to N (use 0 for
                      no limit)
-M, --max-size=SIZE   set maximum size of cache to SIZE (use 0 for no
                      limit; available suffixes: G, M and K; default
                      suffix: G)
-s, --show-stats      show statistics summary
-z, --zero-stats      zero statistics counters

-h, --help            print this help text
-V, --version         print version and copyright information

See also <http://ccache.samba.org>.
CMake Error at cuda_compile_generated_split_layer.cu.o.cmake:206 (message):
Error generating
/home/gpuusr/lpq/caffe-332/build/src/caffe/CMakeFiles/cuda_compile.dir/layers/./cuda_compile_generated_split_layer.cu.o


make[2]: *** [src/caffe/CMakeFiles/cuda_compile.dir/layers/cuda_compile_generated_split_layer.cu.o] Error 1
make[1]: *** [src/caffe/CMakeFiles/caffe.dir/all] Error 2
make: *** [all] Error 2
Run Code Online (Sandbox Code Playgroud)

Ant*_*ony 11

尝试使用CUDA支持构建OpenCV时,我遇到了类似的问题.我不理解CMake,CUDA和ccache之间的一些奇怪的交互,它试图用无效的参数调用ccache.您可以通过为CUDA指定系统编译器来绕过此:

cmake -DCUDA_HOST_COMPILER=/usr/bin/g++ ..

(或者你正在使用的任何编译器.)