Skip to content

Fix builder: install llvm-dev and libclang-dev for clang-sys/bindgen - #17

Closed
alexk-aleo wants to merge 1 commit into
mainfrom
claude/awesome-mendel-1bvfb7
Closed

Fix builder: install llvm-dev and libclang-dev for clang-sys/bindgen#17
alexk-aleo wants to merge 1 commit into
mainfrom
claude/awesome-mendel-1bvfb7

Conversation

@alexk-aleo

Copy link
Copy Markdown
Member

Problem

The Build and Push SnarkOS workflow fails during the Docker build step (telemetry / history-telemetry feature sets) with:

error: failed to run custom build command for `clang-sys v1.8.1`
cargo:warning=could not execute `llvm-config` ... "couldn't execute `llvm-config --prefix`
  (path=llvm-config) (error: No such file or directory (os error 2))"
thread 'main' panicked at clang-sys-1.8.1/build/dynamic.rs:225:45
ERROR: process "/bin/sh -c git checkout ... && cargo build --release --features history,telemetry"
  did not complete successfully: exit code: 101

Root cause

The telemetry and history feature sets pull in clang-sys (via bindgen), which needs libclang and llvm-config at build time. The builder stage installed clang lld binutils but not the LLVM dev packages that provide libclang.so and llvm-config, so clang-sys's build script panicked.

Fix

Add llvm-dev (provides llvm-config) and libclang-dev (provides libclang.so) to the builder-stage apt install in all Dockerfiles for consistency:

  • Dockerfile
  • service/snarkos-telemetry/Dockerfile
  • service/snarkos-history-telemetry/Dockerfile
  • service/snarkos-no-features/Dockerfile

These packages are only installed in the discarded builder stage, so the runtime image is unaffected.

https://claude.ai/code/session_011UyaFFB58ZnFBdhVNWf23Z


Generated by Claude Code

The telemetry and history feature builds pull in clang-sys via bindgen,
which requires libclang and llvm-config at build time. The builder stage
installed clang/lld/binutils but not the LLVM dev packages, causing:

  error: failed to run custom build command for `clang-sys v1.8.1`
  couldn't execute `llvm-config --prefix` ... No such file or directory

Add llvm-dev (provides llvm-config) and libclang-dev (provides libclang.so)
to all builder stages.

https://claude.ai/code/session_011UyaFFB58ZnFBdhVNWf23Z
@alexk-aleo
alexk-aleo marked this pull request as ready for review June 15, 2026 15:29
@alexk-aleo
alexk-aleo deleted the claude/awesome-mendel-1bvfb7 branch June 16, 2026 13:27
@sergii-aleo

Copy link
Copy Markdown
Contributor

Redundant PR (#18)

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.

3 participants