Created attachment 255134 [details] Patch file Update to 3.8.8. ReleaseNotes: https://lists.gnutls.org/pipermail/gnutls-help/2024-November/004865.html
Thanks! Approved.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=6f4dcd3f3072373ef3b21b5d082ca4e0bd0aa4c1 commit 6f4dcd3f3072373ef3b21b5d082ca4e0bd0aa4c1 Author: Yasuhiro Kimura <yasu@FreeBSD.org> AuthorDate: 2024-11-13 05:34:16 +0000 Commit: Yasuhiro Kimura <yasu@FreeBSD.org> CommitDate: 2024-11-14 00:01:42 +0000 security/gnutls: Update to 3.8.8 ReleaseNotes: https://lists.gnutls.org/pipermail/gnutls-help/2024-November/004865.html PR: 282723 Approved by: tijl (maintainer) security/gnutls/Makefile | 2 +- security/gnutls/distinfo | 8 +-- security/gnutls/files/patch-configure | 126 +++------------------------------- security/gnutls/pkg-plist | 2 +- 4 files changed, 13 insertions(+), 125 deletions(-)
This fails to compile here (standard options). In fact, we've had trouble building gnutls for some time. Any idea what's going on here? libtool: compile: cc -DHAVE_CONFIG_H -I. -I../.. -I./../../gl -I./../../gl -I./../includes -I./../includes -I./../../gl -I./.. -DLIBICONV_PLUG -isystem /usr/local/include -D_THREAD_SAFE -I/usr/local/include -Wtype-limits -Wall -Wbad-function-cast -Wdate-time -Wdisabled-optimization -Wdouble-promotion -Wextra -Winit-self -Winvalid-pch -Wmissing-declarations -Wmissing-include-dirs -Wmissing-prototypes -Wnested-externs -Wnull-dereference -Wold-style-definition -Wpacked -Wpointer-arith -Wshadow -Wstrict-prototypes -Wuninitialized -Wunknown-pragmas -Wvariadic-macros -Wwrite-strings -Wformat=2 -Wno-missing-field-initializers -Wno-unused-parameter -fdiagnostics-show-option -fno-builtin-strcmp -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local/include/p11-kit-1 -O2 -pipe -DLIBICONV_PLUG -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -MT secparams.lo -MD -MP -MF .deps/secparams.Tpo -c secparams.c -fPIC -DPIC -o .libs/secparams.o groups.c:93:2: error: initializer element is not a compile-time constant group_x25519, ^~~~~~~~~~~~ 1 error generated. gmake[4]: *** [Makefile:2809: groups.lo] Error 1 gmake[4]: *** Waiting for unfinished jobs.... gmake[4]: Leaving directory '/wrkdirs/usr/ports/security/gnutls/work/gnutls-3.8.8/lib/algorithms' gmake[3]: *** [Makefile:3632: all-recursive] Error 1 gmake[3]: Leaving directory '/wrkdirs/usr/ports/security/gnutls/work/gnutls-3.8.8/lib' gmake[2]: *** [Makefile:3203: all] Error 2 gmake[2]: Leaving directory '/wrkdirs/usr/ports/security/gnutls/work/gnutls-3.8.8/lib' gmake[1]: *** [Makefile:2880: all-recursive] Error 1 gmake[1]: Leaving directory '/wrkdirs/usr/ports/security/gnutls/work/gnutls-3.8.8' gmake: *** [Makefile:2805: all] Error 2 ===> Compilation failed unexpectedly. Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to the maintainer. *** Error code 1
(In reply to Eirik Oeverby from comment #3) What is your OS version and architecture?
Created attachment 255813 [details] build error fix for clang < v17 (In reply to Yasuhiro Kimura from comment #4) > What is your OS version and architecture? I have encountered the same error on amd64. Looking at the code in question I have to admit that I don't know how the code is supposed to work. I solved the issue with the attached patch.
(In reply to gnikl from comment #5) I tried building latest security/gnutls with 13.3-RELEASE, 13.4-RELEASE, 14.1-RELEASE, 14.2-RELEASE and 15.0-CURRENT amd64, and it succeeds with all of them. With which FreeBSD version do you fail to built?
(In reply to Yasuhiro Kimura from comment #6) > I tried building latest security/gnutls with 13.3-RELEASE, 13.4-RELEASE, 14.1-RELEASE, 14.2-RELEASE and 15.0-CURRENT amd64, and it succeeds with all of them. It was not my intention to cause so much effort :-( Sorry for that. My comment was meant to offer help. > With which FreeBSD version do you fail to built? My system compiler is clang8. I experimented with various compiler versions (llvm13, llvm15, llvm16, llvm17, llvm18, llvm19, gcc8, gcc11). Builds with clang <17 fail, builds with clang >=17 succeed. Builds with the named GCC versions are successful as well. I am surprised that GCC8 (from 2018!) works and only clang17 from 2023 can build successful.
(In reply to Yasuhiro Kimura from comment #6) Currently building on 14.0-R, I'm aware that's a bit old. Should probably upgrade that jail but I don't want to do that without syncing with my colleagues. Wouldn't expect that to be an issue, though?
(In reply to gnikl from comment #7) Then build failure is probably the issue of GnuTLS itself rather than FreeBSD ports. So it should be reported to upstream.
(In reply to Eirik Oeverby from comment #8) Support of 14.0-RELEASE is removed from ports tree before security/gnutls is updated to 3.8.8. How do you build 3.8.8 of security/gnults with 14.0-RELEASE?
(In reply to Eirik Oeverby from comment #8) You need Clang 17+ or you can put the patch from comment 5 in the files/ directory.
(In reply to Yasuhiro Kimura from comment #10) > Support of 14.0-RELEASE is removed from ports tree before security/gnutls is updated to 3.8.8. > How do you build 3.8.8 of security/gnults with 14.0-RELEASE? I suppose I state the obvious: - Mk/bsd.port.mk: the check for the supported system has to be adapted - Mk/bsd.*.mk: restore removed quirks if necessary - ports: likewise - deal with issues like this one by patching or use a compiler from ports or ...
(In reply to Yasuhiro Kimura from comment #9) > Then build failure is probably the issue of GnuTLS itself Yes, it is purely a compiler issue not visible on supported FreeBSD versions since apparently all these do have llvm >=17 as system compiler. > So it should be reported to upstream. Probably, but then I prefer to simply chicken out ;-(
(In reply to Gunther Nikl from comment #12) I got it. Anyway it is unlikely that the build error is fixed by FreeBSD ports side because it doesn't happen with supported FreeBSD versions. So apply the patch of attachment 255813 [details] by yourself as Tijl suggests you in comment #11.