[Buildroot] [git commit branch/2023.02.x] package/azure-iot-sdk: fix static build

Peter Korsgaard peter at korsgaard.com
Wed Nov 8 16:26:00 UTC 2023


commit: https://git.buildroot.net/buildroot/commit/?id=7742d220c23730bfbe950d34d8ad78ecc9a04702
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/2023.02.x

Disable provisioning client when building statically to avoid the
following build failure raised since bump to version LTS_01_2022_Ref01
in commit 06bb3640c13191f7515f2140c2207f5b7a2cb7ab and
https://github.com/Azure/azure-iot-sdk-c/commit/1de399fd4875d16eb78e8193778238b9762ed44f
which enabled provisioning client by default:

/home/buildroot/autobuild/instance-3/output-1/build/azure-iot-sdk-c-LTS_01_2023_Ref02/provisioning_client/deps/utpm/src/tpm_comm_linux.c:13:10: fatal error: dlfcn.h: No such file or directory
   13 | #include <dlfcn.h>
      |          ^~~~~~~~~

Fixes:
 - http://autobuild.buildroot.org/results/894188649f66d9917e1ed94989ebe307102ab28c
 - http://autobuild.buildroot.org/results/735b96c842796f309c33a0545eeb2e8f8d1f75ca

Signed-off-by: Fabrice Fontaine <fontaine.fabrice at gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
(cherry picked from commit ce0d4efa7660ba7155de27c8928b7711d3600890)
Signed-off-by: Peter Korsgaard <peter at korsgaard.com>
---
 package/azure-iot-sdk-c/azure-iot-sdk-c.mk | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/package/azure-iot-sdk-c/azure-iot-sdk-c.mk b/package/azure-iot-sdk-c/azure-iot-sdk-c.mk
index 42fdd56b48..fef8dcccd0 100644
--- a/package/azure-iot-sdk-c/azure-iot-sdk-c.mk
+++ b/package/azure-iot-sdk-c/azure-iot-sdk-c.mk
@@ -14,4 +14,10 @@ AZURE_IOT_SDK_C_INSTALL_STAGING = YES
 AZURE_IOT_SDK_C_DEPENDENCIES = libxml2 openssl libcurl util-linux
 AZURE_IOT_SDK_C_CONF_OPTS = -Dskip_samples=ON
 
+ifeq ($(BR2_STATIC_LIBS),y)
+AZURE_IOT_SDK_C_CONF_OPTS += -Duse_prov_client=OFF
+else
+AZURE_IOT_SDK_C_CONF_OPTS += -Duse_prov_client=ON
+endif
+
 $(eval $(cmake-package))



More information about the buildroot mailing list