generated from alex/base-template
Verify Crystal stdlib is installed #60
Labels
No labels
dependencies
No milestone
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
alex/runner-image#60
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Agents runs involving Crystal produce consistently this message:
"Note: the Crystal stdlib is missing in this sandbox, so the suite couldn't run locally — CI is the first to exercise it."
Let's verify we're installing it properly.
?3to Verify Crystal stdlib is installed/pi verify and, if fixes are needed, create a PR
Found the root cause. The Crystal binary looks up its stdlib relative to its own location (
$ORIGIN/../share/crystal/src), but the Containerfile relocates the binary to/usr/local/binwhile copying the stdlib to/usr/share/crystal— so the stdlib is present in the image but never found. Verified locally: copying binary to/usr/local/bin+ stdlib to/usr/local/share/crystalmakescrystal runandcrystal buildwork. Applying the fix:Reproduced the exact failure mode with the old layout (Error: can't find file 'prelude'), and confirmed the fix works. Creating the PR:Verified the issue and opened PR #61 with the fix.Root cause
The Crystal binary locates its stdlib and libgc relative to its own path (
$ORIGIN/../share/crystal/srcand$ORIGIN/../lib/crystal). The Containerfile copies the binary to/usr/local/bin, so it looks in/usr/local/share/crystal/src— but the stdlib was copied to/usr/share/crystal. Result: the files were in the image but the compiler never found them, failing withError: can't find file 'prelude'— which agents reported as "the stdlib is missing".Verification performed
crystallang/crystal:1image filesystem and confirmed the binary's$ORIGIN-relative lookup paths (found viastringson the binary).can't find file 'prelude') with the old layout (binary in/usr/local/bin, stdlib in/usr/share/crystal)./usr/local/share/crystal,crystal --version,crystal run, andcrystal buildall succeed.Fix (PR #61)
/usr/local/share/crystaland libgc to/usr/local/lib/crystal, matching the binary's lookup paths.crystal runof a one-liner) so a broken stdlib now fails the image build immediately instead of surfacing later in agent runs.PR: #61
View action run | Model: zai/glm-5.3-flash (thinking: low) | Time: 4m 56s | Tokens: 294.6K | Cost: $0.01 | Pi SDK v1.2.0 | Action v2.30.0-develop (develop @ 4ddb1db)