Bug 263544 - sysutils/pesign: Fails to build with GCC 11: error: 'free' called on a pointer to an unallocated object '"NSS Certificate DB"' [-Werror=free-nonheap-object]
Summary: sysutils/pesign: Fails to build with GCC 11: error: 'free' called on a pointe...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-ports-bugs (Nobody)
URL: http://package18.nyi.freebsd.org/data...
Keywords:
Depends on:
Blocks:
 
Reported: 2022-04-24 22:27 UTC by Lorenzo Salvadore
Modified: 2022-07-01 10:02 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lorenzo Salvadore freebsd_committer freebsd_triage 2022-04-24 22:27:39 UTC
Updating GCC_DEFAULT from GCC 10 to GCC 11 is blocked by the fact that building this port with GCC 11 gives the following error (full log in URL):

gcc11 -I/wrkdirs/usr/ports/sysutils/pesign/work/pesign-0.110/include -O2 -pipe  -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc11 -isystem /usr/local/include -fno-strict-aliasing  -g -O0 -g -O0  -Wall -fshort-wchar -fno-strict-aliasing -fno-merge-constants --std=gnu99 -D_GNU_SOURCE -Wno-unused-result -Wno-unused-function -I../include/  -I/usr/local/include -I/usr/local/include/nss -I/usr/local/include/nspr  -Werror -fPIC -isystem /usr/local/include -DCONFIG_amd64 -DCONFIG_amd64 -c authvar_context.c -o authvar_context.o
authvar.c: In function 'main':
authvar.c:344:17: error: 'free' called on a pointer to an unallocated object '"NSS Certificate DB"' [-Werror=free-nonheap-object]
  344 |                 free(tokenname);
      |                 ^~~~~~~~~~~~~~~
authvar.c:217:15: note: assigned here
  217 |         char *tokenname = "NSS Certificate DB";
      |               ^~~~~~~~~
cc1: all warnings being treated as errors

Also, it should be checked if USE_GCC is still needed and that the default clang compiler can't be used instead.
Comment 1 commit-hook freebsd_committer freebsd_triage 2022-04-27 20:41:24 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=9525143f76e4aea344be0e64e39a67d6130c9365

commit 9525143f76e4aea344be0e64e39a67d6130c9365
Author:     Lorenzo Salvadore <salvadore@FreeBSD.org>
AuthorDate: 2022-04-27 18:57:09 +0000
Commit:     Lorenzo Salvadore <salvadore@FreeBSD.org>
CommitDate: 2022-04-27 20:40:37 +0000

    sysutils/pesign: Deprecate and use GCC 10

    - Unmaintaned since 2016.
    - Very much out of date.
    - Does not build with GCC 11 [1]: set USE_GCC=10 so that the port does
      not block GCC default version update to GCC 11 while waiting for
      expiration.

    PR:             263544 [1]
    Reported by:    exp-run (antoine@) [1]
    Approved by:    gerald (mentor)
    Differential Revision:  https://reviews.freebsd.org/D35086

 sysutils/pesign/Makefile | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
Comment 2 Lorenzo Salvadore freebsd_committer freebsd_triage 2022-04-27 20:46:15 UTC
(In reply to commit-hook from comment #1)

With this commit version 10 of GCC is now enforced. So this bug does not block the GCC default version update anymore and I remove the corresponding PR from the Blocks field.
Comment 3 Rene Ladan freebsd_committer freebsd_triage 2022-07-01 10:02:39 UTC
Expired port removed.