Closed matteodelucchi closed 6 months ago
No, as far as I've found, INLA doesn't need a more restrictive Matrix dependency. The issue is discussed further here: https://github.com/inlabru-org/inlabru/issues/218 The problem only occurs due to some specific binary packages being out of sync. Once the binary builds of those packages on CRAN catch up with each other the problem should go away. INLA itself doesn't need rebuilding. Imposing a stricter Matrix dependency would needlessly prevent INLA installations on systems that don't have (or need) the newer Matrix version.
Further, those other packages also don't need to depend on the latest Matrix version; it's a binary package issue, and they still work fine with the older version, and wouldn't be automatically fixed by changing the Matrix version dependency.
The problem is that CRAN doesn't automatically rebuild the binary packages when there are dependency ABI changes; I saw a discussion about that on r-pkg-devel about this precise issue a while back.
To be more clear, as far as I know, the issue is with the binary packages for MatrixModels and potentially some other packages, but not the binary INLA packages.
Here's the core bug report for MatrixModels itself: https://bugs.launchpad.net/ubuntu/+source/rmatrix/+bug/2043461
In short, all MatrixModels
binary packages need rebuilding. We can't fix CRAN ourselves, and updating the INLA Matrix
version dependency would not solve problem either (in fact, it would make it worse). The temporary fix on user systems is
install.packages("MatrixModels", type = "source")
In some cases, package checking with github actions are also affected by this. I've just added this to the checking workflows for inlabru
, e.g. https://github.com/inlabru-org/inlabru/blob/devel/.github/workflows/R-CMD-check.yaml
- name: Fix temporary out-of-sync binary packages
run: |
install.packages("MatrixModels", type = "source")
shell: Rscript {0}
but this didn't actually fix the problem I had seen on ubuntu-latest (oldrel-1)
, as it appears to have ignored the type="source"
argument. I don't see any problems for current R (but it just appeared for R-devel).
I think the MatrixModels maintaners (which appear to be the same as the Matrix maintainers) may need to bump the MatrixModels version and submit as a new version to CRAN, to force a rebuild.
This tweak solved the github actions issue, and will likely also be helpful on some user systems; the default repository in the github action was the posit servers, that apparently lead it to install the out-of-sync binary package instead of the asked for source package.
- name: Fix temporary out-of-sync binary packages
run: |
install.packages("MatrixModels", repos = "https://cloud.r-project.org", type = "source")
shell: Rscript {0}
I recently encountered test failures in
abn
, which is relying onINLA
. These tests were functioning correctly a couple of weeks ago, indicating that the issue is relatively recent.Apparently, other users seem to experience similar problems with
INLA
. The root cause appears to be a change in the ABI within theMatrix
package, a dependency ofINLA
. This has been discussed in a SO answer, suggesting the solution to upgradeMatrix
andMatrixModels
.Therefore, I suggest an update to the
INLA
package dependencies. Specifically, to increase the minimum version of theMatrix
package to >= 1.6-2: https://github.com/hrue/r-inla/blob/59675efd51a3cac8692b5b83e390da4ae7917381/rinla/DESCRIPTION#L19I look forward to hearing your thoughts on this proposed solution.