Skip to content

Bump ODEInterface compat to 0.5.1 to fix Julia 1.12+ solver loading#109

Merged
ChrisRackauckas merged 5 commits into
SciML:masterfrom
ChrisRackauckas-Claude:fix-julia-1.12-odeinterface-load
Jun 27, 2026
Merged

Bump ODEInterface compat to 0.5.1 to fix Julia 1.12+ solver loading#109
ChrisRackauckas merged 5 commits into
SciML:masterfrom
ChrisRackauckas-Claude:fix-julia-1.12-odeinterface-load

Conversation

@ChrisRackauckas-Claude

@ChrisRackauckas-Claude ChrisRackauckas-Claude commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Problem

The tests / Core (julia 1) and tests / Core (julia pre) jobs fail on master with:

AssertionError: (dlSolversInfo[dlname]).error === nothing
caused by: UndefVarError(:ODEInterface_jll, ..., ODEInterface)

in ODEInterface/DLSolvers.jl (getAllMethodPtrs -> loadODESolvers), which errors Core/algorithm_tests.jl at the first solve(prob, dopri5(), ...). The Core (julia lts) / 1.10 job is unaffected and stays green.

Root cause

ODEInterface 0.5.0 has a Julia 1.12+ incompatibility. loadODESolvers() runs @eval ODEInterface begin using ODEInterface_jll end and then, in 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 using is only visible in a newer world age, so the in-frame access raises UndefVarError(:ODEInterface_jll). Every solver then records a load error and getAllMethodPtrs throws SolverODEnotLoaded. Julia 1.10 had more permissive binding visibility, so it stayed green.

Fix

The upstream fix (luchr/ODEInterface.jl#36) switches to import ODEInterface_jll + @eval getproperty(...) and resolves it. It is now released as ODEInterface v0.5.1 and registered in General (JuliaRegistries/General#159294, merged), so it is selectable via compat.

This PR sets ODEInterface = "0.5.1". The cap is deliberately 0.5.1, not 0.5, because the still-registered 0.5.0 carries the bug — a bare "0.5" would let the resolver pick the broken version.

Because 0.5.x loads the solvers through ODEInterface_jll rather than compiling the Fortran solvers from source, the apt-packages: "gfortran" workaround previously added (for the 0.4.8 source build) is no longer needed and is removed from both the Tests and Downgrade workflows.

Package version bumped to 5.0.1.

Note: this supersedes the earlier approach in this PR, which capped to 0.4.8 (the last working registered version) as a stopgap while 0.5.1 was unregistered. Now that 0.5.1 is in General, capping forward to it is the correct fix.

Verification (local, Julia 1.12.4)

  • Resolver against the patched Project.toml selects ODEInterface v0.5.1 (pulling in ODEInterface_jll), confirming 0.5.0 is excluded.
  • loadODESolvers() loads all solvers with no errors — the original UndefVarError(:ODEInterface_jll) is gone.
  • End-to-end solve(prob, dopri5()) returns retcode: Success with the correct numerical result.
  • The full GROUP=Core test group passes: Core/algorithm_tests.jl runs to completion (no error), and callbacks/explicit_imports/initialization/jac/mass_matrix/mtk_initialization/saving all pass.

Please ignore until reviewed by @ChrisRackauckas

ChrisRackauckas and others added 4 commits June 20, 2026 08:14
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>
ODEInterface 0.5.1 is now registered in General (JuliaRegistries/General#159294),
carrying the upstream fix (luchr/ODEInterface.jl#36) for the Julia 1.12+
binding-partition issue that made loadODESolvers() raise
UndefVarError(:ODEInterface_jll).

Cap ODEInterface to 0.5.1 rather than 0.5 so the resolver cannot select the
still-broken 0.5.0. Since 0.5.x loads the solvers via ODEInterface_jll instead
of compiling from source, the gfortran apt-package workaround added for the
0.4.8 cap is no longer needed and is removed from the Tests and Downgrade
workflows. Bump the package to 5.0.1.

Verified locally on Julia 1.12.4: resolver selects ODEInterface v0.5.1, all
solvers load with no errors, Core/algorithm_tests.jl runs to completion, and
the full Core test group passes.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AJWwVTJoJLeknNgo5GTQ2K
@ChrisRackauckas-Claude

Copy link
Copy Markdown
Contributor Author

Pushed 40096d8: switched the fix from the 0.4.8 stopgap to capping ODEInterface = "0.5.1" now that v0.5.1 is registered in General. Cap is 0.5.1 (not 0.5) to exclude the still-broken 0.5.0. Removed the apt-packages: gfortran lines from Tests.yml and Downgrade.yml (the jll-based 0.5.x path needs no source build), and bumped the package to 5.0.1.

Verified locally on Julia 1.12.4: resolver selects ODEInterface v0.5.1, all solvers load with no errors, a dopri5() solve returns Success, and the full GROUP=Core suite passes (Core/algorithm_tests.jl now runs to completion instead of erroring with UndefVarError(:ODEInterface_jll)).

@ChrisRackauckas-Claude ChrisRackauckas-Claude changed the title Cap ODEInterface to 0.4.8 to fix Julia 1.12+ solver loading Bump ODEInterface compat to 0.5.1 to fix Julia 1.12+ solver loading Jun 26, 2026
@ChrisRackauckas ChrisRackauckas marked this pull request as ready for review June 27, 2026 00:41
@ChrisRackauckas ChrisRackauckas merged commit f5ab1e1 into SciML:master Jun 27, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants