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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jesse Zhang <sbjesse(at)gmail(dot)com>
Cc: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, 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-03 17:36:58
Message-ID: 640573.1599154618@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Jesse Zhang <sbjesse(at)gmail(dot)com> writes:
>> Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> writes:
>>> Where did the -Werror come from?

> If you noticed the full invocation of clang, you'd notice that Werror is
> nowhere on the command line, even though the error message suggests
> otherwise. I think this is a behavior from the new AppleClang,

Hmph. If you explicitly say -Wno-error, does the error drop back down
to being a warning?

> I've heard reports of the same under the latest Xcode 12 on macOS
> Catalina, but I don't have my hands on such an env.

The latest thing available to the unwashed masses seems to be
Xcode 11.7 with

$ clang --version
Apple clang version 11.0.3 (clang-1103.0.32.62)

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.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2020-09-03 17:40:07 Re: Get memory contexts of an arbitrary backend process
Previous Message Tom Lane 2020-09-03 17:18:17 Re: Maximum password length