./configure error: Cannot find a working 64-bit integer type

From: Дилян Палаузов <dpa-postgres(at)aegee(dot)org>
To: PostgreSQL Bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: ./configure error: Cannot find a working 64-bit integer type
Date: 2017-10-10 14:31:40
Message-ID: 0f85489c-ea78-ca41-b2d8-5a3b625de248@aegee.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hello,

unless the patch below is applied ./configure prints:

STDOUT checking test program... ok
STDOUT checking whether long int is 64 bits... no
STDOUT checking whether long long int is 64 bits... no
STDERR configure: error: Cannot find a working 64-bit integer type.

when gcc 8.0.0 20171006 is used, "unset CFLAGS" is removed from configure(.in), having in config.site:

CFLAGS="-pipe -Werror -Wall -Wextra -O3 -fno-fat-lto-objects -flto"
LDFLAGS="-Wl,-O1,-s -flto=12"

and calling
PYTHON=/usr/local/bin/python3 ./configure --prefix=/usr/local --with-gssapi --with-openssl --with-libxml --with-libxslt --with-python --enable-cassert

config.log contains then:

configure:14132: checking whether long long int is 64 bits
configure:14192: gcc -o conftest -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-label
conftest.c:154:5: error: no previous prototype for 'does_int64_work' [-Werror=missing-prototypes]
int does_int64_work(void)
^~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
configure:14192: $? = 1
configure: program exited with status 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "PostgreSQL"
| #define PACKAGE_TARNAME "postgresql"
[...]
| */
| ac_int64 a = 20000001;
| ac_int64 b = 40000005;
| int does_int64_work()
| {
| ac_int64 c,d;
|

diff --git a/config/c-compiler.m4 b/config/c-compiler.m4
index 6dcc790..dfaa273 100644
--- a/config/c-compiler.m4
+++ b/config/c-compiler.m4
@@ -56,8 +56,8 @@ AC_CACHE_CHECK([whether $1 is 64 bits], [Ac_cachevar],
*/
ac_int64 a = 20000001;
ac_int64 b = 40000005;
-
-int does_int64_work()
+int does_int64_work(void);
+int does_int64_work(void)
{
ac_int64 c,d;

Regards
Дилян

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2017-10-10 14:54:26 Re: BUG #14830: Missed NOTIFications, PostgreSQL 9.1.24
Previous Message Tom Lane 2017-10-10 14:19:48 Re: BUG #14830: Missed NOTIFications, PostgreSQL 9.1.24