Bug 281243 - net/l2tpd: Fails to build with GCC 14: error: implicit declaration of function 'kill' [-Wimplicit-function-declaration]
Summary: net/l2tpd: Fails to build with GCC 14: error: implicit declaration of functio...
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 13:51 UTC by Lorenzo Salvadore
Modified: 2024-09-05 15:15 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 13:51:08 UTC
Build fails with GCC 14. This blocks GCC_DEFAULT update to GCC 14.

=======================<phase: build          >============================
===== env: NO_DEPENDS=yes USER=root UID=0 GID=0
===>  Building for l2tpd-0.69_12
gcc14  -O2 -pipe  -fcommon -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc14 -fno-strict-aliasing  -DDEBUG_PPPD -DDEBUG_CONTROL -DDEBUG_ENTROPY -Wall -DSANITY -DFREEBSD -DPREFIX=\"/usr/local\" -O -c l2tpd.c -o l2tpd.o
In file included from l2tp.h:31,
                 from l2tpd.c:40:
misc.h:67:13: warning: conflicting types for built-in function 'log'; expected 'double(double)' [-Wbuiltin-declaration-mismatch]
   67 | extern void log (int level, const char *fmt, ...);
      |             ^~~
misc.h:1:1: note: 'log' is declared in header '<math.h>'
  +++ |+#include <math.h>
    1 | /*
l2tpd.c: In function 'start_pppd':
l2tpd.c:274:11: warning: variable 'str' set but not used [-Wunused-but-set-variable]
  274 |     char *str;
      |           ^~~
l2tpd.c: In function 'lac_hangup':
l2tpd.c:651:17: error: implicit declaration of function 'kill' [-Wimplicit-function-declaration]
  651 |                 kill (tmp->pppd, SIGTERM);
      |                 ^~~~
l2tpd.c: In function 'daemonize':
l2tpd.c:986:11: warning: variable 'l' set but not used [-Wunused-but-set-variable]
  986 |     int i,l;
      |           ^
misc.h: At top level:
misc.h:71:20: warning: inline function 'swaps' declared but never defined
   71 | extern inline void swaps (void *, int);
      |                    ^~~~~
*** Error code 1

Stop.
make: stopped in /wrkdirs/usr/ports/net/l2tpd/work/l2tpd-0.69
*** Error code 1

Full log: https://pkg-status.freebsd.org/gohan04/data/140amd64-default-foo/2024-08-29_19h57m48s/logs/errors/l2tpd-0.69_12.log

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

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

commit 16c76a4ce238f99fe8839bb5e82f41bbbbaf520b
Author:     Lorenzo Salvadore <salvadore@FreeBSD.org>
AuthorDate: 2024-09-05 14:39:05 +0000
Commit:     Lorenzo Salvadore <salvadore@FreeBSD.org>
CommitDate: 2024-09-05 15:08:27 +0000

    net/l2tpd: Fix build with GCC 14

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

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

 net/l2tpd/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)