Skip to content

Fix R runtime - #348

Merged
asottile merged 1 commit into
pre-commit-ci:mainfrom
lorenzwalthert:r/fix-image
Oct 10, 2026
Merged

asottile merged 1 commit into
pre-commit-ci:mainfrom
lorenzwalthert:r/fix-image

Conversation

@lorenzwalthert

@lorenzwalthert lorenzwalthert commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

#346 removed libblas3 and liblapack3 from the apt list. R doesn’t need those, but liblapack3 depended on libgfortran5, so removing it also removed libgfortran.so.5. R’s stats.so links against that library, so R now fails when calling the {stats} package, a base R package (i.e. shipped with R, like the python standard library):

library(stats)
unable to load shared object '/opt/r/lib/R/library/stats/libs/stats.so':
  libgfortran.so.5: cannot open shared object file

This breaks most language: r hook environments (renv::install fails while loading stats). We first add a call to {stats} package to demonstrate the behavior in the R tests and later add libgfortran.so back to the main image.

@lorenzwalthert
lorenzwalthert force-pushed the r/fix-image branch 2 times, most recently from 907bd7c to f5906a8 Compare October 10, 2026 14:20
@lorenzwalthert
lorenzwalthert marked this pull request as draft October 10, 2026 14:21
@lorenzwalthert

Copy link
Copy Markdown
Contributor Author

You can see that d1564d7 shows the problematic behavior. Also for some reasons, the conda tests fail, that's why I temporarily deactivated all tests except the R tests (for speed).

@lorenzwalthert
lorenzwalthert marked this pull request as ready for review October 10, 2026 16:29
@lorenzwalthert

lorenzwalthert commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor Author

I can confirm that this PR runs successfully on all my hooks as I have created an integration test with it in my fork: lorenzwalthert#1
I have re-activated all tests. Unfortunately, there seems to be an unrelated failure of the conda test that I don't understand / fix in this PR.

@asottile asottile left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@asottile
asottile enabled auto-merge October 10, 2026 19:11
@lorenzwalthert

Copy link
Copy Markdown
Contributor Author

Still fails on the conda test...

@asottile

Copy link
Copy Markdown
Member

yeah I'm trying to upgrade conda to fix that. for now I've rolled back to the previous image

@asottile
asottile disabled auto-merge October 10, 2026 22:21
@lorenzwalthert

Copy link
Copy Markdown
Contributor Author

Thanks for the quick rollback response.

@asottile
asottile merged commit 0c80000 into pre-commit-ci:main Oct 10, 2026
2 checks passed
@lorenzwalthert

lorenzwalthert commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor Author

I still see failures when pushing just now. Seems like pre-commit.ci did not pick it up yet?

@lorenzwalthert
lorenzwalthert deleted the r/fix-image branch October 11, 2026 12:58
@asottile

Copy link
Copy Markdown
Member

I haven't had a chance to deploy it yet. had some unrelated issues last night to resolve. should be in a couple hours and then I'll let you know here!

@lorenzwalthert

lorenzwalthert commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor Author

No worries, tomorrow is also fine or any time you get to it. A heads up here would be appreciated. Also, do you have an indication of how many runs this broke?

@asottile

Copy link
Copy Markdown
Member

I've just deployed the newest image

@lorenzwalthert

lorenzwalthert commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor Author

Hooray ,it worked. 🥳

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants