首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >编译ethminer时不支持迟于5的gcc版本。

编译ethminer时不支持迟于5的gcc版本。
EN

Ask Ubuntu用户
提问于 2017-07-19 12:05:36
回答 1查看 5.9K关注 0票数 2

重要内容:

你好,Ubuntu的用户。最近,我决定踏入Ethereum矿业世界,自己编写ethminer。然而,在安装cuda之后,我遇到了一个小问题。在执行sudo cmake --build .后执行cmake .. -DETHASHCUDA=ON -DETHASHCL=OFF时,控制台输出如下内容:

代码语言:javascript
复制
[  0%] Built target BuildInfo.h
[ 29%] Built target devcore
[ 41%] Built target ethash
[ 45%] Building NVCC (Device) object libethash-cuda/CMakeFiles/ethash-cuda.dir/ethash-cuda_generated_ethash_cuda_miner_kernel.cu.o
In file included from /usr/local/cuda/include/cuda_runtime.h:78:0,
                 from <command-line>:0:
/usr/local/cuda/include/host_config.h:119:2: error: #error -- unsupported GNU version! gcc versions later than 5 are not supported!
 #error -- unsupported GNU version! gcc versions later than 5 are not supported!
  ^~~~~
CMake Error at ethash-cuda_generated_ethash_cuda_miner_kernel.cu.o.Release.cmake:222 (message):
  Error generating
  /home/diamond/ethminer/build/libethash-cuda/CMakeFiles/ethash-cuda.dir//./ethash-cuda_generated_ethash_cuda_miner_kernel.cu.o


libethash-cuda/CMakeFiles/ethash-cuda.dir/build.make:63: recipe for target 'libethash-cuda/CMakeFiles/ethash-cuda.dir/ethash-cuda_generated_ethash_cuda_miner_kernel.cu.o' failed
make[2]: *** [libethash-cuda/CMakeFiles/ethash-cuda.dir/ethash-cuda_generated_ethash_cuda_miner_kernel.cu.o] Error 1
CMakeFiles/Makefile2:232: recipe for target 'libethash-cuda/CMakeFiles/ethash-cuda.dir/all' failed
make[1]: *** [libethash-cuda/CMakeFiles/ethash-cuda.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2

附加信息:

我用sudo apt install cuda安装了数据自动化系统。它自己安装了nvidia-275cuda (还有很多其他的东西)

EN

回答 1

Ask Ubuntu用户

发布于 2019-02-14 06:04:47

这解决了我的问题:

代码语言:javascript
复制
sudo rm /usr/local/cuda/bin/gcc
sudo rm /usr/local/cuda/bin/g++
sudo apt install gcc-5 g++-5
sudo ln -s /usr/bin/gcc-5 /usr/local/cuda/bin/gcc
sudo ln -s /usr/bin/g++-5 /usr/local/cuda/bin/g++
票数 0
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/937684

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档