Thread: Cannot find a working 64-bit integer type

Cannot find a working 64-bit integer type

From
"Igal @ Lucee.org"
Date:
Hi,<br /><br /> I'm trying to build Postgres with GCC 5.3.0 on Windows (a-la MinGW-64) and when I ran "configure" I
receivedthe following error:<br /> "configure: error: Cannot find a working 64-bit integer type."<br /><br /> The
config.logfile can be seen at <br /><a class="moz-txt-link-freetext"
href="https://gist.github.com/TwentyOneSolutions/8c225f66b9c0d4434871#file-config-201601171200-log-L21971">https://gist.github.com/TwentyOneSolutions/8c225f66b9c0d4434871#file-config-201601171200-log-L21971</a><br
/><br/> A google search finds this thread from 4 years ago, the IIUC explains that the issue is with newer GCC
versions.<br/><br /> Any ideas on how I can overcome this issue?<br /><br /> Thanks!<br /><br /><div
class="moz-signature">--<br /><p>Igal Sapir <br /> Lucee Core Developer <br /><a
href="http://lucee.org/">Lucee.org</a></div>

Re: Cannot find a working 64-bit integer type

From
"Igal @ Lucee.org"
Date:
UPDATE: when I ran: configure --without-zlib --enable-debug CFLAGS="-Wno-cpp"<br /><br /> I did not get an error from
configure(though I get an error from "make" but that's another issue)<br /><br /> I'm not sure what I'm "losing" by
passingthe "no-cpp" compiler flag?<br /><br /> also, the thread I mentioned in the previous email can be found at <a
class="moz-txt-link-freetext"
href="http://postgresql.nabble.com/Setting-Werror-in-CFLAGS-td5118384.html">http://postgresql.nabble.com/Setting-Werror-in-CFLAGS-td5118384.html</a><br
/><br/><div class="moz-signature"><p>Igal Sapir <br /> Lucee Core Developer <br /><a
href="http://lucee.org/">Lucee.org</a></div><divclass="moz-cite-prefix">On 1/17/2016 12:07 PM, Igal @ Lucee.org
wrote:<br/></div><blockquote cite="mid:569BF49E.6030308@lucee.org" type="cite"> Hi,<br /><br /> I'm trying to build
Postgreswith GCC 5.3.0 on Windows (a-la MinGW-64) and when I ran "configure" I received the following error:<br />
"configure:error: Cannot find a working 64-bit integer type."<br /><br /> The config.log file can be seen at <br /><a
class="moz-txt-link-freetext"
href="https://gist.github.com/TwentyOneSolutions/8c225f66b9c0d4434871#file-config-201601171200-log-L21971"
moz-do-not-send="true">https://gist.github.com/TwentyOneSolutions/8c225f66b9c0d4434871#file-config-201601171200-log-L21971</a><br
/><br/> A google search finds this thread from 4 years ago, the IIUC explains that the issue is with newer GCC
versions.<br/><br /> Any ideas on how I can overcome this issue?<br /><br /> Thanks!<br /><br /><div
class="moz-signature">--<br /><p>Igal Sapir <br /> Lucee Core Developer <br /><a href="http://lucee.org/"
moz-do-not-send="true">Lucee.org</a></div></blockquote><br/> 

Re: Cannot find a working 64-bit integer type

From
Robert Haas
Date:
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



Re: Cannot find a working 64-bit integer type

From
Tom Lane
Date:
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



Re: Cannot find a working 64-bit integer type

From
"Igal @ Lucee.org"
Date:
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




Re: Cannot find a working 64-bit integer type

From
"Igal @ Lucee.org"
Date:
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
>




Re: Cannot find a working 64-bit integer type

From
Robert Haas
Date:
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