Re: initdb issue on 64-bit Windows - (Was: [pgsql-packagers] PG 9.6beta2 tarballs are ready) - Mailing list pgsql-hackers

From Craig Ringer
Subject Re: initdb issue on 64-bit Windows - (Was: [pgsql-packagers] PG 9.6beta2 tarballs are ready)
Date
Msg-id CAMsr+YEwoK4KkDOrqzmnpjtzVd6HMCo6kW8DZy7UbdcHJM7+9g@mail.gmail.com
Whole thread Raw
In response to Re: initdb issue on 64-bit Windows - (Was: [pgsql-packagers] PG 9.6beta2 tarballs are ready)  (Michael Paquier <michael.paquier@gmail.com>)
Responses Re: initdb issue on 64-bit Windows - (Was: [pgsql-packagers] PG 9.6beta2 tarballs are ready)  (Craig Ringer <craig@2ndquadrant.com>)
List pgsql-hackers


On 24 June 2016 at 12:31, Michael Paquier <michael.paquier@gmail.com> wrote:
On Fri, Jun 24, 2016 at 1:28 PM, Craig Ringer <craig@2ndquadrant.com> wrote:
> Given that it's only been seen in VS 2013, it's particularly odd that it's
> not biting woodlouse.
>
> I'd like more details from those whose installs are crashing. What exact
> vcvars env did you run under, with which exact cl.exe version?

Which OS did you use for the compilation? I don't think that this
matters much but woodloose is using Win7.



I'll have to wait for Haroon for that info for the crashing builds he did, but I've now reproduced it with:

Windows server 2012 R2, VS 2013 Community Update 5, cross compile tools for x86 to amd64.  cl 18.00.40629 for x64, env:

  %comspec% /k  ""C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x86_amd64"

"where cl" reports

  C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\x86_amd64\cl.exe

Note that cross compilation is a typical configuration on Windows, where you routinely use 32bit x86 compilers to build 64bit code, except in the newest SDKs.

I see the same symptoms, with the segfault.

This host is a clean install, an AWS instance created for the purpose.



It looks like woodlouse probably runs an older VS2013 and uses the native x64 toolchain; its env includes:

  C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\VC\\BIN\\amd64

and does not have x86_amd64 in it. 




BTW, I suggested to Haroon that he clone beta2 from git, then do a git-bisect between beta1 (works) and beta2 (fails) to see if he can identify the commit that causes things to start failing. I don't know how far he got with that yesterday.


By comparison, I had no problems on the same host with VS Community 2015, cl 19.00.23918, env "VS2015 x64 Native Tools Command Prompt":

   %comspec% /k ""C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"" amd64



On a side note I'm unable to build with vs2013 community u5 native tools ( for some reason. Link errors, unresolved external symbol _ischartype_l . cl 18.00.42629 for x64, env:

   %comspec% /k  ""C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" amd64"

"where cl" reports:

   C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\amd64\cl.exe








--
 Craig Ringer                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Missing checks when malloc returns NULL...
Next
From: Craig Ringer
Date:
Subject: Re: initdb issue on 64-bit Windows - (Was: [pgsql-packagers] PG 9.6beta2 tarballs are ready)