Date: Mon, 21 Apr 2014 22:05:57 -0600 From: Ian Lepore <ian@FreeBSD.org> To: Glen Barber <gjb@FreeBSD.org> Cc: freebsd-current@FreeBSD.org, freebsd-ppc@FreeBSD.org, freebsd-ia64@FreeBSD.org Subject: Re: Build failures with high parallel make(1) jobs with GCC Message-ID: <1398139557.1124.396.camel@revolution.hippie.lan> In-Reply-To: <20140422032638.GN49791@glenbarber.us> References: <20140422025435.GL49791@glenbarber.us> <1398136182.1124.394.camel@revolution.hippie.lan> <20140422032124.GM49791@glenbarber.us> <20140422032638.GN49791@glenbarber.us>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
On Mon, 2014-04-21 at 23:26 -0400, Glen Barber wrote:
> On Mon, Apr 21, 2014 at 11:21:24PM -0400, Glen Barber wrote:
> > On Mon, Apr 21, 2014 at 09:09:42PM -0600, Ian Lepore wrote:
> > > > The last successful build for powerpc on head/ was April 8. But I am
> > > > having trouble tracking down what commits may (or may not) have
> > > > contributed to recent high-parallel build failures.
> > > >
> > >
> > > A couple weeks corresponds somewhat with the parallel subdir build
> > > changes (it's about 3 weeks now). Try this patch I cooked up today for
> > > $work, and in src/lib/Makefile add .WAIT (as if it were a directory
> > > name) between ${SUBDIR_ORDERED} and the rest of the directories.
> > >
> >
> > The patch fails to apply cleanly, but as far as I can tell, it is due to
> > whitespace.
> >
> > I'll hand-patch it, and report back.
> >
>
> Nope, I'm getting conflicts on revisions as far back as r251749.
>
> Glen
>
This one should work better. The lib/Makefile is included this time.
-- Ian
[-- Attachment #2 --]
Index: share/mk/bsd.subdir.mk
===================================================================
--- share/mk/bsd.subdir.mk (revision 264744)
+++ share/mk/bsd.subdir.mk (working copy)
@@ -45,7 +45,7 @@ distribute: .MAKE
_SUBDIR: .USE .MAKE
.if defined(SUBDIR) && !empty(SUBDIR) && !defined(NO_SUBDIR)
- @${_+_}set -e; for entry in ${SUBDIR}; do \
+ @${_+_}set -e; for entry in ${SUBDIR:N.WAIT}; do \
if test -d ${.CURDIR}/$${entry}.${MACHINE_ARCH}; then \
${ECHODIR} "===> ${DIRPRFX}$${entry}.${MACHINE_ARCH} (${.TARGET:realinstall=install})"; \
edir=$${entry}.${MACHINE_ARCH}; \
@@ -60,7 +60,7 @@ _SUBDIR: .USE .MAKE
done
.endif
-${SUBDIR}: .PHONY .MAKE
+${SUBDIR:N.WAIT}: .PHONY .MAKE
${_+_}@if test -d ${.TARGET}.${MACHINE_ARCH}; then \
cd ${.CURDIR}/${.TARGET}.${MACHINE_ARCH}; \
else \
@@ -68,12 +68,18 @@ _SUBDIR: .USE .MAKE
fi; \
${MAKE} all
+# Work around parsing of .if nested in .for by putting .WAIT string into a var.
+__wait= .WAIT
.for __target in all all-man checkdpadd clean cleandepend cleandir \
cleanilinks depend distribute lint maninstall manlint obj objlink \
realinstall regress tags ${SUBDIR_TARGETS}
.ifdef SUBDIR_PARALLEL
+__subdir_targets=
.for __dir in ${SUBDIR}
-${__target}: ${__target}_subdir_${__dir}
+.if ${__wait} == ${__dir}
+__subdir_targets+= .WAIT
+.else
+__subdir_targets+= ${__target}_subdir_${__dir}
${__target}_subdir_${__dir}: .MAKE
@${_+_}set -e; \
if test -d ${.CURDIR}/${__dir}.${MACHINE_ARCH}; then \
@@ -87,7 +93,9 @@ ${__target}_subdir_${__dir}: .MAKE
fi; \
${MAKE} ${__target:realinstall=install} \
DIRPRFX=${DIRPRFX}$$edir/
+.endif
.endfor
+${__target}: ${__subdir_targets}
.else
${__target}: _SUBDIR
.endif
Index: lib/Makefile
===================================================================
--- lib/Makefile (revision 264744)
+++ lib/Makefile (working copy)
@@ -62,6 +62,7 @@ SUBDIR_ORDERED+= libcom_err
.endif
SUBDIR= ${SUBDIR_ORDERED} \
+ .WAIT \
libalias \
libarchive \
${_libatm} \
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1398139557.1124.396.camel>
