Skip to content

netutils/paho_mqtt: improvements for use as a dependency for other packages - #3749

Merged
acassis merged 3 commits into
apache:masterfrom
raiden00pl:s2opc_paho
Aug 22, 2026
Merged

netutils/paho_mqtt: improvements for use as a dependency for other packages#3749
acassis merged 3 commits into
apache:masterfrom
raiden00pl:s2opc_paho

Conversation

@raiden00pl

Copy link
Copy Markdown
Member

Summary

  • netutils/paho_mqtt: make package preparation reliable
  • netutils/paho_mqtt: separate library worker stack size
  • netutils/paho_mqtt: configure embedded runtime mode

Impact

dependency for S2OPC

Testing

paho works as dependency for S2OPC and with CONFIG_UTILS_MQTT5=y

The bundled patch still contains an MQTTPacket.h hunk for a bool
typedef that no longer exists in Paho 1.3.15. Make and CMake both
hide the resulting rejection, allowing a partially patched source
tree to be compiled. Remove the stale hunk and make patch failures
fatal.

The Make context target also allows VersionInfo.h generation to
race source extraction under parallel builds. Make the generated
header depend on the extraction target so the input template is
present first.

The publisher and subscriber samples live below src/samples but
include public headers from src. Add the Paho source include directory
to the Make flags, matching the CMake targets, so CONFIG_UTILS_MQTT5
builds both utilities.

Finally, define distclean independently of whether the downloaded
tree exists when Make parses the file. Remove package-owned archives
and sources while preserving a developer Git checkout, and ignore
those downloaded paths.

Signed-off-by: raiden00pl <raiden00@railab.me>
Assisted-by: OpenAI Codex:gpt-5
Add CONFIG_LIB_MQTT5_THREAD_STACKSIZE for threads created
internally by Paho and use it in Thread.c.
Keep CONFIG_UTILS_MQTT5_STACKSIZE scoped to the two utility
application tasks.

This permits S2OPC to enable MQTT through LIB_MQTT5 without
also building unrelated command-line utilities.

Signed-off-by: raiden00pl <raiden00@railab.me>
Assisted-by: OpenAI Codex:gpt-5
Expose the upstream HIGH_PERFORMANCE mode through
CONFIG_LIB_MQTT5_HIGH_PERFORMANCE and enable it by default. This keeps
normal embedded builds lightweight while allowing developers to restore
Paho heap and call-stack diagnostics when investigating library issues.

Signed-off-by: raiden00pl <raiden00@railab.me>
Assisted-by: OpenAI Codex:gpt-5

@cederom cederom left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @raiden00pl :-)

@acassis
acassis merged commit a71c329 into apache:master Aug 22, 2026
41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants