R包的编译错误

时间:2016-07-11 23:58:13

标签: r compiler-errors fedora cran

我想编译hsphase包(CRAN中可用的R包)。

我在R install.packages("hsphase")中使用了此命令。

我遇到以下错误:

g++ -m64 -shared -L/usr/lib64/R/lib -Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -o hsphase.so FastDist.o MAF.o Ohd.o TypeConversion.o block.o block4Phase.o co.o diag.o hsp.o main.o memory.o oh.o swDetect.o [1] 0 -L/usr/lib64/R/lib -lRlapack -L/usr/lib64/R/lib -lRblas -lgfortran -lm -lquadmath -fopenmp -L/usr/lib64/R/lib -lR
g++: error: [1]: No such file or directory
g++: error: 0: No such file or directory
/usr/share/R/make/shlib.mk:6: recipe for target 'hsphase.so' failed
make: *** [hsphase.so] Error 1
ERROR: compilation failed for package ‘hsphase’
* removing ‘/home/mhf/R/x86_64-redhat-linux-gnu-library/3.3/hsphase’

The downloaded source packages are in
    ‘/tmp/RtmpYukJQa/downloaded_packages’
Warning message:
In install.packages("hsphase") :
  installation of package ‘hsphase’ had non-zero exit status

我正在使用fedora 24。

g ++版本: gcc版本6.1.1 20160621(Red Hat 6.1.1-3)(GCC)

请检查链接标志: 这是什么: [1] 0

1 个答案:

答案 0 :(得分:0)

我在scr / Makevars文件中注释了这一行:

#PKG_LIBS = `$(R_HOME)/bin/Rscript -e "Rcpp:::LdFlags()"` $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS) $(SHLIB_OPENMP_CXXFLAGS)

现在,我可以编译包。