From owner-svn-src-all@freebsd.org Tue Aug 21 09:22:01 2018 Return-Path: Delivered-To: svn-src-all@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 DBC88108EE04 for ; Tue, 21 Aug 2018 09:22:00 +0000 (UTC) (envelope-from arichardson.kde@gmail.com) Received: from mail-yw1-f41.google.com (mail-yw1-f41.google.com [209.85.161.41]) (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 776F27AC78; Tue, 21 Aug 2018 09:22:00 +0000 (UTC) (envelope-from arichardson.kde@gmail.com) Received: by mail-yw1-f41.google.com with SMTP id 14-v6so459740ywe.2; Tue, 21 Aug 2018 02:22:00 -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=3qn0v9gS/el3iKnhgmD9yMtj0a2dqbWABSE0DGE+vlE=; b=GqqQr4LraLLD/80mCKaMSRGDWI6OC3GYN3pi/ofTTXLWCaGDcPUshrjYyz778M1SSb R58yTXU9DhJxTRb2Y2OjMxQi8hFnuPljuaTUsxLA9+rOjIBh1kiGbgAarWX00r1CdxTW 7ov3FnP3lNWncsE33KpI1k9IGlyUGSH4fnMCNjTXonOx6SSuk8pGptQtu5LatbnllzWX fTrij6GyEcDBoIiCz0MH8GFukJHHKhtmDDSHoSLVmMSUyga+SMEK5HinzbXQmFCHMuL7 Lkh8+gXriUsSqoPJnJHg1SQrLQSbeWt7sTYrszFqBcYam4prXlDyOxQJltlJhuSr9F/O F6aw== X-Gm-Message-State: APzg51BWXyQGns37BZ93rUoYwIXN0kIMoS4BEPcvD8EvUVHekIeGI62u cg4V6KsPJZubghHWOvR+j21GKhoCyYGbRw== X-Google-Smtp-Source: ANB0Vdavyab2jJGrYQKfR+20tXpmEsjtdjvGLh50AIUsOORKP4YCQHHKs96QCXO+ayqEGHryZ3+hRw== X-Received: by 2002:a81:7c0b:: with SMTP id x11-v6mr6044304ywc.492.1534839137911; Tue, 21 Aug 2018 01:12:17 -0700 (PDT) Received: from mail-yw1-f50.google.com (mail-yw1-f50.google.com. [209.85.161.50]) by smtp.gmail.com with ESMTPSA id p78-v6sm8732962ywp.31.2018.08.21.01.12.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 21 Aug 2018 01:12:17 -0700 (PDT) Received: by mail-yw1-f50.google.com with SMTP id r184-v6so7830987ywg.6; Tue, 21 Aug 2018 01:12:17 -0700 (PDT) X-Received: by 2002:a0d:ee41:: with SMTP id x62-v6mr26457110ywe.318.1534839137054; Tue, 21 Aug 2018 01:12:17 -0700 (PDT) MIME-Version: 1.0 References: <201808201039.w7KAdhfX079450@repo.freebsd.org> <20180820214557.1f8ef5bd@thor.intern.walstatt.dynvpn.de> <20180820220025.6a3d141f@thor.intern.walstatt.dynvpn.de> In-Reply-To: From: Alexander Richardson Date: Tue, 21 Aug 2018 09:12:05 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r338096 - head/tools/build/mk To: Warner Losh Cc: "O. Hartmann" , "O. Hartmann" , src-committers , svn-src-all@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.27 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Aug 2018 09:22:01 -0000 I'm a quite surprised by this error since I can't see anywhere that gdbe would be built as a bootstrap tool (otherwise tools/build/mk should not be used). I've successfully built resuce with this so there must be some environment/make variable that causes this. It seems this happens during the build-tools stages if WITHOUT_AUTO_OBJ is set. I'll work on a patch immediately. Alex On Mon, 20 Aug 2018 at 21:14 Warner Losh wrote: > On Mon, Aug 20, 2018 at 1:59 PM, O. Hartmann > wrote: > >> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: SHA512 >> >> Am Mon, 20 Aug 2018 13:48:45 -0600 >> Warner Losh schrieb: >> >> > On Mon, Aug 20, 2018 at 1:45 PM, O. Hartmann >> wrote: >> > >> > > -----BEGIN PGP SIGNED MESSAGE----- >> > > Hash: SHA512 >> > > >> > > Am Mon, 20 Aug 2018 10:39:43 +0000 (UTC) >> > > Alex Richardson schrieb: >> > > >> > > > Author: arichardson >> > > > Date: Mon Aug 20 10:39:42 2018 >> > > > New Revision: 338096 >> > > > URL: https://svnweb.freebsd.org/changeset/base/338096 >> > > > >> > > > Log: >> > > > Avoid depending on system headers from the source tree during >> bootstrap >> > > > >> > > > This can cause surprising errors if the build tools is built >> against >> > > > headers that don't match the host system. It is also required in >> order >> > > > to allow building on non-FreeBSD systems where the headers in >> > > > /usr/include/sys are usually completely incompatible with those >> in the >> > > > source tree. >> > > > >> > > > I added an error to Makefile.boot if this is done and found this >> was >> > > > only the case in libnv. With this error in the Makefile ABI >> breakages >> > > > such as r336019 should no longer be possible. >> > > > >> > > > Reviewed By: bdrewery, kevans >> > > > Approved By: jhb (mentor) >> > > > Differential Revision: https://reviews.freebsd.org/D16186 >> > > > >> > > > Modified: >> > > > head/tools/build/mk/Makefile.boot >> > > > >> > > > Modified: head/tools/build/mk/Makefile.boot >> > > > ============================================================ >> > > ================== >> > > > --- head/tools/build/mk/Makefile.boot Mon Aug 20 10:39:37 2018 >> > > (r338095) >> > > > +++ head/tools/build/mk/Makefile.boot Mon Aug 20 10:39:42 2018 >> > > (r338096) >> > > > @@ -7,3 +7,20 @@ LDFLAGS+= -L${WORLDTMP}/legacy/usr/lib >> > > > >> > > > # we do not want to capture dependencies referring to the above >> > > > UPDATE_DEPENDFILE= no >> > > > + >> > > > +# When building host tools we should never pull in headers from >> the >> > > source sys >> > > > +# directory to avoid any ABI issues that might cause the built >> binary >> > > to crash. >> > > > +# The only exceptions to this are sys/cddl/compat for dtrace >> bootstrap >> > > tools and >> > > > +# sys/crypto for libmd bootstrap. >> > > > +.if !empty(CFLAGS:M*${SRCTOP}/sys*:N*${SRCTOP}/sys/cddl/compat*: >> > > N*${SRCTOP}/sys/crypto*) >> > > > +.error 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 ${.CURDIR} >> > > > +.endif >> > > > + >> > > > +# ${SRCTOP}/include should also never be used to avoid ABI issues >> > > > +.if !empty(CFLAGS:M*${SRCTOP}/include*) >> > > > +.error Do not include $${SRCTOP}/include when building bootstrap >> tools. >> > > \ >> > > > + Copy the header to $${WORLDTMP}/legacy in >> tools/build/Makefile >> > > instead. \ >> > > > + Error was caused by Makefile in ${.CURDIR} >> > > > +.endif >> > > > _______________________________________________ >> > > > svn-src-head@freebsd.org mailing list >> > > > https://lists.freebsd.org/mailman/listinfo/svn-src-head >> > > > To unsubscribe, send any mail to " >> svn-src-head-unsubscribe@freebsd.org" >> > > >> > > >> > > This commit seems to break NanoBSD builds! >> > > >> > > While r338095 still build my NanoBSD obj tree, >= r338096 fails with: >> > > >> > > [...] >> > > - --- obj_crunchdir_gbde --- >> > > 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 >> > > >> > >> > >> > NanoBSD just does a buildworld with a few env vars, but nothing >> exotic.... >> > >> > And in the case of 'obj' target, who cares about the includes... >> > >> > Warner >> >> So, how to explain r338095 works, r338096 doesn't? >> > > I'm unsure. I've not had a chance to look closely... > > Warner >