0
votes

I'm trying to install the roxygen2 package on R 4.0.3 on Linux Ubuntu 16.04.7 LTS. It fails because it needs the stringi package to be installed first; I try to install it with the usual command install.packages("stringi") but it fails again and I cannot understand why. Here's the log:

install.packages("stringi") Installing package into ‘/home/dave/R/x86_64-conda-linux-gnu-library/4.0’ (as ‘lib’ is unspecified) --- Please select a CRAN mirror for use in this session --- trying URL 'https://ftp.eenet.ee/pub/cran/src/contrib/stringi_1.5.3.tar.gz' Content type 'application/x-gzip' length 7293930 bytes (7.0 MB) ================================================== downloaded 7.0 MB

installing source package ‘stringi’ ... ** package ‘stringi’ successfully unpacked and MD5 sums checked ** using staged installation checking for R_HOME... /home/dave/miniconda3/envs/r4-base/lib/R checking for R... /home/dave/miniconda3/envs/r4-base/lib/R/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 cat... /bin/cat checking for local ICUDT_DIR... icu61/data checking for x86_64-conda-linux-gnu-gcc... x86_64-conda-linux-gnu-cc 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 x86_64-conda-linux-gnu-cc accepts -g... yes checking for x86_64-conda-linux-gnu-cc option to accept ISO C89... none needed checking how to run the C preprocessor... /home/dave/miniconda3/envs/r4-base/bin/x86_64-conda-linux-gnu-cpp checking for grep that handles long lines and -e... /bin/grep checking for egrep... /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... yes checking whether x86_64-conda-linux-gnu-c++ -std=gnu++11 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... 55.1 checking for ICU4C >= 55... yes checking for additional required CPPFLAGS, LDFLAGS, and LIBS... done checking whether we may build an ICU4C-based project... yes checking programmatically for sufficient U_ICU_VERSION_MAJOR_NUM... yes checking programmatically if U_CHARSET_IS_UTF8 is defined and set... no checking for available ICU data library (ucnv, uloc, utrans)... yes checking for available ICU data library (ucol)... yes configure: creating ./config.status config.status: creating src/Makevars config.status: creating src/uconfig_local.h config.status: creating src/install.libs.R

*** stringi configure summary: ICU_FOUND=1 STRINGI_CXXSTD=CXX_STD=CXX11 STRINGI_CFLAGS= -fpic STRINGI_CPPFLAGS=-I. -I/usr/include/x86_64-linux-gnu -UDEBUG -DNDEBUG -DU_HAVE_ELF_H STRINGI_CXXFLAGS= -fpic STRINGI_LDFLAGS=-L/usr/lib/x86_64-linux-gnu
STRINGI_LIBS=-licui18n -licuuc -licudata

*** compiler settings used: CC=x86_64-conda-linux-gnu-cc LD=x86_64-conda-linux-gnu-c++ -std=gnu++11 CFLAGS=-march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/dave/miniconda3/envs/r4-base/include -fdebug-prefix-map=/home/conda/feedstock_root/build_artifacts/r-base-split_1608831447945/work=/usr/local/src/conda/r-base-4.0.3 -fdebug-prefix-map=/home/dave/miniconda3/envs/r4-base=/usr/local/src/conda-prefix -fpic
CPPFLAGS=-DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /home/dave/miniconda3/envs/r4-base/include -I/home/dave/miniconda3/envs/r4-base/include -Wl,-rpath-link,/home/dave/miniconda3/envs/r4-base/lib -UDEBUG -DNDEBUG CXX=x86_64-conda-linux-gnu-c++ -std=gnu++11 CXXFLAGS=-fvisibility-inlines-hidden -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/dave/miniconda3/envs/r4-base/include -fdebug-prefix-map=/home/conda/feedstock_root/build_artifacts/r-base-split_1608831447945/work=/usr/local/src/conda/r-base-4.0.3 -fdebug-prefix-map=/home/dave/miniconda3/envs/r4-base=/usr/local/src/conda-prefix -fpic
LDFLAGS=
LIBS=

** libs x86_64-conda-linux-gnu-c++ -std=gnu++11 -I"/home/dave/miniconda3/envs/r4-base/lib/R/include" -DNDEBUG -I. -I/usr/include/x86_64-linux-gnu -UDEBUG -DNDEBUG -DU_HAVE_ELF_H -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /home/dave/miniconda3/envs/r4-base/include -I/home/dave/miniconda3/envs/r4-base/include -Wl,-rpath-link,/home/dave/miniconda3/envs/r4-base/lib -fpic -fpic -fvisibility-inlines-hidden -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/dave/miniconda3/envs/r4-base/include -fdebug-prefix-map=/home/conda/feedstock_root/build_artifacts/r-base-split_1608831447945/work=/usr/local/src/conda/r-base-4.0.3 -fdebug-prefix-map=/home/dave/miniconda3/envs/r4-base=/usr/local/src/conda-prefix -c stri_brkiter.cpp -o stri_brkiter.o In file included from /home/dave/miniconda3/envs/r4-base/x86_64-conda-linux-gnu/sysroot/usr/include/math.h:71, from /home/dave/miniconda3/envs/r4-base/x86_64-conda-linux-gnu/include/c++/9.3.0/cmath:45, from /home/dave/miniconda3/envs/r4-base/lib/R/include/R.h:50, from stri_external.h:67, from stri_stringi.h:36, from stri_brkiter.cpp:32: /usr/include/x86_64-linux-gnu/bits/mathcalls.h:63:16: error: expected constructor, destructor, or type conversion before '(' token 63 | __MATHCALL_VEC (cos,, (Mdouble __x)); | ^ /usr/include/x86_64-linux-gnu/bits/mathcalls.h:65:16: error: expected constructor, destructor, or type conversion before '(' token 65 | __MATHCALL_VEC (sin,, (Mdouble __x)); | ^ /usr/include/x86_64-linux-gnu/bits/mathcalls.h:81:22: error: 'sincos' has not been declared 81 | __MATHDECL_VEC (void,sincos,, | ^~~~~~ /usr/include/x86_64-linux-gnu/bits/mathcalls.h:81:29: error: expected identifier before ',' token 81 | __MATHDECL_VEC (void,sincos,, | ^ /usr/include/x86_64-linux-gnu/bits/mathcalls.h:82:3: error: expected identifier before '(' token 82 | (Mdouble __x, Mdouble *__sinx, Mdouble *__cosx)); | ^ /usr/include/x86_64-linux-gnu/bits/mathcalls.h:82:57: error: expected constructor, destructor, or type conversion before ';' token 82 | (Mdouble __x, Mdouble *__sinx, Mdouble *__cosx)); | ^ /usr/include/x86_64-linux-gnu/bits/mathcalls.h:100:16: error: expected constructor, destructor, or type conversion before '(' token 100 | __MATHCALL_VEC (exp,, (Mdouble __x)); | ^ /usr/include/x86_64-linux-gnu/bits/mathcalls.h:109:16: error: expected constructor, destructor, or type conversion before '(' token 109 | __MATHCALL_VEC (log,, (Mdouble __x)); | ^ /usr/include/x86_64-linux-gnu/bits/mathcalls.h:153:16: error: expected constructor, destructor, or type conversion before '(' token 153 | __MATHCALL_VEC (pow,, (Mdouble __x, Mdouble __y)); | ^ In file included from /home/dave/miniconda3/envs/r4-base/x86_64-conda-linux-gnu/sysroot/usr/include/math.h:94, from /home/dave/miniconda3/envs/r4-base/x86_64-conda-linux-gnu/include/c++/9.3.0/cmath:45, from /home/dave/miniconda3/envs/r4-base/lib/R/include/R.h:50, from stri_external.h:67, from stri_stringi.h:36, from stri_brkiter.cpp:32: /usr/include/x86_64-linux-gnu/bits/mathcalls.h:63:16: error: expected constructor, destructor, or type conversion before '(' token 63 | __MATHCALL_VEC (cos,, (Mdouble __x)); | ^ /usr/include/x86_64-linux-gnu/bits/mathcalls.h:65:16: error: expected constructor, destructor, or type conversion before '(' token 65 | __MATHCALL_VEC (sin,, (Mdouble __x)); | ^ /usr/include/x86_64-linux-gnu/bits/mathcalls.h:81:22: error: 'sincos' has not been declared 81 | __MATHDECL_VEC (void,sincos,, | ^~~~~~ /usr/include/x86_64-linux-gnu/bits/mathcalls.h:81:29: error: expected identifier before ',' token 81 | __MATHDECL_VEC (void,sincos,, | ^ /usr/include/x86_64-linux-gnu/bits/mathcalls.h:82:3: error: expected identifier before '(' token 82 | (Mdouble __x, Mdouble *__sinx, Mdouble *__cosx)); | ^ /usr/include/x86_64-linux-gnu/bits/mathcalls.h:82:57: error: expected constructor, destructor, or type conversion before ';' token 82 | (Mdouble __x, Mdouble *__sinx, Mdouble *__cosx)); | ^ /usr/include/x86_64-linux-gnu/bits/mathcalls.h:100:16: error: expected constructor, destructor, or type conversion before '(' token 100 | __MATHCALL_VEC (exp,, (Mdouble __x)); | ^ /usr/include/x86_64-linux-gnu/bits/mathcalls.h:109:16: error: expected constructor, destructor, or type conversion before '(' token 109 | __MATHCALL_VEC (log,, (Mdouble __x)); | ^ /usr/include/x86_64-linux-gnu/bits/mathcalls.h:153:16: error: expected constructor, destructor, or type conversion before '(' token 153 | __MATHCALL_VEC (pow,, (Mdouble __x, Mdouble __y)); | ^ In file included from /home/dave/miniconda3/envs/r4-base/x86_64-conda-linux-gnu/sysroot/usr/include/math.h:141, from /home/dave/miniconda3/envs/r4-base/x86_64-conda-linux-gnu/include/c++/9.3.0/cmath:45, from /home/dave/miniconda3/envs/r4-base/lib/R/include/R.h:50, from stri_external.h:67, from stri_stringi.h:36, from stri_brkiter.cpp:32: /usr/include/x86_64-linux-gnu/bits/mathcalls.h:63:16: error: expected constructor, destructor, or type conversion before '(' token 63 | __MATHCALL_VEC (cos,, (Mdouble __x)); | ^ /usr/include/x86_64-linux-gnu/bits/mathcalls.h:65:16: error: expected constructor, destructor, or type conversion before '(' token 65 | __MATHCALL_VEC (sin,, (Mdouble __x)); | ^ /usr/include/x86_64-linux-gnu/bits/mathcalls.h:81:22: error: 'sincos' has not been declared 81 | __MATHDECL_VEC (void,sincos,, | ^~~~~~ /usr/include/x86_64-linux-gnu/bits/mathcalls.h:81:29: error: expected identifier before ',' token 81 | __MATHDECL_VEC (void,sincos,, | ^ /usr/include/x86_64-linux-gnu/bits/mathcalls.h:82:3: error: expected identifier before '(' token 82 | (Mdouble __x, Mdouble *__sinx, Mdouble *__cosx)); | ^ /usr/include/x86_64-linux-gnu/bits/mathcalls.h:82:57: error: expected constructor, destructor, or type conversion before ';' token 82 | (Mdouble __x, Mdouble *__sinx, Mdouble *__cosx)); | ^ /usr/include/x86_64-linux-gnu/bits/mathcalls.h:100:16: error: expected constructor, destructor, or type conversion before '(' token 100 | __MATHCALL_VEC (exp,, (Mdouble __x)); | ^ /usr/include/x86_64-linux-gnu/bits/mathcalls.h:109:16: error: expected constructor, destructor, or type conversion before '(' token 109 | __MATHCALL_VEC (log,, (Mdouble __x)); | ^ /usr/include/x86_64-linux-gnu/bits/mathcalls.h:153:16: error: expected constructor, destructor, or type conversion before '(' token 153 | __MATHCALL_VEC (pow,, (Mdouble __x, Mdouble __y)); | ^ In file included from /home/dave/miniconda3/envs/r4-base/lib/R/include/R.h:50, from stri_external.h:67, from stri_stringi.h:36, from stri_brkiter.cpp:32: /home/dave/miniconda3/envs/r4-base/x86_64-conda-linux-gnu/include/c++/9.3.0/cmath:180:11: error: '::cos' has not been declared 180 | using ::cos; | ^~~ /home/dave/miniconda3/envs/r4-base/x86_64-conda-linux-gnu/include/c++/9.3.0/cmath:218:11: error: '::exp' has not been declared 218 | using ::exp; | ^~~ /home/dave/miniconda3/envs/r4-base/x86_64-conda-linux-gnu/include/c++/9.3.0/cmath:334:11: error: '::log' has not been declared 334 | using ::log; | ^~~ /home/dave/miniconda3/envs/r4-base/x86_64-conda-linux-gnu/include/c++/9.3.0/cmath:384:11: error: '::pow' has not been declared 384 | using ::pow; | ^~~ /home/dave/miniconda3/envs/r4-base/x86_64-conda-linux-gnu/include/c++/9.3.0/cmath:421:11: error: '::sin' has not been declared 421 | using ::sin; | ^~~ make: *** [/home/dave/miniconda3/envs/r4-base/lib/R/etc/Makeconf:181: stri_brkiter.o] Error 1 ERROR: compilation failed for package ‘stringi’

  • removing ‘/home/dave/R/x86_64-conda-linux-gnu-library/4.0/stringi’

The downloaded source packages are in ‘/tmp/RtmpkLYZqu/downloaded_packages’ Warning message: In install.packages("stringi") : installation of package ‘stringi’ had non-zero exit status

Any idea or suggestion on how to solve this issue?

Thank you

1
Is there any more output than that? "Error 1" just means "make stopped because something failed along the way" so it's not too helpful.neilfws
@neilfws I just added the complete log, I hope it can be useful. ThanksDavideChicco.it
This seems to be the same issue. The comments there may be helpful.neilfws
That did not help, thanks anywayDavideChicco.it

1 Answers

0
votes

I was happily able to solve this issue by myself, by installing stringi via conda :-)

Here's the steps I followed:

  1. I updated all the conda packages: conda update --all

  2. I updated conda: conda update -n base -c defaults conda

  3. I installed stringi via conda: conda install -c r r-stringi

And everything went well! Maybe the step (3) was sufficient by itself, but I wanted to list all the commands I used anyway.

I hope this solution can be useful for someone else too.