Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bindgen problem [help wanted] #1942

Closed
hanusek opened this issue Dec 13, 2020 · 2 comments
Closed

Bindgen problem [help wanted] #1942

hanusek opened this issue Dec 13, 2020 · 2 comments

Comments

@hanusek
Copy link

hanusek commented Dec 13, 2020

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

I did it before:

apt install llvm-dev libclang-dev clang

Input C/C++ Header

https://gitlab.denx.de/Xenomai/xenomai/-/blob/stable/v3.0.x/include/alchemy/queue.h

Bindgen Invocation

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

Actual Results

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
@hanusek hanusek changed the title Bindgen problem Bindgen problem [help wanted] Dec 13, 2020
@emilio
Copy link
Contributor

emilio commented Dec 20, 2020

Which libclang version are you using? This function is supported in clang 3.9+. We dropped support for those a bit ago see #1830 etc.

@emilio
Copy link
Contributor

emilio commented Dec 20, 2020

If the issue is a too old libclang I think this is wontfix unfortunately.

@hanusek hanusek closed this as completed Dec 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants