Reputation: 11
OS: Redhat 7.4
R: 3.4.2
stringi: 1.2.2
Hello, I've been working to configure an R repository for our business users. Unfortunately, I've been stuck while trying to install stringi. I've been running into errors while attempting the install and so far my research hasn't turned up much. I'm sure it's one of those problems that will probably be extremely obvious in retrospect.
root@ljtp000018:PROD:bin> ./R CMD INSTALL stringi_1.2.2.tar.gz
* installing to library ‘/home/rrepo/R_Home/R-3.4.2/library’
* installing *source* package ‘stringi’ ...
** package ‘stringi’ successfully unpacked and MD5 sums checked
checking for R_HOME... /home/rrepo/R_Home/R-3.4.2
checking for R... /home/rrepo/R_Home/R-3.4.2/bin/R
checking for endianness... little
checking for R >= 3.1.0 for C++11 use... yes
checking for R < 3.4.0 for CXX1X flag use... no
checking for local ICUDT_DIR... icu61/data
checking for cat... /usr/bin/cat
checking for gcc... gcc -std=gnu99
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc -std=gnu99 accepts -g... yes
checking for gcc -std=gnu99 option to accept ISO C89... none needed
checking how to run the C preprocessor... /lib/cpp
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking elf.h usability... yes
checking elf.h presence... yes
checking for elf.h... yes
checking whether we are using the GNU C++ compiler... no
checking whether accepts -g... no
checking whether the C++ compiler supports the long long type... no
*** trying with disabled C++11 compiler
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking whether the C++ compiler supports the long long type... yes
checking whether the compiler implements namespaces... yes
checking whether the compiler supports Standard Template Library... yes
checking whether std::map is available... yes
checking for pkg-config... /usr/bin/pkg-config
checking with pkg-config for the system ICU4C... 61.1
checking for ICU4C >= 52... yes
checking for additional required CPPFLAGS, LDFLAGS, and LIBS... done
checking whether we may build an ICU4C-based project... no
*** The available ICU4C cannot be used
checking whether we may compile src/icu61/common/putil.cpp... no
checking whether we may compile src/icu61/common/putil.cpp with -D_XPG6... no
*** The ICU4C bundle could not be build. Upgrade your compiler flags.
ERROR: configuration failed for package ‘stringi’
* removing ‘/home/rrepo/R_Home/R-3.4.2/library/stringi’
The script seems to have two errors - unable to build ICU4-based project, and then unable to compile .cpp files.
I have validated that I have all gcc packages installed via yum, and it does appear to detect G++ correctly. Is there an additional non-standard package required for it to compile successfully?
I also searched for ICU4C devel packages in case that was necessary for the "build ICU-based project" error, but was unable to locate anything there. Of course the ICU package available in yum is 50.2, too old for stringi to install.
I also attempted to install using the stringi-master zip, with similar results.
I'm sure plenty of other people have run into this before - any suggestions would be greatly appreciated.
Thanks in advance.
Upvotes: 1
Views: 1974
Reputation: 31
I was having a similar issue with installing stringi on a CentOS 6 Docker container, and I added the following to install.packages(...) and it helped with the ICU4C issue: configure.args='--disable-cxx11'.
So in your case, since you're using R CMD INSTALL, I imagine the command would be: ./R CMD INSTALL stringi_1.2.2.tar.gz --configure-args='--disable-cxx11'
See https://github.com/gagolews/stringi/issues/296 for the discussion.
Upvotes: 1