Re: [PATCH] make -jN check fails / unset MAKEFLAGS in pg_regress.c - Mailing list pgsql-hackers

From Robert Haas
Subject Re: [PATCH] make -jN check fails / unset MAKEFLAGS in pg_regress.c
Date
Msg-id CA+TgmoZHwtLRExhv6gF=ov3iHY-0-dtg-pdr15OTdWrqUHEbxw@mail.gmail.com
Whole thread Raw
In response to [PATCH] make -jN check fails / unset MAKEFLAGS in pg_regress.c  (Andres Freund <andres@2ndquadrant.com>)
Responses Re: [PATCH] make -jN check fails / unset MAKEFLAGS in pg_regress.c
List pgsql-hackers
On Thu, Nov 29, 2012 at 8:50 AM, Andres Freund <andres@2ndquadrant.com> wrote:
> Hi,
>
> Currently "make -jN check" fails during "creating temporary installation"
> with:
> make[1]: *** read jobs pipe: Invalid argument.  Stop.
> make[1]: *** Waiting for unfinished jobs....
> make[2]: warning: jobserver unavailable: using -j1.  Add `+' to parent make rule.
> in install.log.
>
> This is due to pg_regress invoking make while being invoked by make
> itself. gnu make internally sets the MAKEFLAGS environment variable to
> remember arguments. The problem in this case is that it contains
> "--jobserver-fds=4,5" which makes the pg_regress invoked make think its
> running as a make child process.
>
> Now the problem obviously can be worked around by using "make -jN &&
> make check" instead of "make -j16 check" but I several times now have
> spent time trying to figure out what I broke so it sees sensible to
> "fix" this.
>
> Any arguments against doing so?
>
> The attached patch also resets the MAKELEVEL environment variable for
> good measure. I haven't seen any indication that its needed, but it
> feelds safer ;)

Seems reasonable to me.

But shouldn't the comment in the patch say "to be certain the child
DOESN'T notice the make above us"?

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [PATCH] Patch to fix a crash of psql
Next
From: Bruce Momjian
Date:
Subject: Re: initdb.c::main() too large