From owner-freebsd-current@FreeBSD.ORG Wed Aug 11 08:07:03 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 24D1716A4CE; Wed, 11 Aug 2004 08:07:03 +0000 (GMT) Received: from tigra.ip.net.ua (tigra.ip.net.ua [82.193.96.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id D503D43D3F; Wed, 11 Aug 2004 08:07:00 +0000 (GMT) (envelope-from ru@ip.net.ua) Received: from heffalump.ip.net.ua (heffalump.ip.net.ua [82.193.96.213]) by tigra.ip.net.ua (8.12.11/8.12.11) with ESMTP id i7B83m3T055780 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 11 Aug 2004 11:03:49 +0300 (EEST) (envelope-from ru@ip.net.ua) Received: (from ru@localhost) by heffalump.ip.net.ua (8.12.11/8.12.11) id i7B83oYg084352; Wed, 11 Aug 2004 11:03:50 +0300 (EEST) (envelope-from ru) Date: Wed, 11 Aug 2004 11:03:50 +0300 From: Ruslan Ermilov To: Kris Kennaway Message-ID: <20040811080350.GK80234@ip.net.ua> References: <20040810231044.GA70020@xor.obsecurity.org> <20040811061202.GA80234@ip.net.ua> <20040811065912.GA95263@xor.obsecurity.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="KaGhPsiNaI6/sRd6" Content-Disposition: inline In-Reply-To: <20040811065912.GA95263@xor.obsecurity.org> User-Agent: Mutt/1.5.6i X-Virus-Scanned: by amavisd-new cc: Hartmut Brandt cc: current@FreeBSD.org Subject: Re: World broken in stage 1.1 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 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: Wed, 11 Aug 2004 08:07:03 -0000 --KaGhPsiNaI6/sRd6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Aug 10, 2004 at 11:59:12PM -0700, Kris Kennaway wrote: > On Wed, Aug 11, 2004 at 09:12:02AM +0300, Ruslan Ermilov wrote: > > On Tue, Aug 10, 2004 at 04:10:44PM -0700, Kris Kennaway wrote: > > > I'm trying to update a current from a few months ago, and it dies alm= ost immediately: > > >=20 > > > Script started on Tue Aug 10 23:06:32 2004 > > > pointyhat# make cleanworld > > > rm -rf /a/obj/usr/src/* > > > chflags -R 0 /a/obj/usr/src > > > rm -rf /a/obj/usr/src/* > > > pointyhat# make buildworld > > >=20 > > $ hostname > > pointyhat.freebsd.org > > $ grep MAKEOBJDIRPREFIX /etc/make.conf > > MAKEOBJDIRPREFIX=3D/a/obj/ > > $ grep -A5 '^# MAKEOBJDIRPREFIX' /usr/share/mk/bsd.obj.mk > > # MAKEOBJDIRPREFIX Specifies somewhere other than /usr/obj to root the= object > > # tree. Note: MAKEOBJDIRPREFIX is an *environment* varia= ble > > # and works properly only if set as an environment variab= le, > > # not as a global or command line variable! > > # > > # E.g. use `env MAKEOBJDIRPREFIX=3D/somewhere/obj make' > >=20 > > Pointy hat to: kris >=20 > Well, happy POLA violation to you too; this worked until now. Please > add text to make.conf explaining the new order. >=20 Can you prove that it worked? I tried to no avail with the old (August 1 2004, before the changes) make(1) and MAKEOBJDIRPREFIX set in /etc/make.conf, to try to buildworld, and it always fails. Do you have a log of a successful buildworld saved somewhere? It fails for me because MAKEOBJDIRPREFIX from /etc/make.conf (a global variable) overrides the value of the MAKEOBJDIRPREFIX environment variable, as documented in make(1), so what's passed to the "legacy" target in Makefile.inc1 by "buildworld" is happily ignored. Here, MAKEOBJDIRPREFIX is set to /home/ru/obj in /etc/make.conf: : -------------------------------------------------------------- : >>> Rebuilding the temporary build tree : -------------------------------------------------------------- : rm -rf /home/ru/obj/usr/src5/i386 [...] : mkdir -p /home/ru/obj/usr/src5/i386/legacy/usr/bin : mkdir -p /home/ru/obj/usr/src5/i386/legacy/usr/games : mkdir -p /home/ru/obj/usr/src5/i386/legacy/usr/include/c++/3.3 : mkdir -p /home/ru/obj/usr/src5/i386/legacy/usr/include/sys : mkdir -p /home/ru/obj/usr/src5/i386/legacy/usr/lib [...] : -------------------------------------------------------------- : >>> stage 1.1: legacy release compatibility shims : -------------------------------------------------------------- : cd /usr/src5; MAKEOBJDIRPREFIX=3D/home/ru/obj/usr/src5/i386 DESTDIR=3D = INSTALL=3D"sh /usr/src5/tools/install.sh" PATH=3D/home/ru/obj/usr/src5/i38= 6/legacy/usr/sbin:/home/ru/obj/usr/src5/i386/legacy/usr/bin:/home/ru/obj/us= r/src5/i386/legacy/usr/games:/sbin:/bin:/usr/sbin:/usr/bin WORLDTMP=3D/hom= e/ru/obj/usr/src5/i386 MAKEFLAGS=3D"-m /usr/src5/tools/build/mk -m /usr/s= rc5/share/mk" /tmp/make/make -f Makefile.inc1 BOOTSTRAPPING=3D491100 -DNO= HTML -DNOINFO -DNOLINT -DNOMAN -DNOPIC -DNOPROFILE -DNOSHARED -DNO_CPU_CFL= AGS -DNO_WARNS legacy >=20 So far so good (though the make's idea of the .OBJDIR would not match the Makefile.inc1's perspective, should the canonical /usr/obj exist, but this is harmless at this stage). Now, buildworld tries to call the "legacy" subtarget with MAKEOBJDIRPREFIX set in *environment* to the value of WORLDTMP=3D${MAKEOBJDIRPREFIX}/usr/src5/i386. The "legacy" target will then attempts to install headers and other staff to DESTDIR=3D${MAKEOBJDIRPREFIX}/legacy: legacy: =2Efor _tool in tools/build ${_+_}@${ECHODIR} "=3D=3D=3D> ${_tool}"; \ cd ${.CURDIR}/${_tool}; \ ${MAKE} DIRPRFX=3D${_tool}/ obj; \ ${MAKE} DIRPRFX=3D${_tool}/ DESTDIR=3D${MAKEOBJDIRPREFIX}/legac= y includes; \ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^= ^^^^^^ ${MAKE} DIRPRFX=3D${_tool}/ depend; \ ${MAKE} DIRPRFX=3D${_tool}/ all; \ ${MAKE} DIRPRFX=3D${_tool}/ DESTDIR=3D${MAKEOBJDIRPREFIX}/legac= y install ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^= ^^^^^ =2Eendfor If it was /home/ru/obj/usr/src5/i386/legacy/*, created above, if would have= worked. But MAKEOBJDIRPREFIX from /etc/make.conf messes things up, so it attempts t= o install to non-existing /home/ru/obj/legacy, and fails: : =3D=3D=3D> tools/build : /home/ru/obj/usr/src5/tools/build created for /usr/src5/tools/build : cd /usr/src5/tools/build; /tmp/make/make buildincludes; /tmp/make/make in= stallincludes : sh /usr/src5/tools/install.sh -C -o root -g wheel -m 444 /usr/src5/tools= /build/../../include/getopt.h regex.h /home/ru/obj/legacy/usr/include = ^^^^^^^^^^^^^^^^^^^ : usage: install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode] : [-o owner] file1 file2 : install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode] : [-o owner] file1 ... fileN directory : install -d [-v] [-g group] [-m mode] [-o owner] directory ... : *** Error code 64 :=20 : Stop in /usr/src5/tools/build. Trying to set MAKEOBJDIRPREFIX in /etc/make.conf and attempting to buildwor= ld RELENG_4 on a 4.x machine similarly fails right away. The reason I'm writing this email is that I'm really interested in reproducing the case where it could have possible worked before. Any help on your side would be highly appreciated. The only case that I know of this could have worked (tested) is if make(1) was instructed to prefer the MAKEOBJDIRPREFIX environment variable over a global one, with ``make -E MAKEOBJDIRPREFIX''. Then setting MAKEOBJDIRPREF= IX in /etc/make.conf works. Cheers, --=20 Ruslan Ermilov ru@FreeBSD.org FreeBSD committer --KaGhPsiNaI6/sRd6 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFBGdLmqRfpzJluFF4RAiAiAJ0eo25n/XYVjzDmiYu79KX/D8870wCbBroV i3WWEouCLxyvbv+U+l+mLsM= =zYyB -----END PGP SIGNATURE----- --KaGhPsiNaI6/sRd6--