Skip to content

failed to produce bindings for RPM library #363

Closed
@sa2ajj

Description

@sa2ajj

I'm looking into creating Rust bindings for the RPM libraries.

First I installed bindgen, but it seems to be somewhat inconsistent with what servo/rust-bindgen offers. So my second attempt was to clone and build bindgen from servo/rust-bindgen:

$ git clone https://github.com/servo/rust-bindgen
$ cd rust-bindgen/bindgen
$ cargo build --release

after that I created a simple wrapper.h:

#include <rpm/rpmlib.h>
#include <rpm/rpmts.h>

and then run bindgen on it:

$ CLANG_PATH=/opt/clang+llvm-3.9.1-x86_64-linux-gnu-debian8/bin/clangLIBCLANG_PATH=/opt/clang+llvm-3.9.1-x86_64-linux-gnu-debian8/lib/ ~/bin/bindgen wrapper.h --output=rpm.rs

as the result I got these errors:

ERROR:libbindgen::ir::context: Valid declaration with no USR: Cursor(__va_list_tag kind: StructDecl, loc: builtin definitions, usr: None), Some(Cursor(va_list kind: TypedefDecl, loc: /opt/clang+llvm-3.9.1-x86_64-linux-gnu-debian8/bin/../lib/clang/3.9.1/include/stdarg.h:30:27, usr: Some("c:@T@va_list")))
ERROR:libbindgen::ir::context: Valid declaration with no USR: Cursor(__builtin_va_list kind: TypedefDecl, loc: builtin definitions, usr: None), Some(Cursor(va_list kind: TypedefDecl, loc: /opt/clang+llvm-3.9.1-x86_64-linux-gnu-debian8/bin/../lib/clang/3.9.1/include/stdarg.h:30:27, usr: Some("c:@T@va_list")))

Do I miss something?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions