/usr/bin/ccache: invalid option -- 'E'

32 篇文章 1 订阅

https://blog.csdn.net/u013270341/article/details/79647237

编译包含CUDA的OpenCV 时遇到问题

[  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

解决方法:

主要是opencv编译调用了ccache中错误的变量’E’, 可以通过指定特定的系统编译器来编译

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

有的人还说要提高Cmake的版本,这个方法无法解决的人可以尝试一下,大概的安装方法贴这了:

sudo apt-get remove cmake
chmod +x ./cmake-***.sh
sudo ./cmake-***.sh
sudo ln -sf /opt/cmake-***/bin/* /usr/local/bin
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值