简体   繁体   English

gcc / g ++的CUDA SDK问题:旧版本的gcc找不到旧版本的g ++?

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

I'm installing CUDA on F15. 我正在F15上安装CUDA。 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 . 我非常了解CUDA需要较早版本的gcc / g ++的事实,并且我已经安装了gcc / g ++ 4.5.1,并按照此处的说明进行软链接。 I no longer get the error mentioned in that post...however, when I tried compiling the SDK, I get the following error: 我不再收到该文章中提到的错误...但是,当我尝试编译SDK时,出现以下错误:

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? 我怀疑以某种方式无法识别所讨论的旧版本g ++? 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). 有一个名为host_config.h的文件,其中检查了gcc版本(路径为/ usr / local / cuda / include)。 You can comment out the appropriate if part (if gcc_version>4.5.* ....). 您可以注释掉适当的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. gcc 4.5可能在工具包4.1中受支持,但是如果保留此行,那么即使开始编译也总是存在错误。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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