Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ABI change in v1.6-2 affects LinkingTo packages #42

Open
mfansler opened this issue Mar 22, 2024 · 1 comment
Open

ABI change in v1.6-2 affects LinkingTo packages #42

mfansler opened this issue Mar 22, 2024 · 1 comment
Labels

Comments

@mfansler
Copy link
Member

Runtime error from incompatible ABI

Discussion was raised in conda-forge/r-rcpp-feedstock#39 whether we should be concerned about ABI changes when R packages use LinkingTo. I've just found that r-lme4 linking against r-matrix=1.6_1.1=r42h316c678_0 was incompatible with a newer version (1.6_5). It turned up while running testthat tests for the r-finetune package in conda-forge/r-finetune-feedstock#2 and looked like:

══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-anova-filter.R:37:3'): anova filtering and logging ─────────────
Error in `initializePtr()`: function 'chm_factor_ldetL2' not provided by package 'Matrix'
Backtrace:1. └─lme4::lmer(.estimate ~ .config + (1 | id2/id), data = rmse_configs) at test-anova-filter.R:37:3
  2.   ├─base::do.call(...)
  3.   └─lme4 (local) `<fn>`(...)
  4.     ├─base::do.call(...)
  5.     └─methods (local) `<rfMthdDf>`(...)
  6.       └─methods::new(def, ...)
  7.         ├─methods::initialize(value, ...)
  8.         └─methods::initialize(value, ...)
  9.           └─.Object$initialize(...)
 10.             └─lme4 (local) initializePtr()

According to this StackOverflow post, there was an ABI change introduced with 1.6-2.

Potentially impacted packages

The reverse linking to list from CRAN shows:

ahMLE
bayesWatch
bcSeq
cplm
GeneralizedWendland
geostatsp
hibayes
irlba
lme4
mcmcsae
OpenMx
PRIMME
PUlasso
robustlmm
spGARCH
TMB

r-lme4 is the only one I recognize as high profile.

Considerations

I can think of a few different routes that could be taken to remedy this:

  • manually add r-matrix >=1.6_2 on the reverse-linking-to packages
  • add pin compatible constraints reverse-linking-to recipes
  • add run exports to r-matrix and add it conda-forge-pinning-feedstock

The first is the easiest and least restrictive. It still leaves us open to this arise again, but it only impacts a small number of packages.

The second approach could be restrictive on user environments whenever the reverse-linking-to packages are installed. The fact that ABI change was not accompanied by semantic version bump seems to undermine our ability to make a loose constraint.

The third would be the most restrictive, resource consuming, and add overhead to recipes where it doesn't matter. Hundreds of packages use r-matrix and the R build procedures require that all dependencies be present on host at build time. The number of recipes this would impact in terms of adding ignores for the run exports would far outnumber those that actually need the constraint.

Actions

For now, I will proceed with rebuilding r-lme4 and adding r-matrix>=1.6._2. I'll leave this open to discussion for what to do with the others.

@mfansler
Copy link
Member Author

An issue has been opened on each of the reverse-linking-to feedstocks that we have. I won't get to this immediately, so anyone else wanting to inspect previous artifacts and/or adjust those recipes, please feel free. 🙏

For now, at least it's all documented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant