Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/libcurl: fix build with wolfssl
@ 2026-04-06 10:24 Baruch Siach via buildroot
  2026-05-30 15:15 ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 2+ messages in thread
From: Baruch Siach via buildroot @ 2026-04-06 10:24 UTC (permalink / raw)
  To: buildroot

wolfssl requires definition of SIZEOF_LONG_LONG. Commit 3a5e071e4f9
("package/libcurl: security bump to version 8.19.0") removed
SIZEOF_LONG_LONG definitions from libcurl autotools build system,
breaking build with wolfssl.

Add a patch to restore SIZEOF_LONG_LONG.

Fixes:
https://autobuild.buildroot.org/results/54140f8139f40a708afd25cd0264b52c7a9bf332
https://autobuild.buildroot.org/results/07fa4932fe247e8e472f0f134db6ec36421303e4
https://autobuild.buildroot.org/results/c0c64b348b5fbaa77ecc117078cbad8ecb9c4941

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
 ...fssl.m4-fix-build-with-older-wolfSSL.patch | 45 +++++++++++++++++++
 package/libcurl/libcurl.mk                    |  3 ++
 2 files changed, 48 insertions(+)
 create mode 100644 package/libcurl/0001-m4-curl-wolfssl.m4-fix-build-with-older-wolfSSL.patch

diff --git a/package/libcurl/0001-m4-curl-wolfssl.m4-fix-build-with-older-wolfSSL.patch b/package/libcurl/0001-m4-curl-wolfssl.m4-fix-build-with-older-wolfSSL.patch
new file mode 100644
index 000000000000..02867bbe6c9f
--- /dev/null
+++ b/package/libcurl/0001-m4-curl-wolfssl.m4-fix-build-with-older-wolfSSL.patch
@@ -0,0 +1,45 @@
+From ca1c09164b20fad9dd01e670b78d2ecb32a24893 Mon Sep 17 00:00:00 2001
+From: Baruch Siach <baruch@tkos.co.il>
+Date: Mon, 30 Mar 2026 17:52:23 +0300
+Subject: [PATCH] m4/curl-wolfssl.m4: fix build with older wolfSSL
+
+Commit 0159100f4f78 ("lib: use (u)int64_t instead of long long") removed
+definition of SIZEOF_LONG_LONG for wolfSSL. This breaks autotools build
+for wolfSSL version 5.7.2 at least:
+
+In file included from .../arm-buildroot-linux-gnueabi/sysroot/usr/include/wolfssl/wolfcrypt/hash.h:29,
+                 from .../arm-buildroot-linux-gnueabi/sysroot/usr/include/wolfssl/openssl/md5.h:32,
+                 from md5.c:76:
+.../arm-buildroot-linux-gnueabi/sysroot/usr/include/wolfssl/wolfcrypt/types.h:1289:10: error: #error "bad math long / long long settings"
+ 1289 |         #error "bad math long / long long settings"
+      |          ^~~~~
+.../arm-buildroot-linux-gnueabi/sysroot/usr/include/wolfssl/wolfcrypt/types.h:1291:5: error: empty enum is invalid
+ 1291 |     };
+      |     ^
+make[3]: *** [Makefile:2966: libcurl_la-md5.lo] Error 1
+
+Restore SIZEOF_LONG_LONG macro definition to fix the build.
+
+Upstream: https://github.com/curl/curl/pull/21162/
+Signed-off-by: Baruch Siach <baruch@tkos.co.il>
+---
+ m4/curl-wolfssl.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/m4/curl-wolfssl.m4 b/m4/curl-wolfssl.m4
+index 48812e724d7f..19a6deaa3e19 100644
+--- a/m4/curl-wolfssl.m4
++++ b/m4/curl-wolfssl.m4
+@@ -127,6 +127,9 @@ if test "$OPT_WOLFSSL" != "no"; then
+       AC_MSG_NOTICE([detected wolfSSL])
+       check_for_ca_bundle=1
+ 
++      dnl wolfssl/wolfcrypt/types.h needs SIZEOF_LONG_LONG defined!
++      CURL_SIZEOF(long long)
++
+       LIBS="$addlib $LIBS"
+ 
+       dnl is this wolfSSL providing the original QUIC API?
+-- 
+2.53.0
+
diff --git a/package/libcurl/libcurl.mk b/package/libcurl/libcurl.mk
index 3d00a4a33a8e..9ba13ba63f19 100644
--- a/package/libcurl/libcurl.mk
+++ b/package/libcurl/libcurl.mk
@@ -15,6 +15,9 @@ LIBCURL_LICENSE_FILES = COPYING
 LIBCURL_CPE_ID_VENDOR = haxx
 LIBCURL_INSTALL_STAGING = YES
 
+# 0001-m4-curl-wolfssl.m4-fix-build-with-older-wolfSSL.patch
+LIBCURL_AUTORECONF = YES
+
 # Likewise, there is no compiler on the target, so libcurl-option (to
 # generate C code) isn't very useful
 LIBCURL_CONF_OPTS = \
-- 
2.53.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Buildroot] [PATCH] package/libcurl: fix build with wolfssl
  2026-04-06 10:24 [Buildroot] [PATCH] package/libcurl: fix build with wolfssl Baruch Siach via buildroot
@ 2026-05-30 15:15 ` Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni via buildroot @ 2026-05-30 15:15 UTC (permalink / raw)
  To: Baruch Siach; +Cc: buildroot

On Mon, Apr 06, 2026 at 01:24:31PM +0300, Baruch Siach via buildroot wrote:
> wolfssl requires definition of SIZEOF_LONG_LONG. Commit 3a5e071e4f9
> ("package/libcurl: security bump to version 8.19.0") removed
> SIZEOF_LONG_LONG definitions from libcurl autotools build system,
> breaking build with wolfssl.
> 
> Add a patch to restore SIZEOF_LONG_LONG.
> 
> Fixes:
> https://autobuild.buildroot.org/results/54140f8139f40a708afd25cd0264b52c7a9bf332
> https://autobuild.buildroot.org/results/07fa4932fe247e8e472f0f134db6ec36421303e4
> https://autobuild.buildroot.org/results/c0c64b348b5fbaa77ecc117078cbad8ecb9c4941
> 
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>

My understanding is that upstream rejected this fix, and instead
suggested to fix WolfSSL, which was done in Buildroot in commit:

  50feb8738464448c74a7e51e037716fa6a2f38f3 package/wolfssl: fix build with libcurl >= 8.19.0

So I'll mark this patch as Rejected in patchwork.

Thanks!

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-05-30 15:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-06 10:24 [Buildroot] [PATCH] package/libcurl: fix build with wolfssl Baruch Siach via buildroot
2026-05-30 15:15 ` Thomas Petazzoni via buildroot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox