Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Jan 2018 01:03:38 -0600
From:      Scott Bennett <bennett@sdf.org>
To:        ian@freebsd.org, Holger.Kipp@alogis.com, bennett@sdf.org
Cc:        tech-lists@zyxst.net, freebsd-stable@freebsd.org, dim@FreeBSD.org
Subject:   Re: why does buildworld fail on stable/11 ?
Message-ID:  <201801280703.w0S73cUh025725@sdf.org>
In-Reply-To: <1516984397.42536.245.camel@freebsd.org>
References:  <201801240851.w0O8pnDl008705@sdf.org> <0A86F03E-DB69-4DD0-B67B-E9BFBE3DC739@FreeBSD.org> <1516811808.42536.173.camel@freebsd.org> <201801250625.w0P6Pukm014218@sdf.org> <1516893199.42536.223.camel@freebsd.org> <201801260804.w0Q84t2f018882@sdf.org> <054FD748-B28B-4573-BF50-2E77D8C3C793@alogis.com> <1516984397.42536.245.camel@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Ian Lepore <ian@freebsd.org> wrote:

> On Fri, 2018-01-26 at 09:52 +0000, Holger Kipp wrote:
> > Dear Scott,
> > 
> > Am 26.01.2018 um 09:07 schrieb Scott Bennett <bennett@sdf.orgbennett@sdf.org>>:
> > 
> > cd /usr/src; PATH=/sbin:/bin:/usr/sbin:/usr/bin MAKE_CMD=make /usr/obj/usr/src/make.amd64/bmake -m /usr/src/share/mk -f Makefile.inc1 TARGET=amd64 TARGET_ARCH=amd64 MK_META_MODE=no cleandir
> > bmake: illegal argument to d option -- p
> > usage: make [-BPSXeiknpqrstv] [-C directory] [-D variable]
> > [-d flags] [-E variable] [-f makefile] [-I directory]
> > [-j max_jobs] [-m directory] [-V variable]
> > [variable=value] [target ...]
> > *** Error code 2
> > 
> > Stop.
> > make: stopped in /usr/src
> > hellas# exit
> > exit
> > 
> > Script done on Fri Jan 26 01:33:18 2018
> > 
> > 
> > ?????????????????????????????????Scott Bennett, Comm. ASMELG, CFIAG
> > 
> > This sound similar to an issue with make in 2013:
> > 
> > 20130613:
> > Some people report the following error after the switch to bmake:
> > 
> > make: illegal option -- J
> > usage: make [-BPSXeiknpqrstv] [-C directory] [-D variable]
> > ...
> > *** [buildworld] Error code 2
> > 
> > this likely due to an old instance of make in
> > ${MAKEPATH} (${MAKEOBJDIRPREFIX}${.CURDIR}/make.${MACHINE})
> > which src/Makefile will use that blindly, if it exists, so if
> > you see the above error:
> > 
> > rm -rf `make -V MAKEPATH`
> > 
> > should resolve it.
> > 
> > Can you check if you have an older version of make in your makepath and delete / rename it?
> > 
>
> Yep, it's definitely running a bad old version of make, and the thought
> that it's using /usr/obj/usr/src/make.amd64/bmake even though it's not

     Aack!!  "make buildworld" doesn't kill that??  Wow.  Why does it get
missed by buildworld (or cleanworld, if that's what buildworld uses)?  Should
that get a PR?  That program must have been sitting there for several *years*.
     The irony here is that I have long treated /usr/obj as disposable
(i.e., I don't normally bother to back it up anywhere) because a) a "make
buildworld buildkernel" will recreate all of it, and b) both of those targets
include huge sequences of deletions that wipe out all existing versions of
stuff that they will create.  Or so I have thought until now.  Apparently,
the handbook needs to be updated to reflect the need to

	/bin/rm -rf /usr/obj/usr

(or use newfs) before each buildworld just for safety's sake.

> up to date fits the symptoms. ?I'm a bit confused by the "rm -rf"

     Yes, it certainly does.  A quick newfs of the device where I keep
/usr/obj, and it seems to work perfectly now.  I'm almost certain that this
same obsolete binary was what put a sudden halt to my updates of 10.3-STABLE
back in early October 2016, as well.

> command at the end... when I do make -V MAKEPATH I get nothing, so the
> rm command would just be an error -- since that's from UPDATING in
> 2013, I'm thinking it may be out of date advice now.
>
> I think the right fix here is probably "rm -rf /usr/obj/*" followed by
> a make buildworld.
>
     Well, in this case, /usr/obj is a mount point for a UFS2 file system,
so it's less messy and much faster just to newfs it and mount it again.
     Anyway, thanks ever so much to Holger Kipp and Ian Lepore for finding
the problem, and thanks also to everyone else who tried.  The buildworld
(complete with ccache) has completed, and right now a kernel (GENERIC except
for SCHED_4BSD instead of the wretched SCHED_ULE) is busily being built.
Then I will try a much more customized kernel, but I no longer expect any
serious obstacles, thanks entirely to the help I got here on this list.


                                  Scott Bennett, Comm. ASMELG, CFIAG
**********************************************************************
* Internet:   bennett at sdf.org   *xor*   bennett at freeshell.org  *
*--------------------------------------------------------------------*
* "A well regulated and disciplined militia, is at all times a good  *
* objection to the introduction of that bane of all free governments *
* -- a standing army."                                               *
*    -- Gov. John Hancock, New York Journal, 28 January 1790         *
**********************************************************************



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201801280703.w0S73cUh025725>