Re: VPATH build from a tarball fails with some gmake versions

From: Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: VPATH build from a tarball fails with some gmake versions
Date: 2018-03-01 00:49:52
Message-ID: CAA8=A7_QAyr+uKb-4ZmrM9T=r-JHaf6=XgyYvQnSUi1YtoPi4w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Mar 1, 2018 at 9:24 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> I tried doing a VPATH build referencing a source directory that I'd distclean'd
> but not maintainer-clean'd, which should simulate the case of a VPATH
> build from a tarball. I was quite surprised that it fell over:
>
> ...
> gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -g -O2 -I. -I/home/postgres/pgsql/src/bin/psql -I/home/postgres/pgsql/src/interfaces/libpq -I../../../src/include -I/home/postgres/pgsql/src/include -D_GNU_SOURCE -c -o sql_help.o sql_help.c
> gcc: sql_help.c: No such file or directory
> gcc: no input files
> make[3]: *** [sql_help.o] Error 1
> make[3]: Leaving directory `/home/postgres/buildroot/src/bin/psql'
>
> gmake should be generating a path to sql_help.c, since that exists
> in the corresponding source directory, but it does not. I can reproduce
> this on RHEL6 with make-3.81-23, but not on Fedora 26 with make-4.2.1-2,
> and (curiously) also not on High Sierra with Apple's copy of make 3.81.
> I wonder how many other people see it.
>
> The attached patch seems to fix it, indicating that there's something
> about the rules relating sql_help.c and sql_help.h that is confusing
> make, such that turning sql_help.c into the primary target for the
> create_help rule removes the confusion.
>

Very odd. I can't reproduce it on Centos6 with make 3.81.23 and a
downloaded tarball.

cheers

andrew

--
Andrew Dunstan https://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Craig Ringer 2018-03-01 00:54:58 Re: row filtering for logical replication
Previous Message David Fetter 2018-03-01 00:47:52 Re: row filtering for logical replication