Skip to contentSkip to conversation

package/qt5/qt5opcua: fix build with mbedtls

PATCH New Yegor Yefremov via buildroot 1 participant 1 message Oct 5

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/qt5/qt5opcua: fix build with mbedtls

From: Yegor Yefremov <[email protected]>

qt5opcua builds the copy of open62541 1.0.0 bundled with qtopcua, which only supports the mbedtls 2.x API. Since commit 3481a9643f ("package/mbedtls: bump to version 3.6.3.1"), the build fails when mbedtls is enabled:

3rdparty/open62541/open62541.c:49457:27: error: 'mbedtls_x509_crt' has no member named 'key_usage'; did you mean 'ext_key_usage'?

Disable the mbedtls feature of qtopcua, so that the bundled open62541 is built without encryption support, as it already is when mbedtls is not enabled. Pass the option unconditionally, as qtopcua detects mbedtls automatically when it is present in staging.

Using the open62541 package instead (-system-open62541) is not
possible: qtopcua 5.15 includes the amalgamated open62541.h header and uses the open62541 1.0 API, while the open62541 package provides version 1.3.15 with separate headers.

Fixes:
- https://autobuild.buildroot.org/results/1f06b1efdde65fcd99ff79a63ed01b749788dec8/
- https://autobuild.buildroot.org/results/30852221a9d89d4720c4d6aa003f0eac4b8289aa/
- https://autobuild.buildroot.org/results/d2270d4f3cd54d036a20cfd0df556eac45e34a0d/

Assisted-by Claude:claude-opus-5
---
 package/qt5/qt5opcua/qt5opcua.mk | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
package/qt5/qt5opcua/qt5opcua.mk +3 -3
index ef51abddf8..7195f267fa 100644
@@ -12,8 +12,8 @@ QT5OPCUA_LICENSE = GPL-2.0+ or LGPL-3.0, GPL-3.0 with exception(tools), GFDL-1.3
 QT5OPCUA_LICENSE_FILES = LICENSE.GPLv2 LICENSE.GPL3 LICENSE.GPL3-EXCEPT LICENSE.LGPLv3 LICENSE.FDL LICENSE-CC0
 QT5OPCUA_SYNC_QT_HEADERS = YES
 
-ifeq ($(BR2_PACKAGE_MBEDTLS),y)
-QT5OPCUA_DEPENDENCIES += mbedtls
-endif
+# The bundled open62541 1.0.0 only supports mbedtls 2.x, so never let
+# it detect mbedtls
+QT5OPCUA_CONF_OPTS = -- -no-feature-mbedtls
 
 $(eval $(qmake-package))
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot