jonhoo / rust-ibverbs

Bindings for RDMA ibverbs through rdma-core

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mismatch between bindgen output and ffi.rs

utaal opened this issue · comments

Hi Jon,

I'm trying to compile this on one of our IB machines and it looks like there's some mismatch between the bindgen bindings and ffi.rs: rustc output follows. I'd gladly help tracking this down / fixing it but some pointers (if you have any) would be extremely useful (I've never used bindgen).

Thanks!

(Oh and congrats/good luck with the submission.)

   Compiling ibverbs v0.3.0 (file:///home/andreal/Src/rust-ibverbs)
error[E0412]: cannot find type `ibv_send_wr__bindgen_ty_3` in this scope
   --> src/ffi.rs:364:18
    |
364 | impl Default for ibv_send_wr__bindgen_ty_3 {
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^ did you mean `ibv_send_wr__bindgen_ty_1`?

error[E0422]: cannot find struct, variant or union type `ibv_send_wr__bindgen_ty_3` in this scope
   --> src/ffi.rs:366:9
    |
366 |         ibv_send_wr__bindgen_ty_3 {
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^ did you mean `ibv_send_wr__bindgen_ty_1`?

error[E0063]: missing field `xrc_domain` in initializer of `ffi::ibv_qp_init_attr`
   --> src/lib.rs:697:24
    |
697 |         let mut attr = ffi::ibv_qp_init_attr {
    |                        ^^^^^^^^^^^^^^^^^^^^^ missing `xrc_domain`

error[E0560]: struct `ffi::ibv_send_wr` has no field named `qp_type`
    --> src/lib.rs:1106:13
     |
1106 |             qp_type: Default::default(),
     |             ^^^^^^^^ `ffi::ibv_send_wr` does not have this field
     |
     = note: available fields are: `wr_id`, `next`, `sg_list`, `num_sge`, `opcode` ... and 4 others

error[E0560]: struct `ffi::ibv_send_wr__bindgen_ty_2` has no field named `xrc`
   --> src/ffi.rs:358:13
    |
358 |             xrc: Default::default(),
    |             ^^^^ `ffi::ibv_send_wr__bindgen_ty_2` does not have this field
    |
    = note: available fields are: `qp_type`, `xrc_remote_srq_num`, `bindgen_union_field`

error[E0560]: struct `ffi::ibv_qp_attr` has no field named `rate_limit`
   --> src/ffi.rs:402:13
    |
402 |             rate_limit: 0,
    |             ^^^^^^^^^^^ `ffi::ibv_qp_attr` does not have this field
    |
    = note: available fields are: `qp_state`, `cur_qp_state`, `path_mtu`, `path_mig_state`, `qkey` ... and 20 others

error[E0599]: no variant named `IBV_WC_LOCAL_INV` found for type `ffi::ibv_wc_opcode` in the current scope
    --> src/ffi.rs:411:21
     |
411  |             opcode: ibv_wc_opcode::IBV_WC_LOCAL_INV,
     |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ variant not found in `ffi::ibv_wc_opcode`
     |
    ::: /home/andreal/Src/rust-ibverbs/target/debug/build/ibverbs-9097a2a478619ab2/out/bindings.rs:1566:1
     |
1566 | pub enum ibv_wc_opcode {
     | ---------------------- variant `IBV_WC_LOCAL_INV` not found here

error: aborting due to 7 previous errors

error: Could not compile `ibverbs`.

To learn more, run the command again with --verbose.

Huh, interesting. It looks like bindgen has seen some changes. I've published 0.4.0 which compiles for me!

Compiles here as well. Fantastic, thanks!