Re: BUG #15525: Build failures when compiling Postgres with Make parallelization

From: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: jack(at)jackkelly(dot)name, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #15525: Build failures when compiling Postgres with Make parallelization
Date: 2018-11-29 06:25:50
Message-ID: CAEepm=3WXu0Ke8AB3i9Z8EdKZ_RajcKrkwj1GTkgcdqdaafjqw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Thu, Nov 29, 2018 at 4:25 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com> writes:
> > Nice detective work. Possibly because libtool/ranlib whacks it with
> > utime(), which only knows about time_t, here:
> > https://github.com/opensource-apple/cctools/blob/master/misc/libtool.c#L2779
>
> I suspected as much, but hadn't gone looking for the code. I wonder
> why it bothers with any of that... it's certainly not documented
> behavior per the man page.

As for why Apple make doesn't have the problem, I think it's simply
that high resolution timestamp support for Darwin came along ~5 years
after Apple forked/froze their make due to the license change. Here's
the commit:

https://github.com/mirror/make/commit/bfc3e1ca7c0c1504c9873ee1baacce73330b037e

As for what could be done about it, it seems like we (or the Nix
project, in a local patch) could declare individual targets to have
.LOW_RESOLUTION_TIME:

https://www.gnu.org/software/make/manual/html_node/Special-Targets.html

That doesn't seem any better than using "touch" to make a better mtime
though. I'm kinda surprised that the Nix project doesn't have this
problem on other projects, though, if they're always using a modern
GNU make. What are they doing differently?

--
Thomas Munro
http://www.enterprisedb.com

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Nguyen Thi Nhu Thuy 2018-11-29 08:40:00 [SUPPORT] How to calculate size of tables which are saved on disk?
Previous Message Tom Lane 2018-11-29 03:25:19 Re: BUG #15525: Build failures when compiling Postgres with Make parallelization