I'm having trouble installing igraph on R 3.1.0 on OS X Mavericks with XCode 5.1.1. The error message I get is:
ld: illegal text-relocation to '___gmp_binvert_limb_table' in /usr/local/lib/libgmp.a(mp_minv_tab.o) from '___gmpn_divexact_1' in /usr/local/lib/libgmp.a(dive_1.o) for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [igraph.so] Error 1
ERROR: compilation failed for package ‘igraph’
Looking around, I found that I'm not the only one to have this issue and it's not limited to igraph ( here and here ), but adding CXXFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future
to ~/.R/Makevars
didn't help. From the error message, it looks like R found the system installation of GMP and not the Macports version, which could conceivably have been built for a different architecture. (Installing from binaries also didn't work for me, with an error message of image not found
, but it looks like this is a separate issue .) Has anyone else encountered similar issues?
sessionInfo()
gives:
R version 3.1.0 (2014-04-10)
Platform: x86_64-apple-darwin13.0.2 (64-bit)
Thanks in advance!
如果这对其他人有帮助,请使用Gabor Csardi的解决方案:R的二进制发行版。我是从源代码构建R的,而该版本不适用于从源代码或其他版本安装igraph二进制文件。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.