In most cases, installing stringi is as simple as calling:
However, due to the overwhelming complexity of the ICU4C library, upon which stringi is based, and the diversity of environments it operates on, you might still experience a few issues. Hopefully, they can be resolved with the help of this short manual.
Below we also describe some available build process tweaks.
To get the most out of stringi, you are strongly encouraged to rely on our custom ICU4C 74.1 bundle by calling:install.packages("stringi", configure.args="--disable-pkg-config")
This ensures maximum portability across all platforms (Windows and macOS users fetch the pre-compiled binaries from CRAN built precisely this way).
The stringi package depends on the ICU4C >= 61 library.
ICU will be built together with stringi based on the customised ICU4C 74.1 source bundle that is shipped with the package if we install the package from sources and one of the following is true:
this requirement is not met (check out https://icu.unicode.org/download, the
libicu-develpackage on Fedora/CentOS/OpenSUSE,
libicu-devon Ubuntu/Debian, etc.), or
pkg-configfails to find appropriate build settings for ICU-based projects, or
R CMD INSTALLis called with the
--configure-args='--disable-pkg-config'argument, or the
STRINGI_DISABLE_PKG_CONFIGenvironment variable is set to non-zero or
install.packages("stringi", configure.args="--disable-pkg-config")is executed.
Customising the Build Process#
Additional features and options of the
--disable-icu-bundle: Enforce system ICU.
pkg-config; ICU4C will be compiled from sources.
--with-extra-cxxflags=FLAGS: Additional C++ compiler flags.
--with-extra-cppflags=FLAGS: Additional C++ preprocessor flags.
--with-extra-ldflags=FLAGS: Additional linker flags.
--with-extra-libs=FLAGS: Additional libraries to link against.
Some environment variables:
PKG_CONFIG_PATH: An optional list of directories to search for
R_HOME: Override the R directory, e.g.,
/usr/lib64/R. Note that
$R_HOME/bin/Rpoint to the R executable.
catcommand used to generate the list of source files to compile.
pkg-configcommand used to fetch the necessary compiler flags to link to the existing
STRINGI_DISABLE_PKG_CONFIG: Compile ICU from sources; see also
STRINGI_DISABLE_ICU_BUNDLE: Enforce system ICU; see also
If you do not manage to set up a successful build, do not hesitate to file a bug report. However, please check the list of archived (closed) issues first – it is quite likely that a solution to your problem has already been posted.
To help diagnose your error further, please run (from the terminal)
the following commands and submit the output from
as well as the contents of
cd /tmp wget https://github.com/gagolews/stringi/archive/master.zip unzip master.zip cd stringi-master ./configure