Skip to content

fix(release): name Alpine's llvm-config by its prefix - #9348

Merged
proggeramlug merged 1 commit into
mainfrom
fix/musl-llvm-config-path
Sep 1, 2026
Merged

fix(release): name Alpine's llvm-config by its prefix#9348
proggeramlug merged 1 commit into
mainfrom
fix/musl-llvm-config-path

Conversation

@proggeramlug

Copy link
Copy Markdown
Contributor

Follow-up to #9298. The musl image's LLVM version check invoked a bare llvm-config, which Alpine does not put on PATH — its LLVM 22 installs under /usr/lib/llvm22 and only versioned tools are exposed. So docker build failed here:

#6 6.911 /bin/sh: line 0: llvm-config: not found
ERROR: process "/bin/sh -c apk add --no-cache …" did not complete successfully

The packages install correctly — the apk run reached 76/80 before my assertion ran. Only the assertion was wrong, and it failed before any Rust was compiled, so the musl legs never got as far as exercising the fix they were added for (stage run 33443904901).

Two changes:

  • Name the prefix explicitly: /usr/lib/llvm22/bin/llvm-config. build_linux_musl.sh already did this correctly via $LLVM_SYS_221_PREFIX/bin/llvm-config; only the Dockerfile used the bare name.
  • Put /usr/lib/llvm22/bin on PATH so the rest of the LLVM tooling is reachable by plain name inside the image.

The failure message is also improved to print what llvm-config actually reported, rather than re-running a command that just failed to resolve.

Worth noting the guard did its job in one respect: it caught the mismatch at image-build time rather than letting the build proceed and fail at the final link, which is the failure this whole container exists to avoid.

The musl image's LLVM version check invoked a bare `llvm-config`, which
Alpine does not put on PATH -- its LLVM 22 lives under /usr/lib/llvm22 and
only the versioned tools are installed. The check therefore failed during
`docker build` with

  /bin/sh: line 0: llvm-config: not found

before any Rust code was compiled, so the musl legs never got as far as
exercising the fix they were added for (stage run 33443904901).

The packages themselves install correctly; only the assertion was wrong.
Name the prefix explicitly, and put /usr/lib/llvm22/bin on PATH so the
rest of the LLVM tooling is reachable by plain name inside the image.
@proggeramlug
proggeramlug merged commit e539a63 into main Sep 1, 2026
17 of 19 checks passed
@proggeramlug
proggeramlug deleted the fix/musl-llvm-config-path branch September 1, 2026 01:08
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.

1 participant