Skip to content
Discussion options

You must be logged in to vote

The first error is the real one. The second — unknown type name 'namespace' from tr1/cstdint — is just your hand-copied headers being parsed as C, not a separate problem; you'll want to revert those (see step 2 below).

Why it happens

llama-cpp-sys-2 generates its bindings with bindgen, which parses headers through libclang, not your $CC. libclang needs Clang's own resource headers (stdbool.h, stddef.h, …), and build-essential only installs GCC's — so libclang never finds them.

1. Install Clang

This brings the resource headers along with it. Note that libclang-dev on its own is often not enough — those headers come with the clang package:

sudo apt install clang libclang-dev

2. Undo your m…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@CaelJacobsEngineer
Comment options

Answer selected by CaelJacobsEngineer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants