gpt4 book ai didi

r - R包的编译错误

转载 作者:行者123 更新时间:2023-12-02 11:01:29 24 4
gpt4 key购买 nike

我想编译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

最佳答案

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

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

现在,我可以编译该软件包了。

关于r - R包的编译错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38317997/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com