Re: Fix for configure error in 9.5/9.6 on macOS 11.0 Big Sur - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Fix for configure error in 9.5/9.6 on macOS 11.0 Big Sur
Date
Msg-id 640573.1599154618@sss.pgh.pa.us
Whole thread Raw
In response to Re: Fix for configure error in 9.5/9.6 on macOS 11.0 Big Sur  (Jesse Zhang <sbjesse@gmail.com>)
Responses Re: Fix for configure error in 9.5/9.6 on macOS 11.0 Big Sur  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Re: Fix for configure error in 9.5/9.6 on macOS 11.0 Big Sur  (Jesse Zhang <sbjesse@gmail.com>)
List pgsql-hackers
Jesse Zhang <sbjesse@gmail.com> writes:
>> Peter Eisentraut <peter.eisentraut@2ndquadrant.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



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Maximum password length
Next
From: Tom Lane
Date:
Subject: Re: Get memory contexts of an arbitrary backend process