My mpi+openmp job runs 3 times slower if in the following I replace 'mpirun' with 'srun'!
#!bin/bash
#
#SBATCH --job-name=locstack4d_mpi
#SBATCH --output=./res_locstack4d_mpi.txt
#
#SBATCH --ntasks=3
#SBATCH --cpus-per-task=16
#SBATCH --ntasks-per-node=1
#SBATCH --time=10:00
#SBATCH --mem-per-cpu=100
#SBATCH --verbose
export OMP_NUM_THREADS=28
mpirun ./locstack4d ./locstack4d_input.dat
mpi implementation details:
Version: 3.1
Release Date: Thu Feb 20 11:41:13 CST 2014
CC: gcc -m64 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC -Wl,-z,noexecstack
CXX: g++ -m64 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC -Wl,-z,noexecstack
F77: gfortran -m64 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC -Wl,-z,noexecstack
F90: gfortran -m64 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC -Wl,-z,noexecstack
Configure options: '--disable-option-checking' '--prefix=/usr' '--build=x86_64-redhat-linux-gnu' '--host=x86_64-redhat-linux-gnu' '--target=x86_64-redhat-linux-gnu' '--program-prefix=' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/var/lib' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--enable-sharedlibs=gcc' '--enable-shared' '--enable-lib-depend' '--disable-rpath' '--enable-fc' '--with-device=ch3:nemesis' '--with-pm=hydra:gforker' '--includedir=/usr/include/mpich-x86_64' '--bindir=/usr/lib64/mpich/bin' '--libdir=/usr/lib64/mpich/lib' '--datadir=/usr/share/mpich' '--mandir=/usr/share/man/mpich' '--docdir=/usr/share/mpich/doc' '--htmldir=/usr/share/mpich/doc' '--with-hwloc-prefix=system' 'FC=gfortran' 'F77=gfortran' 'CFLAGS=-m64 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC -O2' 'CXXFLAGS=-m64 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC ' 'FCFLAGS=-m64 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC ' 'FFLAGS=-m64 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC -O2' 'LDFLAGS=-Wl,-z,noexecstack ' 'MPICH2LIB_CFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic' 'MPICH2LIB_CXXFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic' 'MPICH2LIB_FCFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic' 'MPICH2LIB_FFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic' 'build_alias=x86_64-redhat-linux-gnu' 'host_alias=x86_64-redhat-linux-gnu' 'target_alias=x86_64-redhat-linux-gnu' '--cache-file=/dev/null' '--srcdir=.' 'CC=gcc' 'LIBS=-lrt -lpthread ' 'CPPFLAGS= -I/builddir/build/BUILD/mpich-3.1-rh/src/mpl/include -I/builddir/build/BUILD/mpich-3.1-rh/src/mpl/include -I/builddir/build/BUILD/mpich-3.1-rh/src/openpa/src -I/builddir/build/BUILD/mpich-3.1-rh/src/openpa/src -I/builddir/build/BUILD/mpich-3.1-rh/src/mpi/romio/include'
Process Manager: pmi
Launchers available: ssh rsh fork slurm ll lsf sge manual persist
Topology libraries available: hwloc
Resource management kernels available: user slurm ll lsf sge pbs cobalt
Checkpointing libraries available:
Demux engines available: poll select
Your MPI implementation does probably not use Slurm's PMI correctly, resulting in three independent 1-cpu processes being spawned rather than the expected 3-cpu job. You need to make sure the MPI version and Slurm version are compatible (for instance OpenMPI >=1.5 and Slurm >=2.6) and that OpenMPI was compiled with Slurm support (see http://slurm.schedmd.com/mpi_guide.html)
If slurm is configured with task affinity and is not aware of the HyperThreading it will not allow any job to use more cpus/cores than requested. So if you are requesting 16 cpus-per-task Slurm will limit you to that number of cpus.
Depending on the MPI implementation it is possible that the application is not bounded to the resources requested and hence it is faster than running with srun.
Related
Multiple errors containing "gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG" when trying to install any package. Tried reinstalling R (4.0.3), changing gcc (9.3.0) directory, changing .libPaths(). Nothing worked. Any ideas?
Error Log:
When running install.packages("lme4", dependencies = TRUE, install_opts = '--no-lock'), such errors follow each dependency installation attempt:
(...)
trying URL 'https://cloud.r-project.org/src/contrib/lme4_1.1-26.tar.gz'
Content type 'application/x-gzip' length 3297635 bytes (3.1 MB)
==================================================
downloaded 3.1 MB
ERROR: failed to lock directory ‘/home/username/R/x86_64-pc-linux-gnu-library/4.0’ for modifying
Try removing ‘/home/username/R/x86_64-pc-linux-gnu-library/4.0/00LOCK-matrixStats’
* installing *source* package ‘RcppArmadillo’ ...
** package ‘RcppArmadillo’ successfully unpacked and MD5 sums checked
** using staged installation
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 g++ -std=gnu++11 accepts -g... yes
checking how to run the C++ preprocessor... g++ -std=gnu++11 -E
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether g++ -std=gnu++11 accepts -g... (cached) yes
checking whether we have a suitable tempdir... /tmp
checking whether R CMD SHLIB can already compile programs using OpenMP... yes
checking LAPACK_LIBS... system LAPACK found
configure: creating ./config.status
config.status: creating inst/include/RcppArmadilloConfigGenerated.h
config.status: creating src/Makevars
** libs
g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -I'/home/username/R/x86_64-pc-linux-gnu-library/4.0/Rcpp/include' -I../inst/include -fpic -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c RcppArmadillo.cpp -o RcppArmadillo.o
g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -I'/home/username/R/x86_64-pc-linux-gnu-library/4.0/Rcpp/include' -I../inst/include -fpic -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c RcppExports.cpp -o RcppExports.o
g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -I'/home/username/R/x86_64-pc-linux-gnu-library/4.0/Rcpp/include' -I../inst/include -fpic -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c fastLm.cpp -o fastLm.o
g++ -std=gnu++11 -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o RcppArmadillo.so RcppArmadillo.o RcppExports.o fastLm.o -llapack -lblas -lgfortran -lm -lquadmath -L/usr/lib/R/lib -lR
installing to /home/username/R/x86_64-pc-linux-gnu-library/4.0/00LOCK-RcppArmadillo/00new/RcppArmadillo/libs
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
** checking absolute paths in shared objects and dynamic libraries
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (RcppArmadillo)
* installing *source* package ‘vctrs’ ...
** package ‘vctrs’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fvisibility=hidden -fpic -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c altrep-rle.c -o altrep-rle.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fvisibility=hidden -fpic -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c arg-counter.c -o arg-counter.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fvisibility=hidden -fpic -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c arg.c -o arg.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fvisibility=hidden -fpic -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c bind.c -o bind.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fvisibility=hidden -fpic -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c c-unchop.c -o c-unchop.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fvisibility=hidden -fpic -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c c.c -o c.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fvisibility=hidden -fpic -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c callables.c -o callables.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fvisibility=hidden -fpic -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c cast-bare.c -o cast-bare.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fvisibility=hidden -fpic -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c cast-dispatch.c -o cast-dispatch.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fvisibility=hidden -fpic -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c cast.c -o cast.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fvisibility=hidden -fpic -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c compare.c -o compare.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fvisibility=hidden -fpic -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c complete.c -o complete.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fvisibility=hidden -fpic -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c conditions.c -o conditions.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fvisibility=hidden -fpic -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c dictionary.c -o dictionary.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fvisibility=hidden -fpic -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c dim.c -o dim.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fvisibility=hidden -fpic -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c equal.c -o equal.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fvisibility=hidden -fpic -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c fields.c -o fields.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fvisibility=hidden -fpic -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c fill.c -o fill.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fvisibility=hidden -fpic -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c group.c -o group.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fvisibility=hidden -fpic -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c growable.c -o growable.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fvisibility=hidden -fpic -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c hash.c -o hash.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fvisibility=hidden -fpic -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c init.c -o init.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fvisibility=hidden -fpic -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c names.c -o names.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fvisibility=hidden -fpic -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c order-groups.c -o order-groups.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fvisibility=hidden -fpic -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c order-radix.c -o order-radix.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fvisibility=hidden -fpic -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c order-sortedness.c -o order-sortedness.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fvisibility=hidden -fpic -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c order-truelength.c -o order-truelength.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fvisibility=hidden -fpic -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c poly-op.c -o poly-op.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fvisibility=hidden -fpic -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c proxy-restore.c -o proxy-restore.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fvisibility=hidden -fpic -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c proxy.c -o proxy.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fvisibility=hidden -fpic -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c ptype2-dispatch.c -o ptype2-dispatch.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fvisibility=hidden -fpic -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c rep.c -o rep.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fvisibility=hidden -fpic -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c runs.c -o runs.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fvisibility=hidden -fpic -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c shape.c -o shape.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fvisibility=hidden -fpic -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c size-common.c -o size-common.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fvisibility=hidden -fpic -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c size.c -o size.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fvisibility=hidden -fpic -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c slice-array.c -o slice-array.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fvisibility=hidden -fpic -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c slice-assign-array.c -o slice-assign-array.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fvisibility=hidden -fpic -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c slice-assign.c -o slice-assign.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fvisibility=hidden -fpic -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c slice-chop.c -o slice-chop.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fvisibility=hidden -fpic -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c slice.c -o slice.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fvisibility=hidden -fpic -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c split.c -o split.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fvisibility=hidden -fpic -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c subscript-loc.c -o subscript-loc.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fvisibility=hidden -fpic -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c subscript.c -o subscript.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fvisibility=hidden -fpic -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c translate.c -o translate.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fvisibility=hidden -fpic -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c type-data-frame.c -o type-data-frame.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fvisibility=hidden -fpic -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c type-date-time.c -o type-date-time.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fvisibility=hidden -fpic -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c type-factor.c -o type-factor.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fvisibility=hidden -fpic -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c type-info.c -o type-info.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fvisibility=hidden -fpic -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c type-tibble.c -o type-tibble.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fvisibility=hidden -fpic -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c type.c -o type.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fvisibility=hidden -fpic -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c type2.c -o type2.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fvisibility=hidden -fpic -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c typeof2-s3.c -o typeof2-s3.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fvisibility=hidden -fpic -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c typeof2.c -o typeof2.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fvisibility=hidden -fpic -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c unspecified.c -o unspecified.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fvisibility=hidden -fpic -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c utils-dispatch.c -o utils-dispatch.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fvisibility=hidden -fpic -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c utils-rlang.c -o utils-rlang.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fvisibility=hidden -fpic -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c utils.c -o utils.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fvisibility=hidden -fpic -g -O2 -fdebug-prefix-map=/build/r-base-8T8CYO/r-base-4.0.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c version.c -o version.o
gcc -std=gnu99 -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o vctrs.so altrep-rle.o arg-counter.o arg.o bind.o c-unchop.o c.o callables.o cast-bare.o cast-dispatch.o cast.o compare.o complete.o conditions.o dictionary.o dim.o equal.o fields.o fill.o group.o growable.o hash.o init.o names.o order-groups.o order-radix.o order-sortedness.o order-truelength.o poly-op.o proxy-restore.o proxy.o ptype2-dispatch.o rep.o runs.o shape.o size-common.o size.o slice-array.o slice-assign-array.o slice-assign.o slice-chop.o slice.o split.o subscript-loc.o subscript.o translate.o type-data-frame.o type-date-time.o type-factor.o type-info.o type-tibble.o type.o type2.o typeof2-s3.o typeof2.o unspecified.o utils-dispatch.o utils-rlang.o utils.o version.o -L/usr/lib/R/lib -lR
(...)
Why would you install lme4 from source?
Debian and Ubuntu came with several hundred packages you can install directly, just do
sudo apt update # refresh indinces
sudo apt install r-cran-lme4
Apart from this, you have access to over 4500 additional r-cran-* packages of CRAN via the PPA by Michael Rutter: c2d4u4+. See the recommended README for Ubuntu at CRAN.
Lastly, and in a more narrow sense, this of course also works directly. Note that you explicitly gave the option install_opts = '--no-lock' (why? I have never seen it recommended anywhere ...) which then yielded the error
ERROR: failed to lock directory ‘/home/username/R/x86_64-pc-linux-gnu-library/4.0’ for modifying
Try removing ‘/home/username/R/x86_64-pc-linux-gnu-library/4.0/00LOCK-matrixStats’
you could address by removing the lock as it states.
I am trying to create an Amazon Linux AMI EC2 instance that I can save as my own AMI, with all of the softwares installed already so I don't have to redo all of this stuff everytime I need a new EC2 instance.
One thing I'm trying to understand is where all of my R libraries are being installed to... When I install a library, I receive the following:
[root#ip-myip] R -e "install.packages('jsonlite', repos='http://cran.rstudio.com/')"
R version 3.4.1 (2017-06-30) -- "Single Candle"
Copyright (C) 2017 The R Foundation for Statistical Computing
Platform: x86_64-redhat-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
Natural language support but running in an English locale
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> install.packages('jsonlite', repos='http://cran.rstudio.com/')
Installing package into ‘/usr/lib64/R/library’
(as ‘lib’ is unspecified)
trying URL 'http://cran.rstudio.com/src/contrib/jsonlite_1.5.tar.gz'
Content type 'application/x-gzip' length 1096810 bytes (1.0 MB)
==================================================
downloaded 1.0 MB
* installing *source* package ‘jsonlite’ ...
** package ‘jsonlite’ successfully unpacked and MD5 sums checked
** libs
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -Iyajl/api -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c base64.c -o base64.o
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -Iyajl/api -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c collapse_array.c -o collapse_array.o
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -Iyajl/api -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c collapse_object.c -o collapse_object.o
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -Iyajl/api -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c collapse_pretty.c -o collapse_pretty.o
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -Iyajl/api -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c escape_chars.c -o escape_chars.o
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -Iyajl/api -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c integer64_to_na.c -o integer64_to_na.o
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -Iyajl/api -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c is_datelist.c -o is_datelist.o
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -Iyajl/api -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c is_recordlist.c -o is_recordlist.o
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -Iyajl/api -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c is_scalarlist.c -o is_scalarlist.o
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -Iyajl/api -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c modp_numtoa.c -o modp_numtoa.o
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -Iyajl/api -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c null_to_na.c -o null_to_na.o
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -Iyajl/api -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c num_to_char.c -o num_to_char.o
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -Iyajl/api -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c parse.c -o parse.o
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -Iyajl/api -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c prettify.c -o prettify.o
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -Iyajl/api -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c push_parser.c -o push_parser.o
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -Iyajl/api -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c r-base64.c -o r-base64.o
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -Iyajl/api -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c register.c -o register.o
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -Iyajl/api -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c row_collapse.c -o row_collapse.o
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -Iyajl/api -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c transpose_list.c -o transpose_list.o
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -Iyajl/api -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c validate.c -o validate.o
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -Iyajl/api -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c yajl/yajl.c -o yajl/yajl.o
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -Iyajl/api -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c yajl/yajl_alloc.c -o yajl/yajl_alloc.o
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -Iyajl/api -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c yajl/yajl_buf.c -o yajl/yajl_buf.o
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -Iyajl/api -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c yajl/yajl_encode.c -o yajl/yajl_encode.o
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -Iyajl/api -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c yajl/yajl_gen.c -o yajl/yajl_gen.o
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -Iyajl/api -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c yajl/yajl_lex.c -o yajl/yajl_lex.o
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -Iyajl/api -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c yajl/yajl_parser.c -o yajl/yajl_parser.o
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -Iyajl/api -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c yajl/yajl_tree.c -o yajl/yajl_tree.o
ar rcs libstatyajl.a yajl/yajl.o yajl/yajl_alloc.o yajl/yajl_buf.o yajl/yajl_encode.o yajl/yajl_gen.o yajl/yajl_lex.o yajl/yajl_parser.o yajl/yajl_tree.o
gcc -m64 -std=gnu99 -shared -L/usr/lib64/R/lib -L/usr/local/lib64 -o jsonlite.so base64.o collapse_array.o collapse_object.o collapse_pretty.o escape_chars.o integer64_to_na.o is_datelist.o is_recordlist.o is_scalarlist.o modp_numtoa.o null_to_na.o num_to_char.o parse.o prettify.o push_parser.o r-base64.o register.o row_collapse.o transpose_list.o validate.o -L. -lstatyajl -L/usr/lib64/R/lib -lR
installing to /usr/lib64/R/library/jsonlite/libs
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
converting help for package ‘jsonlite’
finding HTML links ... done
base64 html
flatten html
fromJSON html
prettify html
rbind_pages html
Rd warning: /tmp/RtmpZ3IcD8/R.INSTALL21106d208413/jsonlite/man/rbind_pages.Rd:22: missing file link ‘rbind’
read_json html
serializeJSON html
stream_in html
unbox html
validate html
** building package indices
** installing vignettes
** testing if installed package can be loaded
* DONE (jsonlite)
Making 'packages.html' ... done
The downloaded source packages are in
‘/tmp/RtmpRRGy3s/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
>
>
So the answer seems obvious... The downloaded source packages are in ‘/tmp/RtmpRRGy3s/downloaded_packages’ Wonderful! However, when I cd into my /tmp directory, I see the following...
[root#ip-myip /]# cd tmp
[root#ip-myip tmp]# ls
hsperfdata_root rstudio-rsession Rtmp49pRek Rtmp9cGn9Z RtmpzATaBO Rtmpzmgmqv
Although similar, none of those directories match the RtmpRRGy3s from the install command. Also, all of the other folders starting with Rtmp... are empty!
I like trying to understand these types of problems, and since I'll be using this AMI over and over again, I'd really like to know where my R libraries are being installed. Any help is appreciated:
EDIT - here is my home directory on my EC2 instance:
[root#ip-myip /]# ls
bin cgroup etc lib local media opt root sbin srv tmp var
boot dev home lib64 lost+found mnt proc run selinux sys usr
and here's what's hidden in my root directory:
cd root
ls -a
. .bash_history .bash_profile .cshrc .RData .tcshrc
.. .bash_logout .bashrc .pki .ssh .viminfo
I'm not new to R but can't figure out what went wrong. I'm just trying to install RcppEigen package using install.packages('RcppEigen') and receive the above error.
The command below (issued by the installer) fails:
g++ -m64 -I/usr/include/R -DNDEBUG -I"/usr/lib64/R/library/Rcpp/include" -I/usr/local/include -std=c++11 -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -c RcppEigen.cpp -o RcppEigen.o
I have installed both R-Rcpp and R-Rcpp-devel version 0.12.12 from EPEL repository as well as eigen3-devel v 3.2.5 (not sure whether it is required but anyway ...)
I cloned RcppEigen from Github and tried to build in RStudio - the same error.
Makevars has PKG_CXXFLAGS = -I../inst/include but the compiler is invoked as below:
g++ -m64 -I/usr/include/R -DNDEBUG -I"/home/zer0hedge/R/x86_64-redhat-linux-gnu-library/3.4/Rcpp/include" -I/usr/local/include -std=c++11 -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -c RcppEigen.cpp -o RcppEigen.o
For some reason, I had PKG_CXXFLAGS defined in $HOME/.R/Makevars. It erroneously overrided PKG_CXXFLAGS in Makevars in src directory of the package and prevented compilation of C++ files
please help me in this. I tried installing Rcpp using
sudo apt-get install r-cran-rcpp
and from R-Studio and got the same error:
> install.packages("Rcpp", dependencies=TRUE)
Installing package into ‘/home/sukumar/R/x86_64-pc-linux-gnu-library/3.3’
(as ‘lib’ is unspecified)
also installing the dependency ‘highlight’
trying URL 'http://cran.rstudio.com/src/contrib/highlight_0.4.7.tar.gz'
Content type 'application/x-gzip' length 356443 bytes (348 KB)
==================================================
downloaded 348 KB
trying URL 'http://cran.rstudio.com/src/contrib/Rcpp_0.12.9.tar.gz'
Content type 'application/x-gzip' length 2372283 bytes (2.3 MB)
==================================================
downloaded 2.3 MB
* installing *source* package ‘highlight’ ...
** package ‘highlight’ successfully unpacked and MD5 sums checked
** libs
g++ -I/usr/share/R/include -DNDEBUG -I. -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c ASBeautifier.cpp -o ASBeautifier.o
g++ -I/usr/share/R/include -DNDEBUG -I. -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c ASEnhancer.cpp -o ASEnhancer.o
g++ -I/usr/share/R/include -DNDEBUG -I. -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c ASFormatter.cpp -o ASFormatter.o
g++ -I/usr/share/R/include -DNDEBUG -I. -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c ASResource.cpp -o ASResource.o
g++ -I/usr/share/R/include -DNDEBUG -I. -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c ASStreamIterator.cpp -o ASStreamIterator.o
g++ -I/usr/share/R/include -DNDEBUG -I. -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c Matcher.cpp -o Matcher.o
g++ -I/usr/share/R/include -DNDEBUG -I. -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c Pattern.cpp -o Pattern.o
g++ -I/usr/share/R/include -DNDEBUG -I. -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c ansigenerator.cpp -o ansigenerator.o
g++ -I/usr/share/R/include -DNDEBUG -I. -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c bbcodegenerator.cpp -o bbcodegenerator.o
g++ -I/usr/share/R/include -DNDEBUG -I. -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c codegenerator.cpp -o codegenerator.o
g++ -I/usr/share/R/include -DNDEBUG -I. -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c configurationreader.cpp -o configurationreader.o
g++ -I/usr/share/R/include -DNDEBUG -I. -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c ctagsreader.cpp -o ctagsreader.o
g++ -I/usr/share/R/include -DNDEBUG -I. -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c datadir.cpp -o datadir.o
g++ -I/usr/share/R/include -DNDEBUG -I. -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c documentstyle.cpp -o documentstyle.o
g++ -I/usr/share/R/include -DNDEBUG -I. -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c elementstyle.cpp -o elementstyle.o
g++ -I/usr/share/R/include -DNDEBUG -I. -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c highlight_wrapper.cpp -o highlight_wrapper.o
g++ -I/usr/share/R/include -DNDEBUG -I. -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c htmlgenerator.cpp -o htmlgenerator.o
g++ -I/usr/share/R/include -DNDEBUG -I. -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c languagedefinition.cpp -o languagedefinition.o
g++ -I/usr/share/R/include -DNDEBUG -I. -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c latexgenerator.cpp -o latexgenerator.o
g++ -I/usr/share/R/include -DNDEBUG -I. -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c platform_fs.cpp -o platform_fs.o
g++ -I/usr/share/R/include -DNDEBUG -I. -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c preformatter.cpp -o preformatter.o
g++ -I/usr/share/R/include -DNDEBUG -I. -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c render.cpp -o render.o
g++ -I/usr/share/R/include -DNDEBUG -I. -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c rtfgenerator.cpp -o rtfgenerator.o
g++ -I/usr/share/R/include -DNDEBUG -I. -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c stringtools.cpp -o stringtools.o
g++ -I/usr/share/R/include -DNDEBUG -I. -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c stylecolour.cpp -o stylecolour.o
g++ -I/usr/share/R/include -DNDEBUG -I. -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c svggenerator.cpp -o svggenerator.o
g++ -I/usr/share/R/include -DNDEBUG -I. -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c texgenerator.cpp -o texgenerator.o
g++ -I/usr/share/R/include -DNDEBUG -I. -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c xhtmlgenerator.cpp -o xhtmlgenerator.o
g++ -I/usr/share/R/include -DNDEBUG -I. -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c xmlgenerator.cpp -o xmlgenerator.o
g++ -I/usr/share/R/include -DNDEBUG -I. -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c xterm256generator.cpp -o xterm256generator.o
g++ -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o highlight.so ASBeautifier.o ASEnhancer.o ASFormatter.o ASResource.o ASStreamIterator.o Matcher.o Pattern.o ansigenerator.o bbcodegenerator.o codegenerator.o configurationreader.o ctagsreader.o datadir.o documentstyle.o elementstyle.o highlight_wrapper.o htmlgenerator.o languagedefinition.o latexgenerator.o platform_fs.o preformatter.o render.o rtfgenerator.o stringtools.o stylecolour.o svggenerator.o texgenerator.o xhtmlgenerator.o xmlgenerator.o xterm256generator.o -L/usr/lib/R/lib -lR
installing to /home/sukumar/R/x86_64-pc-linux-gnu-library/3.3/highlight/libs
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/home/sukumar/R/x86_64-pc-linux-gnu-library/3.3/highlight/libs/highlight.so':
/home/sukumar/R/x86_64-pc-linux-gnu-library/3.3/highlight/libs/highlight.so: undefined symbol: _ZTVN10__cxxabiv117__class_type_infoE
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/home/sukumar/R/x86_64-pc-linux-gnu-library/3.3/highlight’
Warning in install.packages :
installation of package ‘highlight’ had non-zero exit status
* installing *source* package ‘Rcpp’ ...
** package ‘Rcpp’ successfully unpacked and MD5 sums checked
** libs
g++ -I/usr/share/R/include -DNDEBUG -I../inst/include/ -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c Date.cpp -o Date.o
g++ -I/usr/share/R/include -DNDEBUG -I../inst/include/ -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c Module.cpp -o Module.o
g++ -I/usr/share/R/include -DNDEBUG -I../inst/include/ -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c Rcpp_init.cpp -o Rcpp_init.o
g++ -I/usr/share/R/include -DNDEBUG -I../inst/include/ -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c api.cpp -o api.o
g++ -I/usr/share/R/include -DNDEBUG -I../inst/include/ -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c attributes.cpp -o attributes.o
g++ -I/usr/share/R/include -DNDEBUG -I../inst/include/ -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c barrier.cpp -o barrier.o
g++ -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o Rcpp.so Date.o Module.o Rcpp_init.o api.o attributes.o barrier.o -L/usr/lib/R/lib -lR
installing to /home/sukumar/R/x86_64-pc-linux-gnu-library/3.3/Rcpp/libs
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/home/sukumar/R/x86_64-pc-linux-gnu-library/3.3/Rcpp/libs/Rcpp.so':
/home/sukumar/R/x86_64-pc-linux-gnu-library/3.3/Rcpp/libs/Rcpp.so: undefined symbol: _ZTVN10__cxxabiv120__si_class_type_infoE
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/home/sukumar/R/x86_64-pc-linux-gnu-library/3.3/Rcpp’
Warning in install.packages :
installation of package ‘Rcpp’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpsPMzSK/downloaded_packages’
> install.packages("Rcpp", dependencies=TRUE)
Installing package into ‘/home/sukumar/R/x86_64-pc-linux-gnu-library/3.3’
(as ‘lib’ is unspecified)
also installing the dependency ‘highlight’
trying URL 'http://cran.rstudio.com/src/contrib/highlight_0.4.7.tar.gz'
Content type 'application/x-gzip' length 356443 bytes (348 KB)
==================================================
downloaded 348 KB
trying URL 'http://cran.rstudio.com/src/contrib/Rcpp_0.12.9.tar.gz'
Content type 'application/x-gzip' length 2372283 bytes (2.3 MB)
==================================================
downloaded 2.3 MB
* installing *source* package ‘highlight’ ...
** package ‘highlight’ successfully unpacked and MD5 sums checked
** libs
g++ -I/usr/share/R/include -DNDEBUG -I. -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c ASBeautifier.cpp -o ASBeautifier.o
g++ -I/usr/share/R/include -DNDEBUG -I. -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c ASEnhancer.cpp -o ASEnhancer.o
g++ -I/usr/share/R/include -DNDEBUG -I. -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c ASFormatter.cpp -o ASFormatter.o
g++ -I/usr/share/R/include -DNDEBUG -I. -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c ASResource.cpp -o ASResource.o
g++ -I/usr/share/R/include -DNDEBUG -I. -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c ASStreamIterator.cpp -o ASStreamIterator.o
g++ -I/usr/share/R/include -DNDEBUG -I. -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c Matcher.cpp -o Matcher.o
g++ -I/usr/share/R/include -DNDEBUG -I. -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c Pattern.cpp -o Pattern.o
g++ -I/usr/share/R/include -DNDEBUG -I. -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c ansigenerator.cpp -o ansigenerator.o
g++ -I/usr/share/R/include -DNDEBUG -I. -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c bbcodegenerator.cpp -o bbcodegenerator.o
g++ -I/usr/share/R/include -DNDEBUG -I. -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c codegenerator.cpp -o codegenerator.o
g++ -I/usr/share/R/include -DNDEBUG -I. -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c configurationreader.cpp -o configurationreader.o
g++ -I/usr/share/R/include -DNDEBUG -I. -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c ctagsreader.cpp -o ctagsreader.o
g++ -I/usr/share/R/include -DNDEBUG -I. -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c datadir.cpp -o datadir.o
g++ -I/usr/share/R/include -DNDEBUG -I. -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c documentstyle.cpp -o documentstyle.o
g++ -I/usr/share/R/include -DNDEBUG -I. -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c elementstyle.cpp -o elementstyle.o
g++ -I/usr/share/R/include -DNDEBUG -I. -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c highlight_wrapper.cpp -o highlight_wrapper.o
g++ -I/usr/share/R/include -DNDEBUG -I. -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c htmlgenerator.cpp -o htmlgenerator.o
g++ -I/usr/share/R/include -DNDEBUG -I. -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c languagedefinition.cpp -o languagedefinition.o
g++ -I/usr/share/R/include -DNDEBUG -I. -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c latexgenerator.cpp -o latexgenerator.o
g++ -I/usr/share/R/include -DNDEBUG -I. -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c platform_fs.cpp -o platform_fs.o
g++ -I/usr/share/R/include -DNDEBUG -I. -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c preformatter.cpp -o preformatter.o
g++ -I/usr/share/R/include -DNDEBUG -I. -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c render.cpp -o render.o
g++ -I/usr/share/R/include -DNDEBUG -I. -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c rtfgenerator.cpp -o rtfgenerator.o
g++ -I/usr/share/R/include -DNDEBUG -I. -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c stringtools.cpp -o stringtools.o
g++ -I/usr/share/R/include -DNDEBUG -I. -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c stylecolour.cpp -o stylecolour.o
g++ -I/usr/share/R/include -DNDEBUG -I. -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c svggenerator.cpp -o svggenerator.o
g++ -I/usr/share/R/include -DNDEBUG -I. -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c texgenerator.cpp -o texgenerator.o
g++ -I/usr/share/R/include -DNDEBUG -I. -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c xhtmlgenerator.cpp -o xhtmlgenerator.o
g++ -I/usr/share/R/include -DNDEBUG -I. -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c xmlgenerator.cpp -o xmlgenerator.o
g++ -I/usr/share/R/include -DNDEBUG -I. -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c xterm256generator.cpp -o xterm256generator.o
g++ -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o highlight.so ASBeautifier.o ASEnhancer.o ASFormatter.o ASResource.o ASStreamIterator.o Matcher.o Pattern.o ansigenerator.o bbcodegenerator.o codegenerator.o configurationreader.o ctagsreader.o datadir.o documentstyle.o elementstyle.o highlight_wrapper.o htmlgenerator.o languagedefinition.o latexgenerator.o platform_fs.o preformatter.o render.o rtfgenerator.o stringtools.o stylecolour.o svggenerator.o texgenerator.o xhtmlgenerator.o xmlgenerator.o xterm256generator.o -L/usr/lib/R/lib -lR
installing to /home/sukumar/R/x86_64-pc-linux-gnu-library/3.3/highlight/libs
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/home/sukumar/R/x86_64-pc-linux-gnu-library/3.3/highlight/libs/highlight.so':
/home/sukumar/R/x86_64-pc-linux-gnu-library/3.3/highlight/libs/highlight.so: undefined symbol: _ZTVN10__cxxabiv117__class_type_infoE
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/home/sukumar/R/x86_64-pc-linux-gnu-library/3.3/highlight’
Warning in install.packages :
installation of package ‘highlight’ had non-zero exit status
* installing *source* package ‘Rcpp’ ...
** package ‘Rcpp’ successfully unpacked and MD5 sums checked
** libs
g++ -I/usr/share/R/include -DNDEBUG -I../inst/include/ -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c Date.cpp -o Date.o
g++ -I/usr/share/R/include -DNDEBUG -I../inst/include/ -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c Module.cpp -o Module.o
g++ -I/usr/share/R/include -DNDEBUG -I../inst/include/ -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c Rcpp_init.cpp -o Rcpp_init.o
g++ -I/usr/share/R/include -DNDEBUG -I../inst/include/ -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c api.cpp -o api.o
g++ -I/usr/share/R/include -DNDEBUG -I../inst/include/ -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c attributes.cpp -o attributes.o
g++ -I/usr/share/R/include -DNDEBUG -I../inst/include/ -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c barrier.cpp -o barrier.o
g++ -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o Rcpp.so Date.o Module.o Rcpp_init.o api.o attributes.o barrier.o -L/usr/lib/R/lib -lR
installing to /home/sukumar/R/x86_64-pc-linux-gnu-library/3.3/Rcpp/libs
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/home/sukumar/R/x86_64-pc-linux-gnu-library/3.3/Rcpp/libs/Rcpp.so':
/home/sukumar/R/x86_64-pc-linux-gnu-library/3.3/Rcpp/libs/Rcpp.so: undefined symbol: _ZTVN10__cxxabiv120__si_class_type_infoE
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/home/sukumar/R/x86_64-pc-linux-gnu-library/3.3/Rcpp’
Warning in install.packages :
installation of package ‘Rcpp’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpsPMzSK/downloaded_packages’
This version of Rcpp is not installed via apt-get as a binary, but rather from source: /home/sukumar/R/x86_64-pc-linux-gnu-library/3.3/Rcpp/libs/Rcpp.so.
The error message undefined symbol: _ZTVN10__cxxabiv120__si_class_type_infoE suggests you have mismatched compilers -- and older and a newer C++ compiler.
I would recommend you delete this version (ie do rm -r ~/R/x86_64-pc-linux-gnu-library/3.3/Rcpp/), and make sure you do not have another version installed. Then installation from source should work just fine.
You generally have a choice of using the prebuilt versions available with Ubuntu 14.04. Or you could upgrade Ubuntu to version 16.04, or even 16.10. All versions should have working Rcpp versions -- and installation from source should also work just fine if you have working and consistent versions of the required tools (ie g++).
I am trying to install RHadoop on Cloudera's CDH4 Hadoop VM. RHadoop is a framework for using Hadoop via an R programming interface. One of the prerequisites to installing the RHadoop R package "rmr" is another R package called Rcpp, which is for calling C++ code from R. When I attempt to install the package, I get the following error. I contacted both the Rcpp and RHadoop communities and both say its a GCC problem. When I try to update or reinstall GCC, I get
"Package gcc-4.4.6-4.e16.x86_64 already installed and latest version, nothing to do." Any suggestions?
Here is the error (from the R command line).
> install.packages("Rcpp")
Installing package(s) into ‘/usr/lib64/R/library’
(as ‘lib’ is unspecified)
--- Please select a CRAN mirror for use in this session ---
Loading Tcl/Tk interface ... done
trying URL 'http://cran.csdb.cn/src/contrib/Rcpp_0.9.15.tar.gz'
Content type 'application/x-gzip' length 2119769 bytes (2.0 Mb)
opened URL
==============================
====================
downloaded 2.0 Mb
* installing *source* package ‘Rcpp’ ...
** package ‘Rcpp’ successfully unpacked and MD5 sums checked
** libs
g++ -m64 -I/usr/include/R -DNDEBUG -I../inst/include/ -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c Date.cpp -o Date.o
g++ -m64 -I/usr/include/R -DNDEBUG -I../inst/include/ -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c DateVector.cpp -o DateVector.o
g++ -m64 -I/usr/include/R -DNDEBUG -I../inst/include/ -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c Datetime.cpp -o Datetime.o
g++ -m64 -I/usr/include/R -DNDEBUG -I../inst/include/ -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c DatetimeVector.cpp -o DatetimeVector.o
g++ -m64 -I/usr/include/R -DNDEBUG -I../inst/include/ -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c Dimension.cpp -o Dimension.o
g++ -m64 -I/usr/include/R -DNDEBUG -I../inst/include/ -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c DottedPair.cpp -o DottedPair.o
g++ -m64 -I/usr/include/R -DNDEBUG -I../inst/include/ -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c Environment.cpp -o Environment.o
g++ -m64 -I/usr/include/R -DNDEBUG -I../inst/include/ -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c Evaluator.cpp -o Evaluator.o
g++ -m64 -I/usr/include/R -DNDEBUG -I../inst/include/ -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c Formula.cpp -o Formula.o
g++ -m64 -I/usr/include/R -DNDEBUG -I../inst/include/ -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c Function.cpp -o Function.o
g++ -m64 -I/usr/include/R -DNDEBUG -I../inst/include/ -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c Language.cpp -o Language.o
g++ -m64 -I/usr/include/R -DNDEBUG -I../inst/include/ -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c Module.cpp -o Module.o
{standard input}: Assembler messages:
{standard input}:10671: Warning: end of file not at end of a line; newline inserted
{standard input}:11544: Error: bad register name `%'
{standard input}:11544: Error: open CFI at the end of file; missing .cfi_endproc directive
g++: Internal error: Killed (program cc1plus)
Please submit a full bug report.
See <http://bugzilla.redhat.com/bugzilla> for instructions.
make: *** [Module.o] Error 1
ERROR: compilation failed for package ‘Rcpp’
* removing ‘/usr/lib64/R/library/Rcpp’
The downloaded source packages are in
‘/tmp/RtmpGdXO9h/downloaded_packages’
Updating HTML index of packages in '.Library'
Making packages.html ... done
Warning message:
In install.packages("Rcpp") :
installation of package ‘Rcpp’ had non-zero exit status
As one of the Rcpp authors, I can assure that the error is probably at your end and with either gcc (unlikely) or CDH. Rcpp gets built and rebuild a bazillion times both on CRAN (and yes there are pages summarizing the builds on CRAN and also on Debian. The package does not normally kill the compiler.
Could you be running out of ram on the box?