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

paho-mqtt v0.12.1 not compatible with >= clang-16 (due to paho-mqtt-sys v0.8.0 dependency) #204

Closed
dwrobel opened this issue May 6, 2023 · 2 comments
Labels
fix added A fix was added to an unreleased branch
Milestone

Comments

@dwrobel
Copy link

dwrobel commented May 6, 2023

Compiling maho-mqtt-sys on Fedora 38 with clang 16.0.2 fails as follows:

 debug:Using bindgen for Paho C
  debug:clang version: clang version 16.0.2 (Fedora 16.0.2-1.fc38)
  debug:bindgen include path: -I/home/dw/projects/modbus/sun2000-homie/target/release/build/paho-mqtt-sys-69b2a6d9e5bbfd11/out/include

  --- stderr
  fatal: not a git repository (or any parent up to mount point /)
  Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
  gmake[1]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
  thread 'main' panicked at '"__mbstate_t_union_(unnamed_at_/usr/include/bits/types/__mbstate_t_h_16_3)" is not a valid Ident', /home/dw/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-1.0.56/src/fallback.rs:811:9

The problem is in bindgen v0.52.0 and was fixed by rust-lang/rust-bindgen#2319 as a result the minimum version of bindgen compatible with clang-16 is v0.62.0.

Once I bump paho-mqtt-sys to 0.8.1 in

paho-mqtt-sys = { version = "0.8.0", path = "paho-mqtt-sys", default-features=false }
then the compilation succeeded as it changes the dependency on bindgen from:

$ cargo tree -i bindgen
bindgen v0.52.0
[build-dependencies]
└── paho-mqtt-sys v0.8.0
    └── paho-mqtt v0.12.1

to:

$ cargo tree -i bindgen
bindgen v0.64.0
[build-dependencies]
└── paho-mqtt-sys v0.8.1
    └── paho-mqtt v0.12.1

Please consider updating this dependency and release updated version of paho.mqtt crate.

@fpagliughi fpagliughi added this to the v0.12.3 milestone Sep 12, 2023
@fpagliughi
Copy link
Contributor

Thanks for reporting this! I was away for most of the summer, but am starting back on some open source projects now, and will get this in with the next set of bug fixes.

@vlnzrv
Copy link

vlnzrv commented Sep 28, 2023

This issue saved my day, thank you @dwrobel

@fpagliughi fpagliughi added the fix added A fix was added to an unreleased branch label Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix added A fix was added to an unreleased branch
Projects
None yet
Development

No branches or pull requests

3 participants