aaif-goose / aaif-goose/goose

Devcontainer build fails: libclang and cmake missing for llama-cpp-sys-2

Open Beginner friendly
#11,992 0 comments 0 reactions 1 assignee Claimed by @jbg View on GitHub
Dominant language
Rust
Stars
54.2k
Forks
6.2k
Avg merge
3d 4h
Merged PRs (30d)
240

Description

**Describe the bug**

`.devcontainer` does not install `libclang-dev` or `cmake`. The `local-inference` feature builds `llama-cpp-sys-2`, whose build script runs bindgen and cmake, so `cargo build` in a fresh container fails:

```
thread 'main' panicked at bindgen-0.72.1/lib.rs:616:27:
Unable to find libclang: "couldn't find any valid shared libraries matching:
['libclang.so', 'libclang-*.so', 'libclang.so.*', 'libclang-*.so.*'], set the
`LIBCLANG_PATH` environment variable to a path where one of these files can be found"
```

The image ships `libclang-cpp19` (the C++ interface) but not `libclang-19-dev`, which provides the `libclang.so` that bindgen loads. rust-analyzer runs the same build script and crashes in a loop on it:

```
The Rust Analyzer Language Server server crashed 5 times in the last 3 minutes.
```

This also makes the `postCreateCommand: cargo build` fail on first container create.

---

**To Reproduce**
1. Open the repo in the devcontainer (`.devcontainer/Dockerfile`).
2. Run `cargo build`, or just wait for rust-analyzer to start.
3. See the bindgen panic above.

---

**Expected behavior**
A fresh devcontainer builds the workspace without extra manual setup.

---

**Please provide the following information**
- **OS & Arch:** Debian 13 (trixie) aarch64, in `.devcontainer`
- **Interface:** N/A (build)
- **Version:** main @ 9d166ecee
- **Extensions enabled:** N/A
- **Provider & Model:** N/A

---

**Additional context**
Adding `cmake` and `libclang-dev` to the existing `apt-get install` in `.devcontainer/Dockerfile` fixes both the build and the rust-analyzer crash. Verified in a running container. Happy to open the PR once this is Ready.

Contributor guide

Open the contributing guide

Research direction

The issue is in the .devcontainer/Dockerfile where the apt-get install list is missing libclang-dev and cmake. Locate the Dockerfile, add those packages to the existing install command, and verify by rebuilding the container and running cargo build. The fix is confirmed by the reporter, so the PR should be straightforward.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, devtools, docker
Domain
developer-experience, devtools
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
90/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.