pg_locale compilation error with Visual Studio 2017

From: Sandeep Thakkar <sandeep(dot)thakkar(at)enterprisedb(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: pg_locale compilation error with Visual Studio 2017
Date: 2018-05-11 13:18:12
Message-ID: CANFyU94EugF4t753yUUgtxopv--kpw22U4jJOOUd3mTHqimHqw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

I was building Postgres v10.3 sources on Windows x64-bit with Windows 10
SDK and v141 toolset (VS 2017) and it gives me the following error:

d:\pginstaller.auto\postgres.windows-x64\src\backend\utils\adt\*pg_locale.c(932):
error C2037: left of 'locale_name' specifies undefined struct/union
'__crt_locale_data'*
*[D:\pginstaller.auto\postgres.windows-x64\postgres.vcxproj]^M*

d:\pginstaller.auto\postgres.windows-x64\src\backend\utils\adt\*pg_locale.c(933):
error C2198: 'wchar2char': too few arguments for call
[D:\pginstaller.auto\postgres.windows-x64\postgres.vcxproj]^M*

I found the same error was raised by someone in pgsql-general lists but
don't see the submitted patch was committed. Here is the discussion link
https://www.postgresql.org/message-id/CAL5LfdQdxt9u1W4oJmELybVBJE3X4rtNrNp62NNFw9n%3DXd-wTQ%40mail.gmail.com

The master branch also fails to compile with the same errors plus some
additional errors. Is it that Visual Studio 2017 is not completely
supported as of now and the latest version that should be used is VS 2015?
Or should I be using the older Windows SDK and toolset? I tried with
Windows 8.1 as well but it had some other issues.

Thanks.

--
Sandeep Thakkar

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Hartmut Holzgraefe 2018-05-11 13:21:08 Re: Having query cache in core
Previous Message Etsuro Fujita 2018-05-11 13:01:09 Re: Expression errors with "FOR UPDATE" and postgres_fdw with partition wise join enabled.