curl: fix mbedtls detection
PATCH 1/1 curl: fix mbedtls detection
The mbedtls detection logic in curl is broken and resulted in build paths leaking into curl-config and libcurl.pc. Fix the detection by looking for a symbol that wasn't removed in mbedtls 3.0 five years ago, and remove the explicit sysroot reference as it is no longer needed.
--- meta/recipes-support/curl/curl/mbedtls.patch | 11 +++++++++++ meta/recipes-support/curl/curl_8.19.0.bb | 3 ++- 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-support/curl/curl/mbedtls.patch
meta/recipes-support/curl/curl/mbedtls.patch new file +11 -0
@@ -0,0 +1,11 @@ +Fix the mbedtls detection, mbedtls_havege_init was removed +from mbedtls in the 3.0.0 release. + +Upstream-Status: Submitted [https://github.com/curl/curl/issues/21727] +Signed-off-by: Ross Burton <[email protected]> + +--- a/m4/curl-mbedtls.m4 2026-05-22 13:09:00.344591549 +0100 ++++ b/m4/curl-mbedtls.m4 2026-05-22 13:40:17.869454414 +0100 +@@ -45 +45 @@ +- AC_CHECK_LIB(mbedtls, mbedtls_havege_init, ++ AC_CHECK_LIB(mbedtls, mbedtls_ssl_init,
meta/recipes-support/curl/curl_8.19.0.bb +2 -1
@@ -14,6 +14,7 @@ SRC_URI = " \ file://run-ptest \ file://disable-tests \ file://no-test-timeout.patch \ + file://mbedtls.patch \ " SRC_URI:append:class-nativesdk = " \
@@ -56,7 +57,7 @@ PACKAGECONFIG[ldaps] = "--enable-ldaps,--disable-ldaps,openldap" PACKAGECONFIG[libgsasl] = "--with-libgsasl,--without-libgsasl,libgsasl" PACKAGECONFIG[libidn] = "--with-libidn2,--without-libidn2,libidn2" PACKAGECONFIG[libssh2] = "--with-libssh2,--without-libssh2,libssh2" -PACKAGECONFIG[mbedtls] = "--with-mbedtls=${STAGING_DIR_TARGET},--without-mbedtls,mbedtls" +PACKAGECONFIG[mbedtls] = "--with-mbedtls,--without-mbedtls,mbedtls" PACKAGECONFIG[mqtt] = "--enable-mqtt,--disable-mqtt," PACKAGECONFIG[negotiate-auth] = "--enable-negotiate-auth,--disable-negotiate-auth" PACKAGECONFIG[nghttp2] = "--with-nghttp2,--without-nghttp2,nghttp2"
Signature · 1 line
2.43.0
Hi Ross,
Quoted 18 lines · Ross Burton via lists.openembedded.org
The mbedtls detection logic in curl is broken and resulted in build paths leaking into curl-config and libcurl.pc. Fix the detection by looking for a symbol that wasn't removed in mbedtls 3.0 five years ago, and remove the explicit sysroot reference as it is no longer needed.
Signed-off-by Ross Burton <[email protected]>--- meta/recipes-support/curl/curl/mbedtls.patch | 11 +++++++++++ meta/recipes-support/curl/curl_8.19.0.bb | 3 ++- 2 files changed, 13 insertions(+), 1 deletion(-)create mode 100644
meta/recipes-support/curl/curl/mbedtls.patchmeta/recipes-support/curl/curl/mbedtls.patch new file +0
-0
meta/recipes-support/curl/curl/mbedtls.patch line 4
Quoted 4 lines
meta/recipes-support/curl/curl/mbedtls.patch new file +4
-0@@ -0,0 +1,11 @@ +Fix the mbedtls detection, mbedtls_havege_init was removed +from mbedtls in the 3.0.0 release. + +Upstream-Status: Submitted [https://github.com/curl/curl/issues/21727]
This is an "issue", not a PR, so it may be misleading to say the patch was submitted? Maybe Pending (still with the link)?
Cheers,
Quentin