Bug 282723 - security/gnutls: Update to 3.8.8
Summary: security/gnutls: Update to 3.8.8
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Yasuhiro Kimura
URL: https://lists.gnutls.org/pipermail/gn...
Keywords:
Depends on:
Blocks:
 
Reported: 2024-11-13 05:38 UTC by Yasuhiro Kimura
Modified: 2024-12-14 10:35 UTC (History)
3 users (show)

See Also:
tijl: maintainer-feedback+


Attachments
Patch file (6.76 KB, patch)
2024-11-13 05:38 UTC, Yasuhiro Kimura
no flags Details | Diff
build error fix for clang < v17 (478 bytes, patch)
2024-12-12 18:13 UTC, Gunther Nikl
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yasuhiro Kimura freebsd_committer freebsd_triage 2024-11-13 05:38:03 UTC
Created attachment 255134 [details]
Patch file

Update to 3.8.8.

ReleaseNotes:   https://lists.gnutls.org/pipermail/gnutls-help/2024-November/004865.html
Comment 1 Tijl Coosemans freebsd_committer freebsd_triage 2024-11-13 12:47:53 UTC
Thanks!  Approved.
Comment 2 commit-hook freebsd_committer freebsd_triage 2024-11-14 00:03:13 UTC
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(-)
Comment 3 Eirik Oeverby 2024-12-12 15:42:16 UTC
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
Comment 4 Yasuhiro Kimura freebsd_committer freebsd_triage 2024-12-12 16:22:02 UTC
(In reply to Eirik Oeverby from comment #3)

What is your OS version and architecture?
Comment 5 Gunther Nikl 2024-12-12 18:13:45 UTC
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.
Comment 6 Yasuhiro Kimura freebsd_committer freebsd_triage 2024-12-12 20:23:25 UTC
(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?
Comment 7 Gunther Nikl 2024-12-12 22:05:44 UTC
(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.
Comment 8 Eirik Oeverby 2024-12-12 22:34:55 UTC
(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?
Comment 9 Yasuhiro Kimura freebsd_committer freebsd_triage 2024-12-13 03:39:40 UTC
(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.
Comment 10 Yasuhiro Kimura freebsd_committer freebsd_triage 2024-12-13 03:42:24 UTC
(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?
Comment 11 Tijl Coosemans freebsd_committer freebsd_triage 2024-12-13 09:04:32 UTC
(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.
Comment 12 Gunther Nikl 2024-12-13 15:54:17 UTC
(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 ...
Comment 13 Gunther Nikl 2024-12-13 16:04:42 UTC
(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 ;-(
Comment 14 Yasuhiro Kimura freebsd_committer freebsd_triage 2024-12-14 10:35:37 UTC
(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.