Cap ODEInterface to 0.4.8 to fix Julia 1.12+ solver loading#109
Draft
ChrisRackauckas-Claude wants to merge 3 commits into
Draft
Cap ODEInterface to 0.4.8 to fix Julia 1.12+ solver loading#109ChrisRackauckas-Claude wants to merge 3 commits into
ChrisRackauckas-Claude wants to merge 3 commits into
Conversation
ODEInterface 0.5.0 (the only registered 0.5.x) fails to load its solver libraries on Julia 1.12 and 1.13. `loadODESolvers()` does `@eval ODEInterface begin using ODEInterface_jll end` and then, within the same call frame, accesses the `ODEInterface_jll` global via `getproperty`. Under Julia 1.12's stricter binding-partition / world-age semantics the binding created by the `using` is only visible in a newer world age, so the in-frame access raises `UndefVarError(:ODEInterface_jll)`. All solvers then report a load error and `getAllMethodPtrs` throws `SolverODEnotLoaded`, erroring Core/algorithm_tests.jl on the `julia 1` and `julia pre` CI jobs (lts/1.10 was unaffected and stayed green). The upstream fix (luchr/ODEInterface.jl PR SciML#36, tagged v0.5.1) switches to `import ODEInterface_jll` and `@eval getproperty(...)`, but v0.5.1 is not yet registered in General, so it cannot be selected by compat. ODEInterface 0.4.8 uses the older local gfortran build path, which loads correctly on Julia 1.12/1.13, so cap to it as the last working registered version. Verified locally: GROUP=Core `Pkg.test` passes on both Julia 1.12.6 and 1.10.11 (all Core test files green, exit 0). When ODEInterface 0.5.1 is registered, this cap can be relaxed back to allow 0.5.1+. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Capping ODEInterface to 0.4.8 (to dodge the 0.5.0 Julia-1.12 _jll load bug) reintroduces 0.4.8's gfortran source build in deps/build.jl. On runners without gfortran the build errors with "Currently only gfortran is supported", which broke the QA (julia lts) job. Pass apt-packages: "gfortran" to the grouped-tests workflow so every test job has gfortran before building/testing. Verified locally on Julia 1.10: ODEInterface resolves to 0.4.8, the gfortran-built solvers load, a dopri5() solve returns Success, and the QA suite passes (Aqua 7 pass + pre-existing broken, JET pre-existing broken). Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The Downgrade job also builds ODEInterface 0.4.8 from source (gfortran), which intermittently fails on runners lacking gfortran. Pass apt-packages: "gfortran" to downgrade.yml for the same reason as the main Tests workflow. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The
tests / Core (julia 1)andtests / Core (julia pre)jobs fail on master with:in
ODEInterface/DLSolvers.jl(getAllMethodPtrs->loadODESolvers), which errorsCore/algorithm_tests.jlat the firstsolve(prob, dopri5(), ...). TheCore (julia lts)/ 1.10 job is unaffected and stays green.Root cause
ODEInterface 0.5.0 (the only registered 0.5.x) has a Julia 1.12+ incompatibility.
loadODESolvers()runs@eval ODEInterface begin using ODEInterface_jll endand then, in the same call frame, accesses theODEInterface_jllglobal viagetproperty. Under Julia 1.12's stricter binding-partition / world-age semantics, the binding created byusingis only visible in a newer world age, so the in-frame access raisesUndefVarError(:ODEInterface_jll). Every solver then records a load error andgetAllMethodPtrsthrowsSolverODEnotLoaded. Julia 1.10 had more permissive binding visibility, so it stayed green.This was reproduced locally on Julia 1.12.6 (a bare
using ODEInterface; loadODESolvers()yieldsdopri5 error => UndefVarError(:ODEInterface_jll)).Fix
The upstream fix (luchr/ODEInterface.jl#36, merged, tagged
v0.5.1) switches toimport ODEInterface_jll+@eval getproperty(...)and resolves it — butv0.5.1is still not registered in General, so it cannot be selected via compat.As the last working registered version, ODEInterface 0.4.8 uses the older local-gfortran build path (no
ODEInterface_jll), which loads correctly on Julia 1.12/1.13. This PR capsODEInterface = "0.4.8".Follow-up: gfortran for the 0.4.8 source build
Capping to 0.4.8 reintroduces 0.4.8's behaviour of compiling the Fortran solvers from source in
deps/build.jl. On a runner withoutgfortranthat build hard-errors withCurrently only gfortran is supported., which broke thetests / QA (julia lts)job (thejulia 1runner happened to have gfortran, lts did not). This PR therefore also passesapt-packages: "gfortran"to thegrouped-tests.ymlworkflow, so every test job installs gfortran before building/testing. (Whenapt-packagesis set the workflow runs onubuntu-24.04instead ofubuntu-latest, as intended.)When ODEInterface 0.5.1 is registered, the cap can be relaxed back to
0.5(>= 0.5.1), the jll-based path restored, and theapt-packages: gfortranline removed.Verification (local)
dopri5()solve returnsSuccess, and the QA suite passes (Aqua 7 pass + 1 pre-existing@test_broken, JET 1 pre-existing@test_broken).GROUP=CoreJulia 1.12.6 (originally failing Core): all Core test files pass,Core/algorithm_tests.jlruns allsolvecalls without error.GROUP=CoreJulia 1.10.11 lts: all Core test files pass — no regression.Please ignore until reviewed by @ChrisRackauckas