[R-sig-ME] errors building lme4 from source: Indexis not a member of 'lme4::lme4CholmodDecomposition...
Boylan, Ross
Ro@@@Boy|@n @end|ng |rom uc@|@edu
Sat Jun 29 05:03:15 CEST 2024
While trying to build lme4 from source with current master (SHA a7239d63) on MS-Windows I get the errors shown at the bottom of this message; the first one is
----------------------------------------------
lme4CholmodDecomposition.h: In instantiation of 'lme4::lme4CholmodDecomposition<_MatrixType, _UpLo>::solveInPlaceonst Eigen::MatrixBase<OtherDerived>&, int) const [with OtherDerived = Eigen::Matrix<double, -1, -1>; _MatrixType = Eigen::SparseMatrix<double, 0, int>; int _UpLo = 1]
predModule.cpp:127:37: required from here
lme4CholmodDecomposition.h:59:39:error: Indexis not a member of 'lme4::lme4CholmodDecomposition<Eigen::SparseMatrix<double, 0, int> >::Base{aka 'Eigen::CholmodDecomposition<Eigen::SparseMatrix<double, 0, int>, 1>
59 | eigen_assert((Base::Index)(factor()->n)ther.rows());
| ~~~~~~~~~~~~~^~~~~~~~~~~~~
------------------------------------------------
which looks as if I may have some version mismatch, but I'm not sure exactly where the culprit is or what to do about it. Any ideas?
This particular build was triggered while requesting a run of the test suite in RStudio, but I got roughly the same when doing a straight build in RStudio.
This is the development version of lme4, but the rest of my system, including the dependencies, is back in vanilla R 4.4.0. And I have lme4 1.1-35.4 installed from binary.
Further version info:
> Sys.info()
sysname release version nodename machine login
"Windows" "Server x64" "build 17763" "xxx" "x86-64" "me"
user effective_user
"me" "me"
> R.version
_
platform x86_64-w64-mingw32
arch x86_64
os mingw32
crt ucrt
system x86_64, mingw32
status
major 4
minor 4.0
year 2024
month 04
day 24
svn rev 86474
language R
version.string R version 4.4.0 (2024-04-24 ucrt)
nickname Puppy Cup
RStudio 2024.04.2+764 "Chocolate Cosmos" Release (e4392fc9ddc21961fd1d0efd47484b43f07a4177, 2024-06-05) for windows
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) RStudio/2024.04.2+764 Chrome/120.0.6099.291 Electron/28.3.1 Safari/537.36, Quarto 1.4.555 (C:/Program Files/RStudio/resources/app/bin/quarto/bin/quarto.exe)
R packages:
Rcpp 1.0.12
RcppEigen 0.3.4.0.0
Matrix 1.7-0 # in particular, past 1.6-2, source of somewhat similar problems
Because those were all binary installs, I wondered if I was simply missing some headers. But the errors don't look like "can't find file".
RTools44 installed.
Finally, here's part of the log of the failure:
---------------------------------------------------------------------
==> devtools::test()
i Testing lme4
Error in `(function (command = NULL, args = character(), error_on_status = TRUE, ...`:
! System command 'Rcmd.exe' failed
---
Exit status: 1
Stdout & stderr:
* installing *source* package 'lme4' ...
** using staged installation
** libs
using C++ compiler: 'G__~1.EXE (GCC) 13.2.0'
g++ -std=gnu++17 -I"C:/PROGRA~1/R/R-44~1.0/include" -DNDEBUG -I. -DNDEBUG -DEIGEN_DONT_VECTORIZE -I'C:/Program Files/R/R-4.4.0/library/Rcpp/include' -I'C:/Program Files/R/R-4.4.0/library/RcppEigen/include' -I'C:/Program Files/R/R-4.4.0/library/Matrix/include' -I"C:/Programs/rtools44/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -gdwarf-2 -mfpmath=sse -msse2 -mstackrealign -UNDEBUG -Wall -pedantic -g -O0 -fdiagnostics-color=always -c external.cpp -o external.o
g++ -std=gnu++17 -I"C:/PROGRA~1/R/R-44~1.0/include" -DNDEBUG -I. -DNDEBUG -DEIGEN_DONT_VECTORIZE -I'C:/Program Files/R/R-4.4.0/library/Rcpp/include' -I'C:/Program Files/R/R-4.4.0/library/RcppEigen/include' -I'C:/Program Files/R/R-4.4.0/library/Matrix/include' -I"C:/Programs/rtools44/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -gdwarf-2 -mfpmath=sse -msse2 -mstackrealign -UNDEBUG -Wall -pedantic -g -O0 -fdiagnostics-color=always -c glmFamily.cpp -o glmFamily.o
g++ -std=gnu++17 -I"C:/PROGRA~1/R/R-44~1.0/include" -DNDEBUG -I. -DNDEBUG -DEIGEN_DONT_VECTORIZE -I'C:/Program Files/R/R-4.4.0/library/Rcpp/include' -I'C:/Program Files/R/R-4.4.0/library/RcppEigen/include' -I'C:/Program Files/R/R-4.4.0/library/Matrix/include' -I"C:/Programs/rtools44/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -gdwarf-2 -mfpmath=sse -msse2 -mstackrealign -UNDEBUG -Wall -pedantic -g -O0 -fdiagnostics-color=always -c mcmcsamp.cpp -o mcmcsamp.o
g++ -std=gnu++17 -I"C:/PROGRA~1/R/R-44~1.0/include" -DNDEBUG -I. -DNDEBUG -DEIGEN_DONT_VECTORIZE -I'C:/Program Files/R/R-4.4.0/library/Rcpp/include' -I'C:/Program Files/R/R-4.4.0/library/RcppEigen/include' -I'C:/Program Files/R/R-4.4.0/library/Matrix/include' -I"C:/Programs/rtools44/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -gdwarf-2 -mfpmath=sse -msse2 -mstackrealign -UNDEBUG -Wall -pedantic -g -O0 -fdiagnostics-color=always -c optimizer.cpp -o optimizer.o
g++ -std=gnu++17 -I"C:/PROGRA~1/R/R-44~1.0/include" -DNDEBUG -I. -DNDEBUG -DEIGEN_DONT_VECTORIZE -I'C:/Program Files/R/R-4.4.0/library/Rcpp/include' -I'C:/Program Files/R/R-4.4.0/library/RcppEigen/include' -I'C:/Program Files/R/R-4.4.0/library/Matrix/include' -I"C:/Programs/rtools44/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -gdwarf-2 -mfpmath=sse -msse2 -mstackrealign -UNDEBUG -Wall -pedantic -g -O0 -fdiagnostics-color=always -c predModule.cpp -o predModule.o
In file included from C:/Programs/rtools44/x86_64-w64-mingw32.static.posix/lib/gcc/x86_64-w64-mingw32.static.posix/13.2.0/include/c++/cassert:44
from C:/Program Files/R/R-4.4.0/library/RcppEigen/include/Eigen/Core:84
from C:/Program Files/R/R-4.4.0/library/RcppEigen/include/Eigen/Dense:1
from C:/Program Files/R/R-4.4.0/library/RcppEigen/include/RcppEigenForward.h:28
from C:/Program Files/R/R-4.4.0/library/RcppEigen/include/RcppEigen.h:25
from predModule.h:12
from predModule.cpp:8
lme4CholmodDecomposition.h: In instantiation of 'lme4::lme4CholmodDecomposition<_MatrixType, _UpLo>::solveInPlaceonst Eigen::MatrixBase<OtherDerived>&, int) const [with OtherDerived = Eigen::Matrix<double, -1, -1>; _MatrixType = Eigen::SparseMatrix<double, 0, int>; int _UpLo = 1]
predModule.cpp:127:37: required from here
lme4CholmodDecomposition.h:59:39:error: Indexis not a member of 'lme4::lme4CholmodDecomposition<Eigen::SparseMatrix<double, 0, int> >::Base{aka 'Eigen::CholmodDecomposition<Eigen::SparseMatrix<double, 0, int>, 1>
59 | eigen_assert((Base::Index)(factor()->n)ther.rows());
| ~~~~~~~~~~~~~^~~~~~~~~~~~~
C:/Program Files/R/R-4.4.0/library/RcppEigen/include/Eigen/src/Core/util/Macros.h:1037:25:note: expansion of macro 'eigen_plain_assert
1037 | #define eigen_assert(x) eigen_plain_assert
| ^~~~~~~~~~~~~~~~~~
lme4CholmodDecomposition.h:59:13:note: expansion of macro 'eigen_assert
59 | eigen_asserte::Index)(factor()->n) == other.rows());
| ^~~~~~~~~~~~
lme4CholmodDecomposition.h: In instantiation of 'lme4::lme4CholmodDecomposition<_MatrixType, _UpLo>::solveInPlaceonst Eigen::MatrixBase<OtherDerived>&, int) const [with OtherDerived = Eigen::Map<Eigen::Matrix<double, -1, 1> >; _MatrixType = Eigen::SparseMatrix<double, 0, int>; int _UpLo = 1]
predModule.cpp:191:25: required from here
lme4CholmodDecomposition.h:59:39:error: Indexis not a member of 'lme4::lme4CholmodDecomposition<Eigen::SparseMatrix<double, 0, int> >::Base{aka 'Eigen::CholmodDecomposition<Eigen::SparseMatrix<double, 0, int>, 1>
59 | eigen_assert((Base::Index)(factor()->n)ther.rows());
| ~~~~~~~~~~~~~^~~~~~~~~~~~~
C:/Program Files/R/R-4.4.0/library/RcppEigen/include/Eigen/src/Core/util/Macros.h:1037:25:note: expansion of macro 'eigen_plain_assert
### and more, ending
C:/Program Files/R/R-4.4.0/library/RcppEigen/include/Eigen/src/Core/util/Macros.h:1037:25:note: expansion of macro 'eigen_plain_assert
1037 | #define eigen_assert(x) eigen_plain_assert
| ^~~~~~~~~~~~~~~~~~
lme4CholmodDecomposition.h:59:13:note: expansion of macro 'eigen_assert
59 | eigen_asserte::Index)(factor()->n) == other.rows());
| ^~~~~~~~~~~~
make: *** [C:/PROGRA~1/R/R-44~1.0/etc/x64/Makeconf:296: predModule.o] Error 1
ERROR: compilation failed for package 'lme4'
---------------------------------------------------------------------------------------------------------
Thanks!
Ross
P.S. I have made some changes, but none of them involve the C code.
And "check" in RStudio passes. Which is a bit weird; I thought building the package was part of the check. I guess it's "build" as in "create the source package".
More information about the R-sig-mixed-models
mailing list