Bindgen/libclang error - how to fix?

Hello.
I'm trying bind C library - Xenomai 3 RT Framework to Rust.
I'm using bindgen.

bindgen ./xenomai/include/alchemy/queue.h -o ./binds.rs -- -I./xenomai/include

I did it before:

# apt install llvm-dev libclang-dev clang

Error:

xenomai-sys/xenomai/include$ bindgen alchemy/queue.h -o ../binds.rs -- -I. -I../lib  -I/var/lib/cloud9/xenomai-sys/xenomai/lib/cobalt/arch/arm/include -I./cobalt
thread 'main' panicked at '`libclang` function not loaded: `clang_Cursor_isFunctionInlined`. This crate requires that `libclang` 3.9 or later be installed on your system. For more information on how to accomplish this, see here: https://rust-lang.github.io/rust-bindgen/requirements.html#installing-clang-39', /home/debian/.cargo/registry/src/github.com-1ecc6299db9ec823/clang-sys-1.0.3/src/lib.rs:1672:1
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
fatal runtime error: failed to initiate panic, error 9

How to fix?

What version of libclang do you have installed?

@mbrubeck

libclang-6.0-dev/bionic,now 1:6.0-1ubuntu2 amd64 [zainstalowany,automatycznie]
libclang-common-6.0-dev/bionic,now 1:6.0-1ubuntu2 amd64 [zainstalowany,automatycznie]
libclang1-6.0/bionic,now 1:6.0-1ubuntu2 amd64 [zainstalowany,automatycznie]

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.