cannot install R package with "installation of package had non-zero exit status"

I am using window with

'''
devtools::install_github("mlysy/flexEL")
'''

and got the error:

kipping 3 packages not available: RcppEigen, Rcpp, numDeriv
√ checking for file 'C:\Users\user\AppData\Local\Temp\Rtmpy68RcO\remotes395c75252046\mlysy-flexEL-db2feb0/DESCRIPTION'

  • preparing 'flexEL': (402ms)
    √ checking DESCRIPTION meta-information ...
  • cleaning src
  • checking for LF line-endings in source and make files and shell scripts (590ms)
  • checking for empty or unneeded directories
  • building 'flexEL_0.0.0.1.tar.gz'
  • installing source package 'flexEL' ...
    ** using staged installation
    ** libs

*** arch - i386
C:/RBuildTools/3.5/mingw_32/bin/g++ -std=gnu++11 -I"F:/r/R-3.6.2/include" -DNDEBUG -I"F:/r/R-3.6.2/library/Rcpp/include" -I"F:/r/R-3.6.2/library/RcppEigen/include" -I"../inst/include/flexEL" -O2 -Wall -mtune=generic -c RcppExports.cpp -o RcppExports.o
C:/RBuildTools/3.5/mingw_32/bin/g++ -std=gnu++11 -I"F:/r/R-3.6.2/include" -DNDEBUG -I"F:/r/R-3.6.2/library/Rcpp/include" -I"F:/r/R-3.6.2/library/RcppEigen/include" -I"../inst/include/flexEL" -O2 -Wall -mtune=generic -c adj_G_exports.cpp -o adj_G_exports.o
C:/RBuildTools/3.5/mingw_32/bin/g++ -std=gnu++11 -I"F:/r/R-3.6.2/include" -DNDEBUG -I"F:/r/R-3.6.2/library/Rcpp/include" -I"F:/r/R-3.6.2/library/RcppEigen/include" -I"../inst/include/flexEL" -O2 -Wall -mtune=generic -c inner_el_exports.cpp -o inner_el_exports.o
inner_el_exports.cpp: In function 'Eigen::VectorXd OmegaHat(Eigen::MatrixXd, int, double, bool, bool)':
inner_el_exports.cpp:77:8: warning: variable 'not_conv' set but not used [-Wunused-but-set-variable]
bool not_conv;
^
C:/RBuildTools/3.5/mingw_32/bin/g++ -std=gnu++11 -I"F:/r/R-3.6.2/include" -DNDEBUG -I"F:/r/R-3.6.2/library/Rcpp/include" -I"F:/r/R-3.6.2/library/RcppEigen/include" -I"../inst/include/flexEL" -O2 -Wall -mtune=generic -c inner_elc_exports.cpp -o inner_elc_exports.o
In file included from inner_elc_exports.cpp:9:0:
../inst/include/flexEL/inner_elc.h: In member function 'void flexEL::InnerELC::LambdaNR(int&, double&)':
../inst/include/flexEL/inner_elc.h:478:25: error: no matching function for call to 'isinf(Eigen::DenseCoeffsBase<Eigen::Matrix<double, -1, 1>, 1>::Scalar&)'
if (isinf(rho_(kk)) && weights_save(kk) == 0) rho_(kk) = 0;
^
../inst/include/flexEL/inner_elc.h:478:25: note: candidate is:
In file included from F:/r/R-3.6.2/library/RcppEigen/include/Eigen/Core:533:0,
from F:/r/R-3.6.2/library/RcppEigen/include/Eigen/Dense:1,
from F:/r/R-3.6.2/library/RcppEigen/include/RcppEigenForward.h:30,
from F:/r/R-3.6.2/library/RcppEigen/include/RcppEigen.h:25,
from inner_elc_exports.cpp:8:
F:/r/R-3.6.2/library/RcppEigen/include/Eigen/src/Core/GlobalFunctions.h:88:36: note: template const Eigen::CwiseUnaryOp<Eigen::internal::scalar_isinf_op, const Derived> Eigen::isinf(const Eigen::ArrayBase&)
EIGEN_ARRAY_DECLARE_GLOBAL_UNARY(isinf,scalar_isinf_op,infinite value test,\sa Eigen::isnan DOXCOMMA Eigen::isfinite DOXCOMMA ArrayBase::isinf)
^
F:/r/R-3.6.2/library/RcppEigen/include/Eigen/src/Core/GlobalFunctions.h:32:4: note: in definition of macro 'EIGEN_ARRAY_DECLARE_GLOBAL_UNARY'
(NAME)(const Eigen::ArrayBase& x) {
^
F:/r/R-3.6.2/library/RcppEigen/include/Eigen/src/Core/GlobalFunctions.h:88:36: note: template argument deduction/substitution failed:
EIGEN_ARRAY_DECLARE_GLOBAL_UNARY(isinf,scalar_isinf_op,infinite value test,\sa Eigen::isnan DOXCOMMA Eigen::isfinite DOXCOMMA ArrayBase::isinf)
^
F:/r/R-3.6.2/library/RcppEigen/include/Eigen/src/Core/GlobalFunctions.h:32:4: note: in definition of macro 'EIGEN_ARRAY_DECLARE_GLOBAL_UNARY'
(NAME)(const Eigen::ArrayBase& x) {
^
In file included from inner_elc_exports.cpp:9:0:
../inst/include/flexEL/inner_elc.h:478:25: note: mismatched types 'const Eigen::ArrayBase' and 'Eigen::DenseCoeffsBase<Eigen::Matrix<double, -1, 1>, 1>::Scalar {aka double}'
if (isinf(rho_(kk)) && weights_save(kk) == 0) rho_(kk) = 0;
^
make: *** [F:/r/R-3.6.2/etc/i386/Makeconf:215: inner_elc_exports.o] Error 1
ERROR: compilation failed for package 'flexEL'

  • removing 'F:/r/R-3.6.2/library/flexEL'
    ERROR: Failed to install 'flexEL' from GitHub:
    installation of package ‘C:/Users/user/AppData/Local/Temp/Rtmpy68RcO/file395c49a6204b/flexEL_0.0.0.1.tar.gz’ had non-zero exit status.

I googled a lot and cannot figure out how to fix this :frowning:

try to install each of these in turn.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.