Cannot find a working 64-bit integer type

Started by Igal @ Lucee.orgalmost 10 years ago7 messages
#1Igal @ Lucee.org
igal@lucee.org

Hi,

I'm trying to build Postgres with GCC 5.3.0 on Windows (a-la MinGW-64)
and when I ran "configure" I received the following error:
"configure: error: Cannot find a working 64-bit integer type."

The config.log file can be seen at
https://gist.github.com/TwentyOneSolutions/8c225f66b9c0d4434871#file-config-201601171200-log-L21971

A google search finds this thread from 4 years ago, the IIUC explains
that the issue is with newer GCC versions.

Any ideas on how I can overcome this issue?

Thanks!

--

Igal Sapir
Lucee Core Developer
Lucee.org <http://lucee.org/&gt;

#2Igal @ Lucee.org
igal@lucee.org
In reply to: Igal @ Lucee.org (#1)
Re: Cannot find a working 64-bit integer type

UPDATE: when I ran: configure --without-zlib --enable-debug
CFLAGS="-Wno-cpp"

I did not get an error from configure (though I get an error from "make"
but that's another issue)

I'm not sure what I'm "losing" by passing the "no-cpp" compiler flag?

also, the thread I mentioned in the previous email can be found at
http://postgresql.nabble.com/Setting-Werror-in-CFLAGS-td5118384.html

Igal Sapir
Lucee Core Developer
Lucee.org <http://lucee.org/&gt;

Show quoted text

On 1/17/2016 12:07 PM, Igal @ Lucee.org wrote:

Hi,

I'm trying to build Postgres with GCC 5.3.0 on Windows (a-la MinGW-64)
and when I ran "configure" I received the following error:
"configure: error: Cannot find a working 64-bit integer type."

The config.log file can be seen at
https://gist.github.com/TwentyOneSolutions/8c225f66b9c0d4434871#file-config-201601171200-log-L21971

A google search finds this thread from 4 years ago, the IIUC explains
that the issue is with newer GCC versions.

Any ideas on how I can overcome this issue?

Thanks!

--

Igal Sapir
Lucee Core Developer
Lucee.org <http://lucee.org/&gt;

#3Robert Haas
robertmhaas@gmail.com
In reply to: Igal @ Lucee.org (#2)
Re: Cannot find a working 64-bit integer type

On Sun, Jan 17, 2016 at 5:45 PM, Igal @ Lucee.org <igal@lucee.org> wrote:

UPDATE: when I ran: configure --without-zlib --enable-debug
CFLAGS="-Wno-cpp"

I did not get an error from configure (though I get an error from "make" but
that's another issue)

I'm not sure what I'm "losing" by passing the "no-cpp" compiler flag?

According to 'man gcc':

-Wno-cpp
(C, Objective-C, C++, Objective-C++ and Fortran only)

Suppress warning messages emitted by "#warning" directives.

So apparently on your system configure fails the test for a 64-bit
integer type because a #warning is emitted, and compiling with
-Wno-cpp gets rid of that (probably without breaking anything else).
The relevant portion of config.log seems to be this:

configure:13285: gcc -o conftest.exe -Wall -Wmissing-prototypes
-Wpointer-arith -Wdeclaration-after-statement -Wendif-labels
-Wmissing-format-attribute -Wformat-security -fno-strict-aliasing
-fwrapv -fexcess-precision=standard -O2
-I/home/Admin/sources/postgresql-9.5.0/src/include/port/win32
-DEXEC_BACKEND -Wl,--allow-multiple-definition
-Wl,--disable-auto-import conftest.c -lz -lws2_32 -lm >&5
conftest.c:106:5: warning: no previous prototype for 'does_int64_work'
[-Wmissing-prototypes] int does_int64_work()
conftest.c:120:1: warning: return type defaults to 'int' [-Wimplicit-int]
conftest.c: In function 'main':
conftest.c:121:3: warning: implicit declaration of function 'exit'
[-Wimplicit-function-declaration]
conftest.c:121:3: warning: incompatible implicit declaration of
built-in function 'exit'
conftest.c:121:3: note: include '<stdlib.h>' or provide a declaration of 'exit'
C:/Apps/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
reopening conftest.exe: Permission denied
C:/Apps/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
final link failed: Permission denied collect2.exe: error: ld returned
1 exit status
configure:13285: $? = 1 configure: program exited with status 1

I'm a little confused as to why -Wno-cpp fixes any of that, though.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#4Tom Lane
tgl@sss.pgh.pa.us
In reply to: Robert Haas (#3)
Re: Cannot find a working 64-bit integer type

Robert Haas <robertmhaas@gmail.com> writes:

The relevant portion of config.log seems to be this:

configure:13285: gcc -o conftest.exe -Wall -Wmissing-prototypes
-Wpointer-arith -Wdeclaration-after-statement -Wendif-labels
-Wmissing-format-attribute -Wformat-security -fno-strict-aliasing
-fwrapv -fexcess-precision=standard -O2
-I/home/Admin/sources/postgresql-9.5.0/src/include/port/win32
-DEXEC_BACKEND -Wl,--allow-multiple-definition
-Wl,--disable-auto-import conftest.c -lz -lws2_32 -lm >&5
conftest.c:106:5: warning: no previous prototype for 'does_int64_work'
[-Wmissing-prototypes] int does_int64_work()
conftest.c:120:1: warning: return type defaults to 'int' [-Wimplicit-int]
conftest.c: In function 'main':
conftest.c:121:3: warning: implicit declaration of function 'exit'
[-Wimplicit-function-declaration]
conftest.c:121:3: warning: incompatible implicit declaration of
built-in function 'exit'
conftest.c:121:3: note: include '<stdlib.h>' or provide a declaration of 'exit'
C:/Apps/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
reopening conftest.exe: Permission denied
C:/Apps/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
final link failed: Permission denied collect2.exe: error: ld returned
1 exit status
configure:13285: $? = 1 configure: program exited with status 1

I do not think configure pays attention to mere warnings for this type of
test. The real problem here seems to be the "permission denied" errors,
which to me reek of broken Windows antivirus software. (As far as I'm
aware, the word "broken" is redundant in that phrase.)

I'm a little confused as to why -Wno-cpp fixes any of that, though.

Most likely, it's pure chance that a retry worked. Or if it's repeatable,
maybe no-cpp changes the compiler's file access patterns enough that
there's no longer a false trip of the AV check.

Short answer is that I wonder how much of the OP's multiple problems
are being caused by AV bugs.

regards, tom lane

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#5Igal @ Lucee.org
igal@lucee.org
In reply to: Tom Lane (#4)
Re: Cannot find a working 64-bit integer type

On 1/18/2016 11:09 AM, Tom Lane wrote:

Robert Haas <robertmhaas@gmail.com> writes:

The relevant portion of config.log seems to be this:

I do not think configure pays attention to mere warnings for this type
of test. The real problem here seems to be the "permission denied"
errors, which to me reek of broken Windows antivirus software. (As far
as I'm aware, the word "broken" is redundant in that phrase.)

Thank you both for looking into this. The only A/V-type software that I
have running is the "Microsoft Security Essentials".

I'm a little confused as to why -Wno-cpp fixes any of that, though.

Most likely, it's pure chance that a retry worked. Or if it's repeatable,
maybe no-cpp changes the compiler's file access patterns enough that
there's no longer a false trip of the AV check.

Short answer is that I wonder how much of the OP's multiple problems
are being caused by AV bugs.

I did not make any changes other than adding the compiler flags between
those two runs (nor afterwards).

The reason that I decided to try to add the -Wno-error flag was that I
searched the net for the error message, and found this
thread from 4 years ago:
http://postgresql.nabble.com/Setting-Werror-in-CFLAGS-td5118384.html --
which showed
a similar error message and a play of the compiler flags.

I will try to run both forms again and report whether it is repeatable.

Thanks again,

Igal

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#6Igal @ Lucee.org
igal@lucee.org
In reply to: Igal @ Lucee.org (#5)
Re: Cannot find a working 64-bit integer type

It looks like Tom is correct.

I added the directory tree to an exclude list of Microsoft Security
Essentials and
ran `configure` without any flags and it completed successfully this time.

Thank you both for your time and expertise,

Igal

On 1/18/2016 11:23 AM, Igal @ Lucee.org wrote:

On 1/18/2016 11:09 AM, Tom Lane wrote:

Robert Haas <robertmhaas@gmail.com> writes:

The relevant portion of config.log seems to be this:

I do not think configure pays attention to mere warnings for this
type of test. The real problem here seems to be the "permission
denied" errors, which to me reek of broken Windows antivirus
software. (As far as I'm aware, the word "broken" is redundant in
that phrase.)

Thank you both for looking into this. The only A/V-type software that
I have running is the "Microsoft Security Essentials".

I'm a little confused as to why -Wno-cpp fixes any of that, though.

Most likely, it's pure chance that a retry worked. Or if it's
repeatable,
maybe no-cpp changes the compiler's file access patterns enough that
there's no longer a false trip of the AV check.

Short answer is that I wonder how much of the OP's multiple problems
are being caused by AV bugs.

I did not make any changes other than adding the compiler flags
between those two runs (nor afterwards).

The reason that I decided to try to add the -Wno-error flag was that I
searched the net for the error message, and found this
thread from 4 years ago:
http://postgresql.nabble.com/Setting-Werror-in-CFLAGS-td5118384.html
-- which showed
a similar error message and a play of the compiler flags.

I will try to run both forms again and report whether it is repeatable.

Thanks again,

Igal

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#7Robert Haas
robertmhaas@gmail.com
In reply to: Igal @ Lucee.org (#6)
Re: Cannot find a working 64-bit integer type

On Mon, Jan 18, 2016 at 2:42 PM, Igal @ Lucee.org <igal@lucee.org> wrote:

It looks like Tom is correct.

I added the directory tree to an exclude list of Microsoft Security
Essentials and
ran `configure` without any flags and it completed successfully this time.

Cool.

Man, Windows anti-virus software is a real nuisance.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers