【发布时间】:2018-10-12 14:39:12
【问题描述】:
我正在尝试在 Linux Mint 下使用标志 --enable-R-shlib 从源代码安装 R 3.5.0。在没有标志的情况下配置和安装它可以正常工作,但 RStudio 需要设置标志。但是,运行时
./configure --enable-R-shlib
make
我得到了错误
/usr/bin/ld: CommandLineArgs.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
CommandLineArgs.o: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
Makefile:177: recipe for target 'libR.so' failed
make[3]: *** [libR.so] Error 1
make[3]: Leaving directory '/home/hps/Downloads/R-3.5.0/src/main'
Makefile:135: recipe for target 'R' failed
make[2]: *** [R] Error 2
make[2]: Leaving directory '/home/hps/Downloads/R-3.5.0/src/main'
Makefile:28: recipe for target 'R' failed
make[1]: *** [R] Error 1
make[1]: Leaving directory '/home/hps/Downloads/R-3.5.0/src'
Makefile:60: recipe for target 'R' failed
make: *** [R] Error 1
我尝试按照 [1] 的建议设置错误消息中提到的 -fPIC 标志
CC="gcc -fPIC" ./configure --enable-R-shlib
无济于事,我仍然收到相同的错误消息。
【问题讨论】:
标签: r ubuntu gcc makefile linux-mint