Unable to build on Ubuntu 24.04 #495
|
I'm attempting to build Meetily on Ubuntu 24.04: ...and I'm having trouble with it. The process I have followed is as listed in the docs here (this bare machine didn't have npm or rust installed on it, so I added those): It builds a bunch of stuff successfully, and then fails with: It looks like it isn't finding the system's default header files under I did some monkeying around with copying the relevant header files into places that the build would find them, and I finally ran aground on this error: ...and a bunch of subsequent errors that appear to be a result of the first one. Online research suggests that the Can anyone tell me what stupid mistake I'm making that's perfectly obvious to everyone else? |
Replies: 1 comment 1 reply
|
The first error is the real one. The second — Why it happens
1. Install Clang This brings the resource headers along with it. Note that 2. Undo your manual copies properly They live inside the unpacked crate under If Point bindgen straight at Clang's resource directory: Btw, this is bindgen's requirements: https://rust-lang.github.io/rust-bindgen/requirements.html |
The first error is the real one. The second —
unknown type name 'namespace'fromtr1/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-2generates its bindings with bindgen, which parses headers through libclang, not your$CC. libclang needs Clang's own resource headers (stdbool.h,stddef.h, …), andbuild-essentialonly installs GCC's — so libclang never finds them.1. Install Clang
This brings the resource headers along with it. Note that
libclang-devon its own is often not enough — those headers come with theclangpackage:2. Undo your m…