Skip to content

paho-mqtt fails due to C23 incompatibility of paho-mqtt-c on new compilers #251

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

Closed
p-kraszewski opened this issue May 13, 2025 · 2 comments

Comments

@p-kraszewski
Copy link

p-kraszewski commented May 13, 2025

Unfortunately, paho-mqtt is indirectly hit by C23 incompatibility of paho-mqtt-c source.

Compilation fails due to a known problem :

paho.mqtt.c/src/MQTTPacket.h:31:22: error: 'bool' cannot be defined via 'typedef'
 31 | typedef unsigned int bool;
    |                      ^~~~

paho.mqtt.c/src/MQTTPacket.h:31:22: note: 'bool' is a keyword with '-std=c23' onwards

Environment:

  • OS Manjaro Linux
  • GCC 15.1.1 20250425
  • Rust stable 1.86.0 (05f9846f8 2025-03-31)
    • paho-mqtt 0.13.3
    • paho-mqtt-sys 0.10.2 (dependency)
@fpagliughi
Copy link
Contributor

Yes.

There is a pull request in this repo to put in a temporary fix for us:
#249

And a discussion of the proper fix in the Paho C lib:
eclipse-paho/paho.mqtt.c#1576 (comment)

@fpagliughi
Copy link
Contributor

fpagliughi commented May 18, 2025

There's a temporary fix in the -sys crate v0.10.3 from #249, and a more proper fix PR'ed to the Paho C repo in #1597 over there.

So, for now, upgrade paho-mqtt-sys to v0.10.3, and you should be good.

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