CI: install BLAS / LAPACK / gfortran runtime on Linux#45
Merged
Conversation
The OMRuntimeExternalC.jl libs-v0.1.0 Linux zip ships the OMC libraries but not their system dependencies. libSimulationRuntimeC.so has DT_NEEDED entries for liblapack.so.3, libblas.so.3 and libgfortran.so.5, which ubuntu-24.04 runners do not provide out of the box. The Julia __init__ pre-load (OpenModelica/OMRuntimeExternalC.jl#15) loads every shipped OMC library correctly, then fails on libSimulationRuntimeC with "liblapack.so.3: cannot open shared object file", taking down every MSL, Spice3 and external-builtin test that goes through structural_simplify or the OMC nonlinear solver. Install liblapack3, libblas3 and libgfortran5 before julia-actions/ setup-julia runs. The Windows x86_64-mingw32 zip is self-contained (libgfortran-5.dll, libgcc_s_seh-1.dll, libopenblas.dll, libstdc++-6.dll and friends are all bundled), so no install step is needed there. Refs JKRT#44, OpenModelica/OMRuntimeExternalC.jl#15 Co-Authored-By: JKRT_CLAUDE <247156613+SVAGEN26@users.noreply.github.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.
Carries one commit (1679830) onto `ci-revival` so PR #44 picks up the system-library install step.
Why
PR #44's Ubuntu job currently fails with:
```
OMRuntimeExternalC: failed to preload libSimulationRuntimeC
could not load library ".../libSimulationRuntimeC.so"
liblapack.so.3: cannot open shared object file: No such file or directory
```
`libSimulationRuntimeC.so` in the `OMRuntimeExternalC.jl libs-v0.1.0` Linux zip has DT_NEEDED entries for `liblapack.so.3`, `libblas.so.3` and `libgfortran.so.5`. `ubuntu-24.04` runners do not ship those by default. The Julia `init` pre-load fix (OpenModelica/OMRuntimeExternalC.jl#15, merged as v0.3.2) loads every shipped OMC library correctly, then fails on `libSimulationRuntimeC` because BLAS/LAPACK/gfortran are missing from the runner.
The downstream chain is large: every MSL, Spice3 and external-builtin test that goes through `structural_simplify` or the OMC nonlinear solver ends up depending on `libSimulationRuntimeC`. The `UndefVarError: in_c` failures in Spice3 examples and the MSL `Test Failed` clusters in the PR #44 run are all symptoms of this single root cause.
Fix
One step before `julia-actions/setup-julia`:
```yaml
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y --no-install-recommends liblapack3 libblas3 libgfortran5
```
Linux-only. The Windows `x86_64-mingw32` zip in the same release is self-contained (ships its own `libgfortran-5.dll`, `libopenblas.dll`, `libstdc++-6.dll`, etc.), so no install step is needed there. macOS is not in this PR's matrix.
Test plan
Refs #44, OpenModelica/OMRuntimeExternalC.jl#15