CUDA incompatible with my gcc version -
CUDA incompatible with my gcc version -
i have troubles compiling of examples shipped cuda sdk. have installed developers driver (version 270.41.19) , cuda toolkit, sdk (both 4.0.17 version).
initially didn't compile @ giving:
error -- unsupported gnu version! gcc 4.5 , not supported!
i found line responsible in 81:/usr/local/cuda/include/host_config.h , changed to:
//#if __gnuc__ > 4 || (__gnuc__ == 4 && __gnuc_minor__ > 4) #if __gnuc__ > 4 || (__gnuc__ == 4 && __gnuc_minor__ > 6)
from point on got few of examples compile, stops with:
in file included /usr/include/c++/4.6/x86_64-linux-gnu/bits/gthr.h:162:0, /usr/include/c++/4.6/ext/atomicity.h:34, /usr/include/c++/4.6/bits/ios_base.h:41, /usr/include/c++/4.6/ios:43, /usr/include/c++/4.6/ostream:40, /usr/include/c++/4.6/iterator:64, /usr/local/cuda/include/thrust/iterator/iterator_categories.h:38, /usr/local/cuda/include/thrust/device_ptr.h:26, /usr/local/cuda/include/thrust/device_malloc_allocator.h:27, /usr/local/cuda/include/thrust/device_vector.h:26, lineofsight.cu:37: /usr/include/c++/4.6/x86_64-linux-gnu/bits/gthr-default.h:251:1: error: pasting "__gthrw_" , "/* android's c library not provide pthread_cancel, check `pthread_create' instead. */" not give valid preprocessing token make[1]: *** [obj/x86_64/release/lineofsight.cu.o] error 1
as of examples compile reckon not driver problem, rather must have unsupported gcc version. downgrading not alternative gcc4.6 has whole scheme dependency @ point...
as pointed out, nvcc depends on gcc 4.4. possible configure nvcc utilize right version of gcc without passing compiler parameters adding softlinks bin directory created nvcc install.
the default cuda binary directory (the installation default) /usr/local/cuda/bin, adding softlink right version of gcc directory sufficient:
sudo ln -s /usr/bin/gcc-4.4 /usr/local/cuda/bin/gcc
gcc cuda debian
Comments
Post a Comment