skip to Main Content

when compile R from source, configure was completed and some error arised in make step. How to set the compile parameter?

OS is CentOS release 6.9. I used conda to install R originally. For some error when installing some packages, i want to install R from source. A post said that may be libicu version matter. But after setting pathway in CFLAGS and LDFLAGS to find libicu*, these error still occurred. What is the problem?

./configure  --prefix=/pathto/R_3.6.0  --enable-R-shlib CPPFLAGS="-I/usr/include -I/path/zlib_1.2.11/include -I/path/bzip2-1.0.6/include -I/path/xz-5.2.4/include -I/path/pcre-8.43/include" LDFLAGS="-L/usr/lib -L/usr/lib64 -L/path/zlib_1.2.11/lib -L/path/bzip2-1.0.6/lib -L/path/xz-5.2.4/lib -L/path/pcre-8.43/lib -Wl,-rpath=/path/pcre-8.43/lib -Wl,-rpath=/path/xz-5.2.4/lib"

make

../../lib/libR.so: undefined reference to `ucol_strcollIter_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_close_58'
../../lib/libR.so: undefined reference to `ucol_getLocaleByType_58'
../../lib/libR.so: undefined reference to `ucol_setAttribute_58'
../../lib/libR.so: undefined reference to `u_versionToString_58'
../../lib/libR.so: undefined reference to `ucol_open_58'
../../lib/libR.so: undefined reference to `uiter_setUTF8_58'
../../lib/libR.so: undefined reference to `ucol_setStrength_58'
collect2: ld returned 1 exit status
make[3]: *** [Makefile:145: R.bin] Error 1
make[3]: Leaving directory '/software/R-3.6.0/src/main'
make[2]: *** [Makefile:136: R] Error 2
make[2]: Leaving directory '/software/R-3.6.0/src/main'
make[1]: *** [Makefile:28: R] Error 1
make[1]: Leaving directory '/software/R-3.6.0/src'
make: *** [Makefile:61: R] Error 1

2

Answers


  1. Chosen as BEST ANSWER

    i tried again and download icu4c-58_2-src.tgz. Without installing icu, uncompressing the file and specifying -L/path/to/icu/source/lib/ in LDFLAGS and make will succeed.


  2. Thanks Ren, I successfully install R with this commander “./configure –prefix=/path/to/location LDFLAGS=”-L/usr/local/lib” . Where /usr/local/lib is the directory icu installed (wget https://github.com/unicode-org/icu/archive/release-58-3.tar.gz). I think it is the problem that anaconda/lib also contained libicuio.so.* files. After specifying certain LDFLAGS, it worked.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search