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

provisioning_client: build libprov_mqtt_transport.so #2505

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

besquivel-pivotal
Copy link

Adding support in provisioning_client/CMakeLists.txt to build an so library for libprov_mqtt_transport.

Checklist

  • [Yes] I have read the [contribution guidelines] (https://github.com/Azure/azure-iot-sdk-c/blob/main/.github/CONTRIBUTING.md).
  • [No] I added or modified the existing tests to cover the change (we do not allow our test coverage to go down).
  • If this is a modification that impacts the behavior of a public API
    • [No] I edited the corresponding document in the devdoc folder and added or modified requirements.
  • I submitted this PR against the correct branch:
    • [Yes] This pull-request is submitted against the main branch.
    • [Yes] I have merged the latest main branch prior to submission and re-merged as needed after I took any feedback.
    • [Yes] I have squashed my changes into one with a clear description of the change.

Reference/Link to the issue solved with this PR (if any)

This addresses #2435.
In addition to adding build support for libprov_mqtt_transport.so, this will allow easier updates in Intel's meta-iot-cloud yocto layer.

Description of the problem

The build as dynamic config switch has no effect on the mqtt_transport library. While the build outputs a static library, there is no dynamic library being built, even if the -Dbuild_as_dynamic:BOOL=ON switch is specified.

Description of the solution

To solve this issue, I just looked at how the other so libraries are built in this SDK and added the build support for that.

Testing

  1. built the sdk using the build_as_dynamic switch and verified that both (.a and .so) libraries were produced.
    /usr/lib/libprov_mqtt_transport.so
    /usr/lib/libprov_mqtt_transport.so.1
    /usr/lib/libprov_mqtt_transport.so.1.11.0
    /usr/lib/libprov_mqtt_transport.a
  2. Verified that the so versioning was present (see build artifact output above)
  3. Linked and used the libprov_mqtt_transport.so with my application.
  4. Verified that my application can connect with the IoT Hub using this .so.

Adding support in provisioning_client/CMakeLists.txt to build an so
library for libprov_mqtt_transport.

Signed-off-by: Benjamin Esquivel <[email protected]>
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

Successfully merging this pull request may close these issues.

1 participant