Skip to content

Fix Docker build: resolve Julia sys.so not found in install_rms.sh#910

Open
alongd wants to merge 1 commit into
mainfrom
docker-julia-sysso-fix
Open

Fix Docker build: resolve Julia sys.so not found in install_rms.sh#910
alongd wants to merge 1 commit into
mainfrom
docker-julia-sysso-fix

Conversation

@alongd

@alongd alongd commented Jul 9, 2026

Copy link
Copy Markdown
Member

Problem

The Docker Image Build and Push workflow has been red on every push/pull_request run since ~2026-06-10 (last green real build: 2026-06-04). Scheduled runs are green only because on a schedule event neither build step's if: condition matches, so no image is actually built.

The build fails in the builder stage at install_rms.sh:

ERROR: could not load library "/home/mambauser/.juliaup/bin/../lib/julia/sys.so"
/home/mambauser/.juliaup/bin/../lib/julia/sys.so: cannot open shared object file: No such file or directory

This is not related to PR #907 (Dependabot action bumps) — it reproduces on main independently.

Root cause

~/.juliaup/bin/julia is the juliaup launcher, not the real Julia binary. install_rms.sh sets PYTHON_JULIAPKG_EXE=$(which julia), so pyjuliacall receives the launcher path and derives sys.so relative to it — ~/.juliaup/bin/../lib/julia/sys.so, which does not exist. The real Julia binary (and its sys.so) lives under the juliaup depot, reported by Sys.BINDIR.

Fix

Prepend the real Julia BINDIR (resolved by running julia -e "print(Sys.BINDIR)" through the launcher) to PATH before sourcing install_rms.sh, so which julia resolves to the actual binary. The inner bash -c is single-quoted so the $(...) is evaluated inside the activated rmg_env, not by the outer shell before micromamba run activates it.

Provenance / why this will work

This restores the fix originally proposed in #901, which was closed without merging (the closing comment conflated it with an actions/checkout bump). #901's own CI log proves the fix reaches [ Info: RMS loaded successfully! past this step. The second blocker that #901's log then exposed — ModuleNotFoundError: No module named 'setuptools' in make compile — is already resolved on main via #904 (setuptools is present in environment.yml). With both fixes in place, the build should complete.

Verification is via this PR's Docker build check (the full image build can't be run locally against the RMG toolchain).

🤖 Generated with Claude Code

`~/.juliaup/bin/julia` is the juliaup launcher, not the real Julia binary.
When install_rms.sh sets PYTHON_JULIAPKG_EXE=$(which julia), pyjuliacall
receives the launcher path and derives sys.so relative to it, yielding a
non-existent `~/.juliaup/bin/../lib/julia/sys.so` and failing the build:

    ERROR: could not load library ".../.juliaup/bin/../lib/julia/sys.so"

Prepend the real Julia BINDIR (obtained by running `julia -e "print(Sys.BINDIR)"`
through the launcher) to PATH so `which julia` inside install_rms.sh resolves
to the actual binary. Single-quote the inner `bash -c` so the `$(...)` is
evaluated inside the activated rmg_env, not by the outer shell.

Restores the previously-proposed fix from #901 (closed without merging). Its CI
log confirmed this step then reached `[ Info: RMS loaded successfully!`; the
follow-on setuptools blocker it exposed is already resolved on main (#904).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@codecov

codecov Bot commented Jul 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 63.07%. Comparing base (8f7b9a0) to head (314991b).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #910      +/-   ##
==========================================
- Coverage   63.16%   63.07%   -0.10%     
==========================================
  Files         114      114              
  Lines       38177    38177              
  Branches     9990     9990              
==========================================
- Hits        24114    24079      -35     
- Misses      11181    11204      +23     
- Partials     2882     2894      +12     
Flag Coverage Δ
functionaltests 63.07% <ø> (-0.10%) ⬇️
unittests 63.07% <ø> (-0.10%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes the ARC Docker image build failure in the builder stage by ensuring the Julia executable resolved inside rmg_env is the real Julia binary (from juliaup’s depot) rather than the juliaup launcher, preventing pyjuliacall from deriving an invalid sys.so path.

Changes:

  • Switch the micromamba run ... bash -c invocation to single quotes so $(...) is evaluated after rmg_env activation.
  • Prepend $(julia -e "print(Sys.BINDIR)") to PATH before sourcing install_rms.sh, so which julia resolves to the actual Julia binary.
  • Add explanatory Dockerfile comments documenting the root cause and rationale.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Dockerfile
# binary. Single quotes keep `$(...)` from being evaluated by the outer shell before micromamba
# activates rmg_env, so `julia` resolves inside the environment.
RUN micromamba run -n rmg_env bash -c '\
export PATH=$(julia -e "print(Sys.BINDIR)"):$PATH && \
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