From nobody Wed Dec 22 16:58:50 2021 X-Original-To: freebsd-current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 965DC18F4ED9 for ; Wed, 22 Dec 2021 16:59:02 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ua1-x929.google.com (mail-ua1-x929.google.com [IPv6:2607:f8b0:4864:20::929]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JK00Q3Zy7z3NHW for ; Wed, 22 Dec 2021 16:59:02 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-ua1-x929.google.com with SMTP id a14so5625098uak.0 for ; Wed, 22 Dec 2021 08:59:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=SOJUvREvnmZwiEcWSzJe0UpGgRB6l8bUKEZkwV/VEVc=; b=YTWX/NplwRvMWpXYVsK8+somNnKY+J/hYqDKsGnfNZpa/dko1GsZsaYfqAZ7fmUQHG RXiU18LPHvHpJWuX3yMc6l/iiNYXVocDXAbdWug+fmV/DkFzcDkJuApyatQuN7GMweJG 8wxEShJQONe1ekNyZlGML/RipoXb+BY/+sZRn0/TMpimwg+/PizXpTL1aZwHJJgvJA48 55DKkkZ6FpPSfncbLi1aVDZatAznMh/KyAZVkvwHm+9AcDr1NL/ZiLRPo92+79SKlrSm 0b1KBy/WQp5zYO7dC7wj0R/kFyw4TcOrbH9rHNmqC3V0O3h5Wf/naR1S2FwPeNjcOI+8 9qGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=SOJUvREvnmZwiEcWSzJe0UpGgRB6l8bUKEZkwV/VEVc=; b=TyEwbXWZvyMnWTWY0kbxJ0eXAuT2RJB1E/n7c+SFw+ZbGCenN6PXrHIsQg9CaG57ll /gUDK1bCQUxI6OqXoeTfqGRpJt1h1GuZyjRU/I5EIOVYrP5Mynd76rQ3B826+XnKGS0m 6Db8YOh09sCaJHFjnQtbRAYfo7eDklPXCKW/07Sio3P/EcTeN/TT1RDWVAyU1zQ+VNfS 7IjefrvgW9T94wLxDFspVxSDKAABbkva3kv40E0gjGtZ5ndGmKJhiFSDAqPxEGTdvDjm KvHd3pqT/qw9lupJkE3wpnXqPKZ7BUSjo+Kk9jlewe9WWLBXbxA/aKlxqQB2Ti9ZBcfo yq6g== X-Gm-Message-State: AOAM532agvPJbt/Oa0BRA+3GxUwnSnPdq+pqU/vjsyvAuL2Lnf4C4SX5 sgmdzfZvevqimAZrPDLGwmmMexPwsBXtHyWRRz/SM4jp8nY= X-Google-Smtp-Source: ABdhPJzvDFLgCsGYR3m/wyMRBwI9pugfV7D33EN4mXudwnFfsU5p+KllYFfZ/kE9Z5RADSPysM+C3DaLGz93aP9quJk= X-Received: by 2002:a05:6102:3e95:: with SMTP id m21mr1141056vsv.77.1640192341909; Wed, 22 Dec 2021 08:59:01 -0800 (PST) List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 References: <20211219114723.338b235e@ernst.home> <61bf1204.1c69fb81.2c8fc.3280SMTPIN_ADDED_BROKEN@mx.google.com> <20211219122443.1c84093f@ernst.home> <74FC7625-295C-4DEC-BF35-434B5F8D7832@FreeBSD.org> <20211222165154.33ef54fd@ernst.home> <20211222170151.05a4afe3@ernst.home> In-Reply-To: <20211222170151.05a4afe3@ernst.home> From: Warner Losh Date: Wed, 22 Dec 2021 10:58:50 -0600 Message-ID: Subject: Re: WITHOUT_PF breaks buildworld To: Gary Jennejohn Cc: FreeBSD Current Content-Type: multipart/alternative; boundary="000000000000e73f8d05d3bf0941" X-Rspamd-Queue-Id: 4JK00Q3Zy7z3NHW X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N --000000000000e73f8d05d3bf0941 Content-Type: text/plain; charset="UTF-8" On Wed, Dec 22, 2021, 10:02 AM Gary Jennejohn wrote: > On Wed, 22 Dec 2021 16:51:54 +0100 > Gary Jennejohn wrote: > > On Wed, 22 Dec 2021 16:27:52 +0100 > Kristof Provost wrote: > > > On 22 Dec 2021, at 8:21, Konrad Sewi??o-Jopek wrote: > > > Hi, > > > > > > I think the reason is somewhere in tools/build/test-includes: > > > > > > --- net/if_pfsync.o --- > > > In file included from net/if_pfsync.c:1: > > > In file included from > > > [...]freebsd/arm64.aarch64/tmp/usr/include/net/if_pfsync.h:56: > > > [...]freebsd/arm64.aarch64/tmp/usr/include/net/pfvar.h:65:10: fatal > error: > > > 'netpfil/pf/pf.h' file not found > > > #include > > > ^~~~~~~~~~~~~~~~~ > > > 1 error generated. > > > *** [net/if_pfsync.o] Error code 1 > > > > > > make[3]: stopped in [...]freebsd/tools/build/test-includes > > > --- net/pfvar.o --- > > > > In file included from net/pfvar.c:1: > > > > [...]freebsd/arm64.aarch64/tmp/usr/include/net/pfvar.h:65:10: fatal > error: > > > > 'netpfil/pf/pf.h' file not found > > > > #include > > > > ^~~~~~~~~~~~~~~~~ > > > > 1 error generated. > > > > *** [net/pfvar.o] Error code 1 > > > > > > > > make[3]: stopped in [...]freebsd/tools/build/test-includes > > > > 2 errors > > > > > > > > make[3]: stopped in [...]freebsd/tools/build/test-includes > > > > *** [test-includes] Error code 2 > > > > > > > > make[2]: stopped in [...]freebsd > > > > 1 error > > > > > > > > Best regards, > > > > Konrad Sewi??o-Jopek > > > > > > > > > > > > niedz., 19 gru 2021 o 12:26 Gary Jennejohn > > > > napisa?(a): > > > > > > > >> On Sun, 19 Dec 2021 19:05:35 +0800 > > > >> Alastair Hogge wrote: > > > >> > > > >>> On Sunday, 19 December 2021 6:47:23 PM AWST Gary Jennejohn wrote: > > > > >>>> Some recent change, probably in a .mk file, breaks builworld on > HEAD > > > >>>> when WITHOUT_PF is enabled in src.conf. > > > >>> > > > >>> I have had to disable WITHOUT_PF since 2020-07-27, but probably > earlier. > > > >>> > > > >> > > > >> Hmm. I did a successful buildworld a few days ago with WITHOUT_PF > > > >> enabled, so it's new breakge for me at least. > > > >> > > > >> I don't enable pf in the kernel and don't need it in userland. > > > >> > > > >>>> Disabling WITHOUT_PF results in a successful buildworld. > > > >>>> > > > >>>> The reported error is that netpfil/pf/pf.h can't be found. > > > >>> > > > >>> Some ports depend on that too. > > > >>> > > > >> > > This is the test-includes target, which validates that include files are > self-contained (that is, you can '#include <$file>' without prerequisites. > > The target fails because it looks at all headers in /usr/src/sys and > then tries to build them, but some of those headers (like the pf headers) > include other headers that may not be getting installed because they're > disabled. > > > > I'm not quite sure how to best fix this. > > > > Note that it is not happening because some pf tools are still getting > built. This is a validation target that fails. > > > > We could potentially add the pf headers to BADHDRS depending on the > WITHOUT_ flag, but that would mean manually maintaining badfiles.inc. > > Or perhaps we should keep installing the pf headers even when WITHOUT_PF > is set, but I'm not actually sure how we convince the build system to do > that. Or if it's a good idea. > > > > Warner might have better ideas on how to fix this. > > > > This simple patch to /usr/src/include/Makefile fixes it for me: > > --- Makefile.orig 2021-12-22 13:37:02.817745000 +0100 > +++ Makefile 2021-12-22 13:37:12.177336000 +0100 > @@ -246,9 +246,7 @@ > INCSGROUPS+= IPFILTER > .endif > > -.if ${MK_PF} != "no" > INCSGROUPS+= PF > -.endif > > .if ${MK_CDDL} != "no" > INCSGROUPS+= NVPAIR > > Since pf.h is used so widely in the tree it's probably the simplest fix. > I like this. I'd unconditionally remove the test in preference to adding it conditionally. Warner --000000000000e73f8d05d3bf0941 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Wed, Dec 22, 2021, 10:02 AM Gary Jennejohn <gl= jennjohn@gmail.com> wrote:
O= n Wed, 22 Dec 2021 16:51:54 +0100
Gary Jennejohn <gljennjohn@gmail.com> wrote:

On Wed, 22 Dec 2021 16:27:52 +0100
Kristof Provost <kp@FreeBSD.org> wrote:

> On 22 Dec 2021, at 8:21, Konrad Sewi??o-Jopek wrote:=C2=A0
> > Hi,
> >
> > I think the reason is somewhere in tools/build/test-includes:
> >
> > --- net/if_pfsync.o ---
> > In file included from net/if_pfsync.c:1:
> > In file included from
> > [...]freebsd/arm64.aarch64/tmp/usr/include/net/if_pfsync.h:56: > > [...]freebsd/arm64.aarch64/tmp/usr/include/net/pfvar.h:65:10: fat= al error:
> > 'netpfil/pf/pf.h' file not found
> > #include <netpfil/pf/pf.h>
> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ^~~~~~~~~~~~~~~~~
> > 1 error generated.
> > *** [net/if_pfsync.o] Error code 1
> >
> > make[3]: stopped in [...]freebsd/tools/build/test-includes
> > --- net/pfvar.o ---
> > > In file included from net/pfvar.c:1:
> > > [...]freebsd/arm64.aarch64/tmp/usr/include/net/pfvar.h:65:10= : fatal error:
> > > 'netpfil/pf/pf.h' file not found
> > > #include <netpfil/pf/pf.h>
> > >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ^~~~~~~~~~~~~~~~~
> > > 1 error generated.
> > > *** [net/pfvar.o] Error code 1
> > >
> > > make[3]: stopped in [...]freebsd/tools/build/test-includes > > > 2 errors
> > >
> > > make[3]: stopped in [...]freebsd/tools/build/test-includes > > > *** [test-includes] Error code 2
> > >
> > > make[2]: stopped in [...]freebsd
> > > 1 error
> > >
> > > Best regards,
> > > Konrad Sewi??o-Jopek
> > >
> > >
> > > niedz., 19 gru 2021 o 12:26 Gary Jennejohn <= gljennjohn@gmail.com>
> > > napisa?(a):
> > >=C2=A0 =C2=A0
> > >> On Sun, 19 Dec 2021 19:05:35 +0800
> > >> Alastair Hogge <agh@riseup.net> wrote:<= br> > > >>=C2=A0 =C2=A0
> > >>> On Sunday, 19 December 2021 6:47:23 PM AWST Gary Jen= nejohn wrote:=C2=A0 =C2=A0
> > >>>> Some recent change, probably in a .mk file, brea= ks builworld on HEAD
> > >>>> when WITHOUT_PF is enabled in src.conf.=C2=A0 = =C2=A0
> > >>>
> > >>> I have had to disable WITHOUT_PF since 2020-07-27, b= ut probably earlier.
> > >>>=C2=A0 =C2=A0
> > >>
> > >> Hmm.=C2=A0 I did a successful buildworld a few days ago = with WITHOUT_PF
> > >> enabled, so it's new breakge for me at least.
> > >>
> > >> I don't enable pf in the kernel and don't need i= t in userland.
> > >>=C2=A0 =C2=A0
> > >>>> Disabling WITHOUT_PF results in a successful bui= ldworld.
> > >>>>
> > >>>> The reported error is that netpfil/pf/pf.h can&#= 39;t be found.=C2=A0 =C2=A0
> > >>>
> > >>> Some ports depend on that too.
> > >>>=C2=A0 =C2=A0
> > >>=C2=A0 =C2=A0
> This is the test-includes target, which validates that include files a= re self-contained (that is, you can '#include <$file>' withou= t prerequisites.
> The target fails because it looks at all headers in /usr/src/sys and t= hen tries to build them, but some of those headers (like the pf headers) in= clude other headers that may not be getting installed because they're d= isabled.
>
> I'm not quite sure how to best fix this.
>
> Note that it is not happening because some pf tools are still getting = built. This is a validation target that fails.
>
> We could potentially add the pf headers to BADHDRS depending on the WI= THOUT_ flag, but that would mean manually maintaining badfiles.inc.
> Or perhaps we should keep installing the pf headers even when WITHOUT_= PF is set, but I'm not actually sure how we convince the build system t= o do that. Or if it's a good idea.
>
> Warner might have better ideas on how to fix this.
>=C2=A0 =C2=A0

This simple patch to /usr/src/include/Makefile fixes it for me:

--- Makefile.orig=C2=A0 =C2=A0 =C2=A0 =C2=A02021-12-22 13:37:02.817745000 += 0100
+++ Makefile=C2=A0 =C2=A0 2021-12-22 13:37:12.177336000 +0100
@@ -246,9 +246,7 @@
=C2=A0INCSGROUPS+=3D=C2=A0 =C2=A0IPFILTER
=C2=A0.endif

-.if ${MK_PF} !=3D "no"
=C2=A0INCSGROUPS+=3D=C2=A0 =C2=A0PF
-.endif

=C2=A0.if ${MK_CDDL} !=3D "no"
=C2=A0INCSGROUPS+=3D=C2=A0 =C2=A0NVPAIR

Since pf.h is used so widely in the tree it's probably the simplest fix= .

I like this. I'd unconditionally remove the test in preference to addi= ng it conditionally.=C2=A0

Warner
--000000000000e73f8d05d3bf0941--