From: Mark Dilger <hornschnorter@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Thomas Munro <thomas.munro@enterprisedb.com>
Cc: Pg Hackers <pgsql-hackers@postgresql.org>
Cc: Andrew Dunstan <andrew@dunslane.net>
Subject: Re: pg_recvlogical.c doesn't build with --disable-integer-datetimes
Date: Fri, 17 Feb 2017 11:51:27 -0800
Message-ID: <B6B21737-2182-4C6B-9B42-9AD9DFAC46D4@gmail.com> (raw)
In-Reply-To: <2664.1487360457@sss.pgh.pa.us>
References: <20170217181348.a5pnflupslw2t6xx@alvherre.pgsql>
<32279.1487355685@sss.pgh.pa.us>
<2664.1487360457@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
> On Feb 17, 2017, at 11:40 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> I wrote:
>> Yeah. I have longfin which is running Apple's clang, and is on a machine
>> that doesn't have much to do otherwise. I propose to turn on -Werror in
>> its configuration, and to configure a second critter on the same hardware
>> that runs with -Werror as well as --disable-integer-datetimes. Somebody
>> else should do similarly with a reasonably modern/stable gcc release.
>
> So I tried doing that by adding -Werror to longfin's CFLAGS environment,
> and it crashed and burned in configure. The most obvious problem is
> that we didn't bother to supply a prototype for does_int64_work() in
> the probes for 64-bit ints. However, even after fixing that, configure
> produces totally bollixed output because -Werror breaks many of its
> built-in tests. We could fix the int64 tests but we have no good way of
> fixing the built-in tests.
>
> AFAICS, if you want to build with -Werror, you have to configure without
> that and then inject it afterwards. I wonder how people who use -Werror
> are handling that. Is it possible to do at all in a buildfarm critter?
I ran into the same problem when adding -Werror, and fixed it as follows:
diff --git a/src/Makefile.global.in b/src/Makefile.global.inindex d39d6ca..96fbc60 100644--- a/src/Makefile.global.in+++ b/src/Makefile.global.in@@ -240,7 +240,7 @@ endif # not PGXS
CC = @CC@
GCC = @GCC@
SUN_STUDIO_CC = @SUN_STUDIO_CC@
-CFLAGS = @CFLAGS@+CFLAGS = @CFLAGS@ -Werror
CFLAGS_VECTOR = @CFLAGS_VECTOR@
CFLAGS_SSE42 = @CFLAGS_SSE42@
That adds -Werror to the compilation of sources but not to the compilation
of configure test programs. I'd be happy to hear if anybody has a cleaner
way of doing this.
Mark Dilger
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: hornschnorter@gmail.com, tgl@sss.pgh.pa.us, alvherre@2ndquadrant.com, thomas.munro@enterprisedb.com, andrew@dunslane.net
Subject: Re: pg_recvlogical.c doesn't build with --disable-integer-datetimes
In-Reply-To: <B6B21737-2182-4C6B-9B42-9AD9DFAC46D4@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox