由于程序兼容性问题,我需要将 GCC 降级到至少 4.9
我该怎么做呢?谢谢。
编辑:该程序是 Blender 并且正在尝试进行 GPU 渲染。控制台踢出的具体错误是
CUDA version 7.5 detected, build may succeed but only CUDA 6.5 is officially supported.
Compiling CUDA kernel ...
"/usr/local/cuda/bin/nvcc" -arch=sm_52 -m64 --cubin "/usr/share/blender/2.76/scripts/addons/cycles/kernel/kernels/cuda/kernel.cu" -o "/home/matthew/.config/blender/2.76/cache/cycles_kernel_sm52_3A157B804910758CA7C526B5EF063D78.cubin" --ptxas-options="-v" --use_fast_math -I"/usr/share/blender/2.76/scripts/addons/cycles/kernel" -DNVCC -D__KERNEL_CUDA_VERSION__=75
In file included from /usr/local/cuda/bin/../targets/x86_64-linux/include/cuda_runtime.h:76:0,
from <command-line>:0:
/usr/local/cuda/bin/../targets/x86_64-linux/include/host_config.h:115:2: error: #error -- unsupported GNU version! gcc versions later than 4.9 are not supported!
#error -- unsupported GNU version! gcc versions later than 4.9 are not supporte
^
CUDA kernel compilation failed, see console for details.
Refer to the Cycles GPU rendering documentation for possible solutions:
http://www.blender.org/manual/render/cycles/gpu_rendering.html
Error: CUDA kernel compilation failed, see console for details.`
Run Code Online (Sandbox Code Playgroud)
小智 6
就像@steeldriver 建议的那样,您需要使用 update-alternatives。正是关于这个问题的第 3 步。由于此时 4.9 是不支持的 4.9.3,因此您需要 4.8。
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 40 --slave /usr/bin/g++ g++ /usr/bin/g++-4.8 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 50 --slave /usr/bin/g++ g++ /usr/bin/g++-5
请记住在运行安装程序之前选择 gcc-4.8:
须藤更新替代品 --config gcc
之后,切换回默认使用 gcc-5。
(由于您要安装 CUDA SDK,因此我会补充一点,如果您想测试示例,您可能需要阅读此内容。)
归档时间: |
|
查看次数: |
45206 次 |
最近记录: |