R gputools: gcc: error: unrecognized command line option ‘-Wp’
R gputools: gcc: error: unrecognized command line option ‘-Wp’
我在 R 中安装 gputools
时出错,我找不到 google 的任何解决方案。
我使用命令 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)
好的,我通过一些小技巧来解决这个问题。这是针对 centos 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-开关-m64 -mtune=generic
第二个问题是找不到 R 共享库。我尝试在驱动程序配置文件和命令行中设置 LD_LIBRARY_PATH,但这没有用。
我最终得到了以下 hack:
cd /usr/local/cuda/lib64 && ln -s /usr/lib64/R/lib/libR.so libR.so
我使用以下命令构建(注意 tar.gz 文件现在包含修改后的 Makefile)
R CMD 安装 --configure-args="--with-nvcc=/usr/local/cuda/bin/nvcc --with-r-lib=/usr/lib64/" ./gputools_1.0.tar.gz
我知道这很丑陋,但它似乎有效。
你的 makefile 好像有错别字
-Wp,-D_FORTIFY_SOURCE=2
具体来说,逗号 (',') 应该只是 space (' ')。
请尝试一下,然后向我们报告发生了什么事
我在 R 中安装 gputools
时出错,我找不到 google 的任何解决方案。
我使用命令 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)
好的,我通过一些小技巧来解决这个问题。这是针对 centos 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-开关-m64 -mtune=generic
第二个问题是找不到 R 共享库。我尝试在驱动程序配置文件和命令行中设置 LD_LIBRARY_PATH,但这没有用。
我最终得到了以下 hack:
cd /usr/local/cuda/lib64 && ln -s /usr/lib64/R/lib/libR.so libR.so
我使用以下命令构建(注意 tar.gz 文件现在包含修改后的 Makefile)
R CMD 安装 --configure-args="--with-nvcc=/usr/local/cuda/bin/nvcc --with-r-lib=/usr/lib64/" ./gputools_1.0.tar.gz
我知道这很丑陋,但它似乎有效。
你的 makefile 好像有错别字
-Wp,-D_FORTIFY_SOURCE=2
具体来说,逗号 (',') 应该只是 space (' ')。
请尝试一下,然后向我们报告发生了什么事