簡體   English   中英

Rfast安裝:/ usr / lib / R / etc / Makeconf:168:目標'Norm.o'的配方失敗

[英]Rfast installation: /usr/lib/R/etc/Makeconf:168: recipe for target 'Norm.o' failed

我正在嘗試安裝Rfast軟件包。 它給了我以下錯誤,

/usr/lib/R/etc/Makeconf:168: recipe for target 'Norm.o' failed
    make: *** [Norm.o] Error 1

完整的錯誤信息是這樣的,

> install.packages("Rfast", dependencies = TRUE)

* installing *source* package 'Rfast' ...
** package 'Rfast' successfully unpacked and MD5 sums checked
** libs
g++ -std=gnu++11 -I/usr/share/R/include -DNDEBUG  -I"/home/haseeb/R/x86_64-pc-linux-gnu-library/3.4/Rcpp/include" -I"/home/haseeb/R/x86_64-pc-linux-gnu-library/3.4/RcppArmadillo/include"   -fopenmp -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-AitvI6/r-base-3.4.4=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c Diag.cpp -o Diag.o
g++ -std=gnu++11 -I/usr/share/R/include -DNDEBUG  -I"/home/haseeb/R/x86_64-pc-linux-gnu-library/3.4/Rcpp/include" -I"/home/haseeb/R/x86_64-pc-linux-gnu-library/3.4/RcppArmadillo/include"   -fopenmp -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-AitvI6/r-base-3.4.4=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c Norm.cpp -o Norm.o
In file included from Norm.cpp:4:0:
templates.h: In function 'SEXPREC* eachrow_helper(SEXP, SEXP)':
templates.h:904:15: error: there are no arguments to 'DATAPTR' that depend on a template parameter, so a declaration of 'DATAPTR' must be available [-fpermissive]
   T *xx=(T *) DATAPTR(x),*xend=xx+ncol*nrow,*yy=(T *) DATAPTR(y),yvalue,*x3;
               ^~~~~~~
templates.h:904:15: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
templates.h:904:55: error: there are no arguments to 'DATAPTR' that depend on a template parameter, so a declaration of 'DATAPTR' must be available [-fpermissive]
   T *xx=(T *) DATAPTR(x),*xend=xx+ncol*nrow,*yy=(T *) DATAPTR(y),yvalue,*x3;
                                                       ^~~~~~~
templates.h:905:32: error: there are no arguments to 'DATAPTR' that depend on a template parameter, so a declaration of 'DATAPTR' must be available [-fpermissive]
   RETURN_TYPE *m=(RETURN_TYPE*)DATAPTR(mat);
                                ^~~~~~~
/usr/lib/R/etc/Makeconf:168: recipe for target 'Norm.o' failed
make: *** [Norm.o] Error 1
ERROR: compilation failed for package 'Rfast'

我的sessioninfo如下,

> sessionInfo()
R version 3.4.4 (2018-03-15)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.1 LTS

Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.7.1
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.7.1

locale:
 [1] LC_CTYPE=C                 LC_NUMERIC=C               LC_TIME=de_DE.UTF-8       
 [4] LC_COLLATE=C               LC_MONETARY=de_DE.UTF-8    LC_MESSAGES=C             
 [7] LC_PAPER=de_DE.UTF-8       LC_NAME=C                  LC_ADDRESS=C              
[10] LC_TELEPHONE=C             LC_MEASUREMENT=de_DE.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] compiler_3.4.4 tools_3.4.4    yaml_2.2.0 

有誰可以幫助我解決此問題?

我相信問題是我忘記添加

#include <Rinlinedfuns.h>

但我無法使用此文件。 DATAPTR在此文件中聲明。

我在運行Ubuntu 16.04的台式機和筆記本電腦上遇到了完全相同的錯誤,但不知如何解決。

對我來說,這似乎是一種不好的編碼習慣(在沒有事先聲明的情況下使用DATAPTR(x)函數)。 我試圖在頭文件中找到DATAPTR的聲明,但沒有找到。

DATAPTR(x)/usr/share/R/include/Rinternals.h定義,該文件未明確包含在Norm.cpp ,而在Diag.cpp包含,后者編譯時沒有錯誤。

我不知道為什么它會在其他機器上編譯,而僅在我們的機器上失敗。 g ++版本是:

g ++(Ubuntu 5.4.0-6ubuntu1〜16.04.10)5.4.0 20160609

我希望如果Rinternals.h沒有明確包含在任何需要的地方DATAPTR那么它應該在所有的安裝失敗,除非在某種程度上有一種方法來指示編譯器包括Rinternals.h默認?

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM