NetBSD Problem Report #56431

From beceeh@shaw.ca  Fri Oct  1 17:24:05 2021
Return-Path: <beceeh@shaw.ca>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id E85491A921F
	for <gnats-bugs@gnats.NetBSD.org>; Fri,  1 Oct 2021 17:24:04 +0000 (UTC)
Message-Id: <20211001172025.C52FB36DC0@katy.localdomain>
Date: Fri,  1 Oct 2021 10:20:25 -0700 (PDT)
From: Bch <beceeh@shaw.ca>
To: gnats-bugs@NetBSD.org
Cc: brad.harder@gmail.com, yamaguchi@netbsd.org
Subject: if_lagg failing to build (laggattach() prototype complaint)
X-Send-Pr-Version: 3.95

>Number:         56431
>Category:       kern
>Synopsis:       if_lagg failing to build (laggattach() prototype complaint)
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Oct 01 17:25:00 +0000 2021
>Originator:     Bch
>Release:        NetBSD 9.99.89
>Organization:
method logic digital
>Environment:
System: NetBSD katy 9.99.89 NetBSD 9.99.89 (GENERIC) #200: Tue Sep 28 11:48:03 PDT 2021 root@katy:/usr/obj/sys/arch/amd64/compile/GENERIC amd64
Architecture: x86_64
Machine: amd64
>Description:

katy# nice ./build.sh -j 1  -u modules
===> build.sh command:    ./build.sh -j 1 -u modules
===> build.sh started:    Fri Oct  1 10:10:35 PDT 2021
===> NetBSD version:      9.99.90
===> MACHINE:             amd64
===> MACHINE_ARCH:        x86_64
===> Build platform:      NetBSD 9.99.89 amd64
===> HOST_SH:             /bin/sh
===> MAKECONF file:       /etc/mk.conf
#    objdir  /usr/obj/
===> TOOLDIR path:        /usr/src/obj/tooldir.NetBSD-9.99.89-amd64
===> DESTDIR path:        /usr/src/obj/destdir.amd64
===> RELEASEDIR path:     /usr/src/obj/releasedir
===> Updated makewrapper: /usr/src/obj/tooldir.NetBSD-9.99.89-amd64/bin/nbmake-amd64
===> Building modules without building new tools
===> Building kernel modules for NetBSD/amd64 9.99.90
obj ===> compat_util

[...]

dependall ===> if_lagg
#    create  if_lagg/if_lagg.d
CC=/usr/src/obj/tooldir.NetBSD-9.99.89-amd64/bin/x86_64--netbsd-gcc /usr/src/obj/tooldir.NetBSD-9.99.89-amd64/bin/nbmkdep -f if_lagg.d.tmp  --   -std=gnu99   -I/usr/src/common/include -DDIAGNOSTIC -DDEBUG --sysroot=/usr/src/obj/destdir.amd64 -DINET -DINET6 -I/usr/src/common/include -DDIAGNOSTIC -DDEBUG -nostdinc -I. -I/usr/src/sys/modules/if_lagg -isystem /usr/src/sys -isystem /usr/src/sys/arch -isystem /usr/src/sys/../common/include -D_KERNEL -D_MODULE -DSYSCTL_INCLUDE_DESCR     /usr/src/sys/net/lagg/if_lagg.c &&  mv -f if_lagg.d.tmp if_lagg.d
#    create  if_lagg/.depend
rm -f .depend
CC=/usr/src/obj/tooldir.NetBSD-9.99.89-amd64/bin/x86_64--netbsd-gcc /usr/src/obj/tooldir.NetBSD-9.99.89-amd64/bin/nbmkdep -s .o\ .d -d -f .depend if_lagg.d if_lagg_lacp.d if_laggproto.d ioconf.d
#   compile  if_lagg/if_lagg.o
/usr/src/obj/tooldir.NetBSD-9.99.89-amd64/bin/x86_64--netbsd-gcc -O2 -g -g   -std=gnu99    -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-sign-compare  -Wsystem-headers   -Wno-traditional   -Wa,--fatal-warnings  -Wreturn-type -Wswitch -Wshadow -Wcast-qual -Wwrite-strings -Wextra -Wno-unused-parameter -Wno-sign-compare -Wold-style-definition -Wsign-compare -Wformat=2  -Wno-format-zero-length  -Werror   -ffreestanding  -fno-strict-aliasing -Wno-pointer-sign -mno-red-zone -mno-mmx -mno-sse -mno-avx -msoft-float -mcmodel=kernel -fno-omit-frame-pointer   -I/usr/src/common/include -DDIAGNOSTIC -DDEBUG --sysroot=/usr/src/obj/destdir.amd64 -DINET -DINET6 -I/usr/src/common/include -DDIAGNOSTIC -DDEBUG  -nostdinc -I. -I/usr/src/sys/modules/if_lagg -isystem /usr/src/sys -isystem /usr/src/sys/arch -isystem /usr/src/sys/../common/include -D_KERNEL -D_MODULE -DSYSCTL_INCLUDE_DESCR -c    /usr/src/sys/net/lagg/if_lagg.c -o if_lagg.o.o
/usr/src/sys/net/lagg/if_lagg.c:321:1: error: no previous prototype for 'laggattach' [-Werror=missing-prototypes]
  321 | laggattach(int n)
      | ^~~~~~~~~~
cc1: all warnings being treated as errors
*** Failed target: if_lagg.o
*** Failed commands:
        ${_MKTARGET_COMPILE}
        ${COMPILE.c} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} ${OBJECT_TARGET}
        ${CTFCONVERT_RUN}
*** [if_lagg.o] Error code 1
nbmake[2]: stopped in /usr/src/sys/modules/if_lagg
1 error

nbmake[2]: stopped in /usr/src/sys/modules/if_lagg

nbmake[1]: stopped in /usr/src/sys/modules/if_lagg

nbmake: stopped in /usr/src/sys/modules

ERROR: Failed to make dependall in "sys/modules"
*** BUILD ABORTED ***

>How-To-Repeat:
	 With latest (Fri Oct  1 17:15:29 UTC 2021) -current, build modules
>Fix:
	I hacked-in a prototype directly preceeding the function
	and that allowed the build to proceed, but with a brief
	look I couldn't find the _proper_ place to put this prototype

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.