R gputools:gcc:错误:无法识别的命令行选项'-Wp'

时间:2016-04-25 05:54:36

标签: r gcc gpu gpu-programming nvcc

我在R中安装gputools时遇到错误,我无法通过谷歌找到任何解决方案。 我使用命令install.packages("gputools")

  /usr/local/cuda/bin/nvcc -c -Xcompiler "-fpic -I/usr/local/include -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic" -I. -I"/usr/local/cuda/include" -I"/usr/lib64/R/include" rinterface.cu -o rinterface.o
gcc: error: unrecognized command line option ‘-Wp’
make: *** [rinterface.o] Error 1
ERROR: compilation failed for package ‘gputools’

有人可以帮助我吗?我的gpu卡由

提供
01:00.0 VGA compatible controller: NVIDIA Corporation GM107GL [Quadro K620] (rev a2)

2 个答案:

答案 0 :(得分:4)

好的,我得到了这个与几个黑客一起工作。这是第7期。

通过查看邮件列表解决了第一个问题。 https://github.com/nullsatz/gputools/issues/12

编辑Makefile,修改行' CFLAGS:put' \'之后' Wp' &安培;之前','

CFLAGS = -O2 -g -pipe -Wall -Werror = format-security -Wp \, - D_FORTIFY_SOURCE = 2 -fexceptions -fstack-protector-strong -param = ssp-buffer-size = 4 -grecord-gcc -switches -m64 -mtune = generic

第二个问题是没有找到R共享库。我尝试在驱动程序配置文件和命令行中设置LD_LIBRARY_PATH,但这不起作用。

我最终得到了以下黑客攻击:

cd / usr / local / cuda / lib64&& ln -s /usr/lib64/R/lib/libR.so libR.so

我使用以下命令进行构建(注意tar.gz文件现在包含修改后的Makefile)

R CMD INSTALL --configure-args =" - with-nvcc = / usr / local / cuda / bin / nvcc --with -r-lib = / usr / lib64 /&# 34; ./gputools_1.0.tar.gz

我知道这很难看,但似乎有效。

答案 1 :(得分:-1)

您的makefile似乎有拼写错误

-Wp,-D_FORTIFY_SOURCE=2

具体来说,逗号(',')应仅为空格('')。

请尝试并报告让我们知道发生了什么

相关问题