编译Mxnet出错/usr/bin/ccache: invalid option -- 'E'

环境

Ubuntu 14.04 + Cmake3.2.2

今天用Cmake编译MxNet,报错/usr/bin/ccache: invalid option -- 'E',全部日志如下:

[  0%] Building NVCC (Device) object CMakeFiles/cuda_compile.dir/src/operator/cuda_compile_generated_pad.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 countrs
                         (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_pad.cu.o.cmake:206 (message):
  Error generating
  /home/research/mxnet/build/CMakeFiles/cuda_compile.dir/src/operator/./cuda_compile_generated_pad.cu.o


make[2]: *** [CMakeFiles/cuda_compile.dir/src/operator/cuda_compile_generated_pad.cu.o] Error 1
make[1]: *** [CMakeFiles/mxnet_static.dir/all] Error 2
make: *** [all] Error 2

解决

解决该问题需要尝试建立与 CUDA OpenCV 支持。CMake,CUDA 与 ccache 不明白一些奇怪的相互作用,它试图调用 ccache 包含无效的参数。我们可以通过指定您的系统编译器采用 cuda 技术而绕过这个问题︰

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

或者也可以指定自己安装的其他编译器。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值