Re: Fix for configure error in 9.5/9.6 on macOS 11.0 Big Sur

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Jesse Zhang <sbjesse(at)gmail(dot)com>
Cc: Thomas Gilligan <thomas(dot)gilligan(at)icloud(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Fix for configure error in 9.5/9.6 on macOS 11.0 Big Sur
Date: 2020-09-04 05:46:52
Message-ID: 9b4bb5da-9ed9-4078-a16b-4755f0d578a4@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2020-09-03 19:36, Tom Lane wrote:
> At least, that's what I got when I reinstalled Xcode just now on
> my Catalina machine. It does not exhibit this behavior. I see
>
> $ clang -c c.c
> c.c:1:14: warning: implicitly declaring library function 'exit' with type 'void
> (int) __attribute__((noreturn))' [-Wimplicit-function-declaration]
> int main() { exit(0); }
> ^
> c.c:1:14: note: include the header <stdlib.h> or explicitly provide a
> declaration for 'exit'
> 1 warning generated.
>
> and PG configure and build goes through just fine.
>
> Smells like an Apple bug from here. Surely they're not expecting
> that anyone will appreciate -Werror suddenly being the default.

IIRC, calling an undeclared function is (or may be?) an error in C99.
So perhaps the implicit -Werror only applies to this particular warning
class.

I suppose backpatching the patch that fixed this would be appropriate.

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2020-09-04 05:52:20 Re: Fix for configure error in 9.5/9.6 on macOS 11.0 Big Sur
Previous Message Fujii Masao 2020-09-04 04:53:24 Re: history file on replica and double switchover