ftp/curl depends on WolfSSL as of recently. Attempting to build ftp/curl on armv7 FreeBSD 13 causes the following error: In file included from md5.c:76: In file included from /usr/local/include/wolfssl/openssl/md5.h:32: In file included from /usr/local/include/wolfssl/wolfcrypt/hash.h:29: /usr/local/include/wolfssl/wolfcrypt/types.h:1636:6: error: "bad math long / long long settings" 1636 | #error "bad math long / long long settings" | ^ /usr/local/include/wolfssl/wolfcrypt/types.h:1638:1: error: use of empty enum 1638 | }; | ^ Please check and fix security/wolfssl. FreeBSD 14 seems not to be affected.
It broken on all 32-bit platforms Reported almost two weeks ago, https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=293734#c52 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=293734#c73
(In reply to Robert Clausecker from comment #0) I was going through the WolfSSL issues in github and found the report and the suggested patch to try - https://github.com/wolfSSL/wolfssl/issues/9936 - https://github.com/wolfSSL/wolfssl/pull/10097/changes I can commit the patches into the ports tree, would you be able to test it out once I patch?
(In reply to Santhosh Raju from comment #2) Sure thing! I can even test the patch before you land it, just post it here.
(In reply to Robert Clausecker from comment #3) Looks like applying the patch did not help with the FreeBSD 14 (i386) build. I shall post the patch from github shortly.
Created attachment 269500 [details] PR 10097 patch This is the patch from https://github.com/wolfSSL/wolfssl/pull/10097
Created attachment 269503 [details] options.h.in.patch This patch adds the HAVE_LIMITS_H directly in options.h.in. The github patch does not work, since we do not invoke autoreconf to regenerate the configuration files, we just call configure directly. So we patch the generated options.h.in file to contain the fix.
(In reply to Robert Clausecker from comment #3) I have directly patched the options.h.in for the fix, can you help test this one out? This patch seems to work in FreeBSD 14 (i386). I was able to build ftp/curl without issues. Thank you!
(In reply to Santhosh Raju from comment #6) Please use the patch from github and add USES=autoreconf to regenerate the build scripts as per policy (Porter's Handbook ยง 4.4.2).
(In reply to Robert Clausecker from comment #8) I guess we remove USES=autoreconf when we remove the patch (after upstream fix / release), would that be correct?
Created attachment 269504 [details] wolfssl.patch I have applied the upstream github patch and also added autoreconf into the Makefile. Can you test this out and let me know if it works for you?
(In reply to Santhosh Raju from comment #10) Your patch is defective. Did you edit it by chance? I recommend you use "git format-patch" and upload the output of that as is, without any changes (do not copy-paste through a text editor and do not remove any trailing newlines or blanks).
Perhaps instead of doing the whack a mole approach, if you can get curl with default settings to build on 135i386 you probably also have fixed other 32-bit platforms but I think that's a reasonable start and easy to test yourself.
Created attachment 269535 [details] wolfssl.patch That was my bad, I was in a hurry and just copy pasted the patch without thinking twice. This one should work. Let me know if it works for you.
(In reply to Daniel Engberg from comment #12) I was able to build it correctly in the ref i386 machines, but unfortunately I cannot seem to get autoreconf to run correctly in these machines (since I am building it as non-root), so I could not test it out there. The above patch was tested in my normal build machine which is (amd64).
(In reply to Santhosh Raju from comment #14) That patch applies, now testing. Please remember to bump PORTREVISION. That said, patches produced by "git format-patch" are easier to process than those generated by "git diff" as they have all the meta data to become a commit automatically. Please try to use "git format-patch" if possible. I don't want to go and make up commit meta data every time someone sends me a patch.
(In reply to Santhosh Raju from comment #14) Fixes the build for me on i386 and armv7 FreeBSD 13. Please commit with PORTREVISION bump and MFH to 2026Q2.
(In reply to Robert Clausecker from comment #15) Alright, did not know that will use "git format-patch" that in the future. Apologies for the inconvenience.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=8318a3cd1c5262d51c70240d97798cce3c1a3bd6 commit 8318a3cd1c5262d51c70240d97798cce3c1a3bd6 Author: Santhosh Raju <fox@FreeBSD.org> AuthorDate: 2026-04-09 10:20:04 +0000 Commit: Santhosh Raju <fox@FreeBSD.org> CommitDate: 2026-04-09 10:20:04 +0000 security/wolfssl: Fix 32-bit builds. Add upstream patch for the fix, until changes are merged and a new release is made. PR: 294287 Reported by: Robert Clausecker <fuz@FreeBSD.org> Reviewed by: Robert Clausecker <fuz@FreeBSD.org> Tested by: Robert Clausecker <fuz@FreeBSD.org> security/wolfssl/Makefile | 3 ++- security/wolfssl/files/patch-cmake_config.in (new) | 15 +++++++++++++++ security/wolfssl/files/patch-cmake_options.h.in (new) | 15 +++++++++++++++ security/wolfssl/files/patch-configure.ac (new) | 16 ++++++++++++++++ 4 files changed, 48 insertions(+), 1 deletion(-)
A commit in branch 2026Q2 references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=b313943e623465360904471f07c88d3b22d930d7 commit b313943e623465360904471f07c88d3b22d930d7 Author: Santhosh Raju <fox@FreeBSD.org> AuthorDate: 2026-04-09 10:20:04 +0000 Commit: Santhosh Raju <fox@FreeBSD.org> CommitDate: 2026-04-09 10:35:28 +0000 security/wolfssl: Fix 32-bit builds. Add upstream patch for the fix, until changes are merged and a new release is made. PR: 294287 Reported by: Robert Clausecker <fuz@FreeBSD.org> Reviewed by: Robert Clausecker <fuz@FreeBSD.org> Tested by: Robert Clausecker <fuz@FreeBSD.org> (cherry picked from commit 8318a3cd1c5262d51c70240d97798cce3c1a3bd6) security/wolfssl/Makefile | 3 ++- security/wolfssl/files/patch-cmake_config.in (new) | 15 +++++++++++++++ security/wolfssl/files/patch-cmake_options.h.in (new) | 15 +++++++++++++++ security/wolfssl/files/patch-configure.ac (new) | 16 ++++++++++++++++ 4 files changed, 48 insertions(+), 1 deletion(-)
I have committed the changes and also did a MFH 2026Q2 Thank you both @fuz and @dizzy in helping with the bug report. Shall I mark this as "Closed"?
(In reply to Santhosh Raju from comment #20) Should be fine now, thank you for following up so quickly!