I am having trouble compiling some of the examples that come with the CUDA SDK. I installed the developer driver (version 270.41.19) and the CUDA toolkit, then finally the SDK (version 4.0.17).
Initially, it did not compile at all:
error -- unsupported GNU version! gcc 4.5 and up are not supported!
I found the line responsible for 81: /usr/local/cuda/include/host_config.h and changed it to:
//#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 4) #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 6)
from that moment I got only a few examples for compilation, it stops:
In file included from /usr/include/c++/4.6/x86_64-linux-gnu/bits/gthr.h:162:0, from /usr/include/c++/4.6/ext/atomicity.h:34, from /usr/include/c++/4.6/bits/ios_base.h:41, from /usr/include/c++/4.6/ios:43, from /usr/include/c++/4.6/ostream:40, from /usr/include/c++/4.6/iterator:64, from /usr/local/cuda/include/thrust/iterator/iterator_categories.h:38, from /usr/local/cuda/include/thrust/device_ptr.h:26, from /usr/local/cuda/include/thrust/device_malloc_allocator.h:27, from /usr/local/cuda/include/thrust/device_vector.h:26, from lineOfSight.cu:37: /usr/include/c++/4.6/x86_64-linux-gnu/bits/gthr-default.h:251:1: error: pasting "__gthrw_" and "/* Android C library does not provide pthread_cancel, check for `pthread_create' instead. */" does not give a valid preprocessing token make[1]: *** [obj/x86_64/release/lineOfSight.cu.o] Error 1
As some of the examples compile, I believe this is not a driver issue, but rather should have something to do with an unsupported version of gcc. Downgrading is not an option, since gcc4.6 has the whole system as a dependency at the moment ...
gcc debian cuda
fbielejec Jul 08 '11 at 9:25 a.m. 2011-07-08 09:25
source share