Bindgen/libclang error - how to fix?

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

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

I did it before:

# apt install llvm-dev libclang-dev clang


xenomai-sys/xenomai/include$ bindgen alchemy/queue.h -o ../ -- -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:', /home/debian/.cargo/registry/src/
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?


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.