1
我正在嘗試安裝R
的plyr
程序包。以下是錯誤消息:loop_apply.o:無法識別文件:無法識別文件格式
* installing *source* package ‘plyr’ ...
** package ‘plyr’ successfully unpacked and MD5 sums checked
** libs
clang++ -I/opt/R-3.4.1/include -DNDEBUG -I"/home/isomorphismes/R/i686-pc-linux-gnu-library/3.4/Rcpp/include" -I/usr/local/include -fpic -I/opt/boost_1_61_0/boost -c RcppExports.cpp -o RcppExports.o
clang -I/opt/R-3.4.1/include -DNDEBUG -I"/home/cd/R/i686-pc-linux-gnu-library/3.4/Rcpp/include" -I/usr/local/include -fpic -g -O2 -flto -c loop_apply.c -o loop_apply.o
clang++ -I/opt/R-3.4.1/include -DNDEBUG -I"/home/isomorphismes/R/i686-pc-linux-gnu-library/3.4/Rcpp/include" -I/usr/local/include -fpic -I/opt/boost_1_61_0/boost -c split-numeric.cpp -o split-numeric.o
clang++ -shared -L/usr/local/lib -o plyr.so RcppExports.o loop_apply.o split-numeric.o
loop_apply.o: file not recognized: File format not recognized
clang: error: linker command failed with exit code 1 (use -v to see invocation)
/opt/R-3.4.1/share/make/shlib.mk:6: recipe for target 'plyr.so' failed
make: *** [plyr.so] Error 1
ERROR: compilation failed for package ‘plyr’
* removing ‘/home/cd/R/i686-pc-linux-gnu-library/3.4/plyr’
的*.o
文件在/opt/plyr/src
,從github.com/hadley/plyr。他們看起來像這樣我的系統上:
[email protected]:/opt/plyr/src$ file *o
loop_apply.o: LLVM IR bitcode
RcppExports.o: ELF 32-bit LSB relocatable, Intel 80386, version 1 (SYSV), not stripped
split-numeric.o: ELF 32-bit LSB relocatable, Intel 80386, version 1 (SYSV), not stripped
哈。通過忽略@ TonyFischetti的建議:http://www.onthelambda.com/2013/11/22/compiling-r-from-source-and-why-you-shouldnt-do-it/感謝DaBookshah。 – isomorphismes
我不知道如何更改安裝過程(如更改編譯行或鏈接器),但不使用'./configure --enable-lto'編譯。我想這個問題提供了一個答案https://stackoverflow.com/questions/23736507/is-there-any-reason-why-not-to-use-link-time-optimization? – isomorphismes
*但編譯時沒有'./configure --enable-lto'解決它。 – isomorphismes