I'm trying to compile and install R version 4 on my computer which is running Ubuntu 18.04.
I'm currently following these instructions Posit - Install R from Source - Posit Documentation
Using the Ubuntu/Debian tabs.
Everything runs as expected at first. However when I get to the make
line I get the following errors.
../../lib/libR.so: undefined reference to `u_versionToString_58'
../../lib/libR.so: undefined reference to `u_getVersion_58'
../../lib/libR.so: undefined reference to `uloc_setDefault_58'
../../lib/libR.so: undefined reference to `ucol_setStrength_58'
../../lib/libR.so: undefined reference to `ucol_open_58'
../../lib/libR.so: undefined reference to `libiconv'
../../lib/libR.so: undefined reference to `ucol_close_58'
../../lib/libR.so: undefined reference to `libiconv_close'
../../lib/libR.so: undefined reference to `ucol_strcollIter_58'
../../lib/libR.so: undefined reference to `_libiconv_version'
../../lib/libR.so: undefined reference to `libiconv_open'
../../lib/libR.so: undefined reference to `ucol_setAttribute_58'
../../lib/libR.so: undefined reference to `uiter_setUTF8_58'
../../lib/libR.so: undefined reference to `ucol_getLocaleByType_58'
collect2: error: ld returned 1 exit status
Makefile:150: recipe for target 'R.bin' failed
I've found some other references to this problem elsewhere, but people seem to have slightly different systems to mine in these cases.
Similar Posts:
This post is similar, and has no posted solution:
Someone suggested compiling in docker, but that sounds ... challenging
I tried running
./configure \
--prefix=/opt/R/${R_VERSION} \
--enable-R-shlib \
--enable-memory-profiling \
--with-blas \
--with-lapack \
LDFLAGS="-L/home/jacob/Programs/icu-release-58-3"
Where I had downloaded but not extracted icu-release. However, I get the same error on make
.
Any suggestions about how I move forward and get the installation to work? Thanks all.