Because of program compatibility issues I need to downgrade GCC to at least 4.9
How do I do this? Thanks.
EDIT: The program is Blender and am trying to do GPU rendering. The specific error the console is kicking out is
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.`
sudo apt-get install gcc-4.9? – muru Jan 24 '16 at 02:13gcc-4.9instead of justgcc.) – fkraiem Jan 24 '16 at 02:35gcc-4.9 is already the newest versionHowever doinggcc -vorgcc --versionstill says 5.2.1 – Mattr567 Jan 24 '16 at 02:57gcc-4.xdoesn't 'downgrade' gcc in the sense you are probably thinking, it just installs it as a separate executable. So unless you symlink it (or use theupdate-alternativesmechanism) you will need to invoke the alternate version explicitly asgcc-4.9like @fkraiem said. If your program uses amake, one way may be to pass aCC=/usr/bin/gcc-4.9on the command line - tell us more about your program and we may be able to give more detailed advice. – steeldriver Jan 24 '16 at 03:32export CC=/usr/bin/gcc-4.9and/orexport CXX=/usr/bin/g++-4.9at the start? – steeldriver Jan 24 '16 at 13:06export CC=/usr/bin/gcc-4.9andexport CXX=/usr/bin/g++-4.9but blender still complains even when I resinstall it. From looking at the other thread @bain posted I have to tell CUDA to use 4.9 since it is already installed. Looking at the thread I have to donvcc --compiler-bindir /usr/bin/gcc-4.9+ some other stuff not specified, but what else do I have to do, otherwise without it, it just outputsnvcc fatal : No input files specified; use option --help for more information– Mattr567 Jan 24 '16 at 20:25/usr/local/cuda/bin/../targets/x86_64-linux/include/host_config.h, look in there to see what tests determine the gcc version so you may get an idea of the env variable to set. – sambler Jan 25 '16 at 01:58#if defined(__GNUC__)#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 9)
– Mattr567 Jan 25 '16 at 02:13#error -- unsupported GNU version! gcc versions later than 4.9 are not supported!