Bug 281226 - devel/efivar: Fails to build with GCC 14: error: implicit declaration of function 'isprint' [-Wimplicit-function-declaration]
Summary: devel/efivar: Fails to build with GCC 14: error: implicit declaration of func...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Lorenzo Salvadore
URL: https://pkg-status.freebsd.org/gohan0...
Keywords:
Depends on:
Blocks: 281091
  Show dependency treegraph
 
Reported: 2024-09-03 12:48 UTC by Lorenzo Salvadore
Modified: 2024-09-05 10:11 UTC (History)
0 users

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 2024-09-03 12:48:34 UTC
Build fails with GCC 14. This blocks GCC_DEFAULT update to GCC 14.

gcc14 -O2 -pipe  -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc14 -isystem /usr/local/include -fno-strict-aliasing  -Wall -Wsign-compare -std=gnu11 -fshort-wchar -fPIC -D_GNU_SOURCE -I/wrkdirs/usr/ports/devel/efivar/work/efivar-0.15/src/   -isystem /usr/local/include -c -o efivar.o efivar.c
efivar.c: In function 'show_variable':
efivar.c:166:29: error: implicit declaration of function 'isprint' [-Wimplicit-function-declaration]
  166 |                         if (isprint(data[index]))
      |                             ^~~~~~~
efivar.c:31:1: note: include '<ctype.h>' or provide a declaration of 'isprint'
   30 | #include "guid.h"
  +++ |+#include <ctype.h>
   31 | 
gmake[1]: *** [/wrkdirs/usr/ports/devel/efivar/work/efivar-0.15/Make.rules:14: efivar.o] Error 1
gmake[1]: Leaving directory '/wrkdirs/usr/ports/devel/efivar/work/efivar-0.15/src'
gmake: *** [Makefile:9: src] Error 2
*** Error code 1

Stop.

Full log: https://pkg-status.freebsd.org/gohan04/data/140amd64-default-foo/2024-08-29_19h57m48s/logs/errors/efivar-0.15_9.log

Useful link: https://gcc.gnu.org/gcc-14/porting_to.html
Comment 1 commit-hook freebsd_committer freebsd_triage 2024-09-05 10:10:47 UTC
A commit in branch main references this bug:

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

commit a067c93271149375640f7ad487e5dace034462bd
Author:     Lorenzo Salvadore <salvadore@FreeBSD.org>
AuthorDate: 2024-09-05 10:00:37 +0000
Commit:     Lorenzo Salvadore <salvadore@FreeBSD.org>
CommitDate: 2024-09-05 10:10:03 +0000

    devel/efivar: Fix build with GCC 14

    GCC 14 has transformed some warnings into errors: revert them to simple
    warnings.

    PR:             281226
    Reported by:    exp-run (antoine)

 devel/efivar/Makefile | 2 ++
 1 file changed, 2 insertions(+)