From owner-freebsd-current@freebsd.org Sun Mar 12 02:37:36 2017 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 315F9D07A69 for ; Sun, 12 Mar 2017 02:37:36 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from pmta2.delivery6.ore.mailhop.org (pmta2.delivery6.ore.mailhop.org [54.200.129.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 14B7E109F for ; Sun, 12 Mar 2017 02:37:35 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: c05af9bd-06cc-11e7-b3c2-c9f38144898e X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 73.78.92.27 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [73.78.92.27]) by outbound2.ore.mailhop.org (Halon) with ESMTPSA id c05af9bd-06cc-11e7-b3c2-c9f38144898e; Sun, 12 Mar 2017 02:36:53 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id v2C2bWrc002437; Sat, 11 Mar 2017 19:37:32 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <1489286252.40576.68.camel@freebsd.org> Subject: Re: Deterministic rescue buildworld error with custom make.conf/src.conf/MAKEOBJDIRPREFIX From: Ian Lepore To: Lawrence Stewart , FreeBSD Current Date: Sat, 11 Mar 2017 19:37:32 -0700 In-Reply-To: <0aa75720-7670-9b64-a536-9958ff332eea@freebsd.org> References: <1489274995.40576.65.camel@freebsd.org> <0aa75720-7670-9b64-a536-9958ff332eea@freebsd.org> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.23 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: Sun, 12 Mar 2017 02:37:36 -0000 On Sun, 2017-03-12 at 13:27 +1100, Lawrence Stewart wrote: > Hi Ian, > > On 12/03/2017 10:29, Ian Lepore wrote: > > > > On Sun, 2017-03-12 at 10:22 +1100, Lawrence Stewart wrote: > > > > > > Hi all, > > > > > > I'm unable to complete buildworld with 2 recent svn revs I've > > > tried > > > (r314838 and r315059). I'm building for a slightly resource > > > constrained > > > production system so am specifying custom settings and a > > > different > > > obj > > > tree location so I can copy it to the target system. The error > > > persists > > > after an "rm -rf /usr/obj/*", and if parallel building is > > > disabled. > > > > > > The underlying build system built from r314838 via simple "make > > > -C > > > /usr/src -s -j6 buildworld buildkernel" built and installed fine, > > > so > > > the > > > problem seems to be around the use of the build customisations. > > > > > > Any clues? > > > > > > Cheers, > > > Lawrence > > > > > > > > > root@builder-head-amd64:/usr/src # cat cust_make.conf > > > KERNCONF=GENERIC-NODEBUG > > > MALLOC_PRODUCTION=YES > > > > > > root@builder-head-amd64:/usr/src # cat cust_src.conf > > > WITHOUT_PROFILE=1 > > > > > > root@builder-head-amd64:/usr/src # make > > > __MAKE_CONF=/usr/src/cust_make.conf > > > SRCCONF=/usr/src/cust_src.conf > > > MAKEOBJDIRPREFIX=/usr/obj/cust buildworld buildkernel > > > [...] > > > MK_AUTO_OBJ=no > > > MK_TESTS=no  UPDATE_DEPENDFILE=no  _RECURSING_CRUNCH=1 > > > CC="cc -target x86_64-unknown-freebsd12.0 > > > --sysroot=/usr/obj/cust/usr/src/tmp > > > -B/usr/obj/cust/usr/src/tmp/usr/bin > > > -O2 -pipe   -std=gnu99    -Qunused-arguments  "  CXX="c++  - > > > target > > > x86_64-unknown-freebsd12.0 --sysroot=/usr/obj/cust/usr/src/tmp > > > -B/usr/obj/cust/usr/src/tmp/usr/bin -O2 -pipe -Qunused-arguments > > > -Wno-c++11-extensions  "  make .MAKE.MODE="normal curdirOk=yes" > > > .MAKE.META.IGNORE_PATHS=""  -f rescue.mk exe > > > cc -target x86_64-unknown-freebsd12.0 > > > --sysroot=/usr/obj/cust/usr/src/tmp > > > -B/usr/obj/cust/usr/src/tmp/usr/bin > > > -O2 -pipe   -std=gnu99    -Qunused-arguments   -nostdlib -Wl,-dc > > > -r > > > -o > > > cat.lo cat_stub.o > > > /usr/obj/cust/usr/src/rescue/rescue//usr/src/bin/cat/cat.o > > > cc: error: no such file or directory: > > > '/usr/obj/cust/usr/src/rescue/rescue//usr/src/bin/cat/cat.o' > > > *** Error code 1 > > > > > > There appear to be a lot of missing .o files under the rescue obj > > > tree: > > > > > > root@builder-head-amd64:/usr/src # find > > > /usr/obj/cust/usr/src/rescue/rescue//usr -type f > > > /usr/obj/cust/usr/src/rescue/rescue//usr/src/bin/sh/mksyntax.o > > > /usr/obj/cust/usr/src/rescue/rescue//usr/src/bin/sh/mksyntax > > > /usr/obj/cust/usr/src/rescue/rescue//usr/src/bin/sh/mknodes.o > > > /usr/obj/cust/usr/src/rescue/rescue//usr/src/bin/sh/mknodes > > > /usr/obj/cust/usr/src/rescue/rescue//usr/src/bin/csh/sh.err.h > > > /usr/obj/cust/usr/src/rescue/rescue//usr/src/bin/csh/tc.const.h > > > /usr/obj/cust/usr/src/rescue/rescue//usr/src/bin/csh/gethost > > > > > > compared with an obj tree on a different head system: > > > > > > find /usr/obj/usr/src/rescue/rescue/usr/ -type f | wc -l > > >     1552 > > > _______________________________________________ > > > freebsd-current@freebsd.org mailing list > > > https://lists.freebsd.org/mailman/listinfo/freebsd-current > > > To unsubscribe, send any mail to "freebsd-current-unsubscribe@fre > > > ebsd > > > .org" > > The MAKEOBJDIRPREFIX variable must be set in the environment, not > > in > > make.conf or on the make command line (documented in build(7)). > Your assertion seems at odds with my past experience and my reading > of > the man page... from build(7): > > The build may be controlled by defining make(1) variables > described in the ENVIRONMENT section below, and by the > variables documented in make.conf(5). > > ... which indicates they are make variables, not environment > variables > specifically. As a concrete example, TARGET and DESTDIR are listed > under > the "ENVIRONMENT" section of the man page, yet "EXAMPLES" shows: > >            make TARGET=sparc64 buildworld >            make TARGET=sparc64 DESTDIR=/clients/sparc64 installworld > > I've certainly always set build vars documented in the "ENVIRONMENT" > section of the man page on the make command line without issue. > Pretty > sure I've set MAKEOBJDIRPREFIX from the make command line also in the > past, though perhaps it has been working for me "by accident" and a > documentation tweak is in order if the distinction you make is in > fact > relevant... > > Cheers, > Lawrence > _______________________________________________ > freebsd-current@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd > .org" You cited everything from build(7) except the part most on-point for the problem you're having: MAKEOBJDIRPREFIX Defines the prefix for directory names in the tree of built objects.  Defaults to /usr/obj if not defined.  This variable should only be set in the environment and not via /etc/make.conf or the command line. -- Ian