简体   繁体   中英

CUDA SDK issues with gcc/g++: old version of gcc can't find old version of g++?

I'm installing CUDA on F15. I'm well aware of the fact CUDA needs older versions gcc/g++ and I've installed gcc/g++ 4.5.1, and softlinked them as documented here . I no longer get the error mentioned in that post...however, when I tried compiling the SDK, I get the following error:

make[1]: Entering directory `/home/whao/NVIDIA_GPU_Computing_SDK/C/src/bilateralFilter'
gcc: error trying to exec 'cc1plus': execvp: No such file or directory
make[1]: *** [obj/x86_64/release/filter_kernel.cu.o] Error 1

I suspect that somehow, the older version of g++ in question isn't being recognized? For what it's worth, consider the following two outputs:

[whao@gen-whao-cuda C]$ /usr/local/cuda/bin/gcc --version
gcc (GCC) 4.5.1 20101130 (Red Hat 4.5.1-6)
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[whao@gen-whao-cuda C]$ /usr/local/cuda/bin/g++ --version
g++ (GCC) 4.5.1 20101130 (Red Hat 4.5.1-6)
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

There is a file named host_config.h where gcc version is checked (the path is /usr/local/cuda/include). You can comment out the appropriate if part (if gcc_version>4.5.* ....). gcc 4.5 may be supported in toolkit 4.1 but if this lines remain, there always be an error before even start compiling.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM