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

From Jesse Zhang
Subject Re: Fix for configure error in 9.5/9.6 on macOS 11.0 Big Sur
Date
Msg-id CAGf+fX4fiPZXB_cAFpy4t91yk+tB-cB04KS0ck0ex97Hua9mXw@mail.gmail.com
Whole thread Raw
In response to Re: Fix for configure error in 9.5/9.6 on macOS 11.0 Big Sur  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Responses Re: Fix for configure error in 9.5/9.6 on macOS 11.0 Big Sur  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Re: Fix for configure error in 9.5/9.6 on macOS 11.0 Big Sur  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
List pgsql-hackers
Hi Peter,

Yeah it's funny I got this immediately after upgrading to Big Sur (beta
5). I found commit 1c0cf52b39ca3 but couldn't quite find the mailing
list thread on it from 4 years ago (it lists Heikki and Thomas Munro as
reviewers). Was it prompted by a similar error you encountered?

On Tue, Aug 25, 2020 at 6:57 AM Peter Eisentraut
<peter.eisentraut@2ndquadrant.com> wrote:
>
> On 2020-08-02 23:18, Tom Lane wrote:
> > Thomas Gilligan <thomas.gilligan@icloud.com> writes:
> >> Under the next version of macOS (11.0 unreleased beta 3), configuring Postgres 9.5 and 9.6 fails with
> >
> >>> checking test program... ok
> >>> checking whether long int is 64 bits... no
> >>> checking whether long long int is 64 bits... no
> >>> configure: error: Cannot find a working 64-bit integer type.
> >
> > Hm, could we see the config.log output for this?  I'm not 100% convinced
> > that you've diagnosed the problem accurately, because it'd imply that
> > Apple made some fundamentally incompatible changes in libc, which
> > seems like stirring up trouble for nothing.
>
> It looks like the new compiler errors out on calling undeclared
> functions.  Might be good to see config.log to confirm this.

Yeah here's an excerpt from config.log verbatim (I'm not wrapping the
lines):

| configure:13802: checking whether long int is 64 bits
| configure:13860: ccache clang -o conftest -Wall -Wmissing-prototypes
-Wpointer-arith -Wdeclaration-after-statement -Wendif-labels
-Wmissing-format-attribute -Wformat-security -fno-strict-aliasing
-fwrapv -Wno-unused-command-line-argument -g -O0     conftest.c -lz
-lreadline -lm  >&5
| conftest.c:169:5: warning: no previous prototype for function
'does_int64_work' [-Wmissing-prototypes]
| int does_int64_work()
|     ^
| conftest.c:169:1: note: declare 'static' if the function is not
intended to be used outside of this translation unit
| int does_int64_work()
| ^
| static
| conftest.c:183:1: warning: type specifier missing, defaults to 'int'
[-Wimplicit-int]
| main() {
| ^
| conftest.c:184:3: error: implicitly declaring library function
'exit' with type 'void (int) __attribute__((noreturn))'
[-Werror,-Wimplicit-function-declaration]
|   exit(! does_int64_work());
|   ^
| conftest.c:184:3: note: include the header <stdlib.h> or explicitly
provide a declaration for 'exit'
| 2 warnings and 1 error generated.

Cheers,
Jesse



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Allow continuations in "pg_hba.conf" files
Next
From: Alexey Kondratov
Date:
Subject: Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace on the fly