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 03:14:09
Message-ID: CAEepm=3wHjf9ZfekMq5x0qs_r1XBd0YXTrhoZMbmDx-xE8NXwA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Thu, Nov 29, 2018 at 3:32 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> ... and after contemplating my navel for awhile more, I believe
> I understand the problem. APFS has sub-second file timestamp resolution,
> which doesn't seem to be exposed in Apple's version of "ls", but you can
> find it out from stat(2). And what I'm seeing is that "ranlib" is
> truncating the timestamp of its output file to a one-second boundary:
>
> $ ls -ltr
> ...
> -rw-r--r-- 1 tgl admin 25888 Nov 2 11:37 interval.c
> -rw-r--r-- 1 tgl admin 20692 Nov 2 11:37 timestamp.c
> -rw-r--r-- 1 tgl admin 210640 Nov 28 21:04 libpgtypes.a
> -rw-r--r-- 1 tgl admin 43232 Nov 28 21:04 numeric.o
> -rw-r--r-- 1 tgl admin 18688 Nov 28 21:04 datetime.o
> -rw-r--r-- 1 tgl admin 5916 Nov 28 21:04 common.o
> -rw-r--r-- 1 tgl admin 76584 Nov 28 21:04 dt_common.o
> ...
>
> $ ~/a.out numeric.o
> mtime - Actual: 1543457047.155932
> atime - Actual: 1543457047.651358
> $ ~/a.out libpgtypes.a
> mtime - Actual: 1543457047.000000
> atime - Actual: 1543457047.000000

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

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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2018-11-29 03:25:19 Re: BUG #15525: Build failures when compiling Postgres with Make parallelization
Previous Message Tom Lane 2018-11-29 02:31:58 Re: BUG #15525: Build failures when compiling Postgres with Make parallelization