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

build problem #26

Open
my-vegetable-has-exploded opened this issue Sep 17, 2023 · 2 comments
Open

build problem #26

my-vegetable-has-exploded opened this issue Sep 17, 2023 · 2 comments

Comments

@my-vegetable-has-exploded

rdma-sys build fail with new clang version.

  --- stderr
  thread 'main' panicked at '"ib_uverbs_flow_action_esp_encap_union_(anonymous_at_/usr/include/infiniband/ib_user_ioctl_verbs_h_189_2)" is not a valid Ident', /home/wy/.cargo/registry/src/index.crates.io-6f17d22bba15001f/proc-macro2-1.0.60/src/fallback.rs:791:9

It seem that llvm changes cause this problem according to bindgen issue 2312.

If change bindgen to "0.66.1", async-rdma will build fail with ibv_access_flags and ibv_event_type doesn't implement Debug because of derive_debug(false) build.rs#L145

`ibv_event_type` doesn't implement `Debug`
the trait `Debug` is not implemented for `ibv_event_type`
the trait `Debug` is implemented for `Arc<T>`

And if change build.rs#L145 to derive_debug(true), rdma-sys will build fail with following error.

`libc::pthread_mutex_t` doesn't implement `Debug`
the trait `Debug` is not implemented for `libc::pthread_mutex_t`

My solution is to add some no_debug

.derive_debug(true)
.no_debug("ibv_qp")
.no_debug("ibv_context")
.no_debug("ibv_cq_ex")
.no_debug("ibv_srq")
.no_debug("ibv_wq")
.no_debug("ibv_cq")
@GTwhy
Copy link
Collaborator

GTwhy commented Sep 22, 2023

Hi, @my-vegetable-has-exploded
I found that the ibv_event_type and ibv_access_flags build by the 0.59 bindgen have implemented Debug even if the .derive_debug(false).
And the the newer bindgen doesn't impl that, so you made this change?

@my-vegetable-has-exploded
Copy link
Author

And the the newer bindgen doesn't impl that, so you made this change?

yes, I also feel confused about why they still implement Debug in 0.59.😂

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