From owner-freebsd-current@freebsd.org Tue Aug 21 14:23:08 2018 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7057E10743B7 for ; Tue, 21 Aug 2018 14:23:08 +0000 (UTC) (envelope-from arichardson.kde@gmail.com) Received: from mail-yw1-f50.google.com (mail-yw1-f50.google.com [209.85.161.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 106D38607B; Tue, 21 Aug 2018 14:23:08 +0000 (UTC) (envelope-from arichardson.kde@gmail.com) Received: by mail-yw1-f50.google.com with SMTP id q129-v6so8163568ywg.8; Tue, 21 Aug 2018 07:23:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=R77pVYE/uP4S83dnG/zgelIEbWKgJw7EGliyuYZ/QDA=; b=N/vbZcBq9GmCqLhsyTB1r2zSxNiXIFiXgzH6jJFbt/KbG34JnBsskOrK0fSeicVWcv DgwMBslf9eYNU9q82vhyerVWLCAxt5FtivRgyvyQr1AeLG3PysHOY6I6UkESF8/p3Ihb M39ThMTZNuG7ORXzYR1gTESlREeT7kKLbrAPFvQzmrbvkruUdUm114/JjBYRgudRE2pp GKJMJ/QMG+obUw2oGNzh34/r0OUvyvQf4TedfG0l0faf+GcPtqBloYfVe2+CNtKkA9dQ LI+z06HrxeZqPq8eAXHBNmawrozPqz4gf6H5IkAIRdNb+RPFBW9W0HtpyuwAr5Mc39n/ aEwA== X-Gm-Message-State: APzg51B/aappL4zAIdSuQJvq821ox1t77tO9hPI9P22H90fkVqpSD/uq +D+3G9+YmF93n47NGJcabThZLFG+YcbbSg== X-Google-Smtp-Source: ANB0VdaI8wztr4KnexI2zwgBnWI0SbuwjAnGt4YvOFD+Ws4sn1/3ecu1ZyOQvIXB4pfNF8lY7XzJOQ== X-Received: by 2002:a81:7184:: with SMTP id m126-v6mr1811627ywc.319.1534861387125; Tue, 21 Aug 2018 07:23:07 -0700 (PDT) Received: from mail-yb0-f173.google.com (mail-yb0-f173.google.com. [209.85.213.173]) by smtp.gmail.com with ESMTPSA id b135-v6sm11435070ywh.24.2018.08.21.07.23.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 21 Aug 2018 07:23:06 -0700 (PDT) Received: by mail-yb0-f173.google.com with SMTP id f145-v6so3834010ybg.4; Tue, 21 Aug 2018 07:23:06 -0700 (PDT) X-Received: by 2002:a25:d985:: with SMTP id q127-v6mr27110721ybg.260.1534861386649; Tue, 21 Aug 2018 07:23:06 -0700 (PDT) MIME-Version: 1.0 References: <20180820212448.571e1060@thor.intern.walstatt.dynvpn.de> <20180820220103.3ac8a3ac@thor.intern.walstatt.dynvpn.de> <6040ed15-143f-9a6d-8f37-b25a7e2d2036@FreeBSD.org> In-Reply-To: From: Alexander Richardson Date: Tue, 21 Aug 2018 15:22:54 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: buildworld failure: Do not include ${SRCTOP}/sys when building bootstrap tools To: Warner Losh Cc: John Baldwin , "O. Hartmann" , FreeBSD Current Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.27 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Aug 2018 14:23:08 -0000 I think relaxing the check to just avoid includes of "${SRCTOP}/sys" is probably the best solution. It would be nice to also handle the ${.CURDIR}/../../sys case but since it's just there to prevent ABI issues that's probably fine. Alex On Tue, 21 Aug 2018 at 15:19 Warner Losh wrote: > On Tue, Aug 21, 2018 at 8:16 AM, Warner Losh wrote: > >> There's a half a dozen special targets, however. clean comes to mind... >> >> >> However, this test is needlessly restrictive: >> >> .if >> !empty(CFLAGS:M*${SRCTOP}/sys*:N*${SRCTOP}/sys/cddl/compat*:N*${SRCTOP}/sys/crypto*) >> >> since it matches >> >> CFLAGS+=-I${SRCTOP}/sys/sys/disk >> >> which is totally legit. It's designed to be legit everywhere for building >> on Linux... >> >> .if >> !empty(CFLAGS:M*${SRCTOP}/sys:N*${SRCTOP}/sys/cddl/compat:N*${SRCTOP}/sys/crypto) >> >> would be a better test, imho. >> > > Although, I could passively agressively work around it with > > CFLAGS+=-I${.CURDIR}/../../sys/sys/disk > > which also kinda defeats its purpose... > > Warner > > >> Warner >> >> On Tue, Aug 21, 2018 at 8:11 AM, Alexander Richardson < >> arichardson@freebsd.org> wrote: >> >>> In my testing 338129 fixed the issue. Seems like the problem is that >>> bsd.crunchgen.mk iterates over all directories to do a make obj when >>> it does the bootstrap-tools phase. >>> On Tue, 21 Aug 2018 at 14:49, Warner Losh wrote: >>> > >>> > >>> > >>> > On Tue, Aug 21, 2018 at 12:38 AM, John Baldwin >>> wrote: >>> >> >>> >> On 8/20/18 9:00 PM, O. Hartmann wrote: >>> >> > -----BEGIN PGP SIGNED MESSAGE----- >>> >> > Hash: SHA512 >>> >> > >>> >> > Am Mon, 20 Aug 2018 21:24:21 +0200 >>> >> > "O. Hartmann" schrieb: >>> >> > >>> >> >> -----BEGIN PGP SIGNED MESSAGE----- >>> >> >> Hash: SHA512 >>> >> >> >>> >> >> Building NanoBSD world on CURRENT r338113 fails due to: >>> >> >> >>> >> >> [...] >>> >> >> cd /pool/sources/CURRENT/src/rescue/rescue/../../sbin/gbde && >>> MK_TESTS=no >>> >> >> UPDATE_DEPENDFILE=no _RECURSING_CRUNCH=1 >>> >> >> >>> MAKEOBJDIRPREFIX=/pool/nanobsd/amd64/ALERICH_amd64/pool/sources/CURRENT/src/amd64.amd64/rescue/rescue >>> >> >> make MK_AUTO_OBJ=no DIRPRFX=rescue/rescue/gbde/ -DRESCUE >>> CRUNCH_CFLAGS=-DRESCUE >>> >> >> MK_AUTO_OBJ=no obj make[5]: >>> "/pool/sources/CURRENT/src/tools/build/mk/Makefile.boot" >>> >> >> line 18: Do not include ${SRCTOP}/sys when building bootstrap >>> tools. Copy the header to >>> >> >> ${WORLDTMP}/legacy in tools/build/Makefile instead. Error was >>> caused by Makefile >>> >> >> in /pool/sources/CURRENT/src/sbin/gbde *** [obj_crunchdir_gbde] >>> Error code 1 >>> >> >> >>> >> >> make[4]: stopped in /pool/sources/CURRENT/src/rescue/rescue >>> >> >> [...] >>> >> >> >>> >> >> >>> >> >> This problem occured during today's source updates since I was >>> able to build the NanoBSD >>> >> >> image I intend to build yesterday ~ r338060. >>> >> >> >>> >> >> What is going wrong? >>> >> > >>> >> > It seems the problem has been introduced after r338095, since >>> r338095 builds ok, while >>> >> > r338096 doesn't. >>> >> >>> >> 338096 added this check to catch a kind of error in our Makefiles. >>> Alex (cc'd) can >>> >> help with figuring out what the error is. >>> > >>> > >>> > Except we're not building anything, we're making obj in rescue... It >>> looks like a false positive... >>> > >>> > Warner >>> >> >>