1

I use CentOS 7, I have 3.6.0 version of R and I've installed "devtools" so that I can then install DADA 2 through it. However, when I put a command: devtools::install_github("benjjneb/dada2", ref="v1.16") I get an error:

* installing *source* package ‘RcppEigen’ ...
** package ‘RcppEigen’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
g++ -m64 -std=gnu++11 -I"/usr/include/R" -DNDEBUG  -I"/usr/lib64/R/library/Rcpp/include" -I/usr/local/include -I../inst/include -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
g++ -m64 -std=gnu++11 -I"/usr/include/R" -DNDEBUG  -I"/usr/lib64/R/library/Rcpp/include" -I/usr/local/include -I../inst/include -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 RcppExports.cpp -o RcppExports.o
g++ -m64 -std=gnu++11 -I"/usr/include/R" -DNDEBUG  -I"/usr/lib64/R/library/Rcpp/include" -I/usr/local/include -I../inst/include -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 fastLm.cpp -o fastLm.o
fastLm.cpp: In function ‘int lmsol::gesdd(Eigen::MatrixXd&, Eigen::ArrayXd&, Eigen::MatrixXd&)’:
fastLm.cpp:147:54: error: expected ‘)’ before ‘FCONE’
     &m, Vt.data(), &n, &wrk, &mone, &iwork[0], &info FCONE);
                                                      ^
fastLm.cpp:151:59: error: expected ‘)’ before ‘FCONE’
     &m, Vt.data(), &n, &work[0], &lwork, &iwork[0], &info FCONE);
                                                           ^
make: *** [fastLm.o] Error 1
ERROR: compilation failed for package ‘RcppEigen’
* removing ‘/usr/lib64/R/library/RcppEigen’

The downloaded source packages are in
    ‘/tmp/RtmpM0kiKy/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Warning message:
In install.packages("RcppEigen") :
  installation of package ‘RcppEigen’ had non-zero exit status

How do I get past it?

IceMajor
  • 37
  • 5

1 Answers1

0

It may be too late to answer, but let me show you how I solved a similar problem to install RcppEigen package by locally modifying source codes. Below is a terse sequence of commands to do this job.

oldfart@rfc$ pwd
/home/oldfart/workspace
oldfart@rfc$ wget https://cran.r-project.org/src/contrib/RcppEigen_0.3.3.9.3.tar.gz
oldfart@rfc$ tar -xzf RcppEigen_0.3.3.9.3.tar.gz
oldfart@rfc$ cd RcppEigen/src
oldfart@rfc$ [Edit fastLm.cpp.  Result below.]
oldfart@rfc$ diff fastLm.cpp.old fastLm.cpp
27a28, 32
> // See https://cran.r-project.org/doc/manuals/R-exts.html
> #ifndef FCONE
> # define FCONE
> #endif
oldfart@rfc$ cd ../..
oldfart@rfc$ tar -czf RcppEigen.tgz RcppEigen
oldfart@rfc$ R
> install.packages("./RcppEigen.tgz", repos=NULL, type="source")

Then, I just could pass compilation, not sure of any affect on numerical aspects.

chomeyama
  • 96
  • 4