BUG #17681: Building the REL_12_13 source in Visual Studio 2013 fails.

From: PG Bug reporting form <noreply(at)postgresql(dot)org>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Cc: higuchi(dot)daisuke(at)fujitsu(dot)com
Subject: BUG #17681: Building the REL_12_13 source in Visual Studio 2013 fails.
Date: 2022-11-09 06:08:36
Message-ID: 17681-485ba2ec13e7f392@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 17681
Logged by: daisuke higuchi
Email address: higuchi(dot)daisuke(at)fujitsu(dot)com
PostgreSQL version: Unsupported/Unknown
Operating system: Windows 10
Description:

Hi,

I tried to build using the codes of REL_12_13 in the following environment,
but it failed.
In the same environment, building with code with REL_12_12 succeeds.

- Windows 10
- Visual Studio 2013

I know I'm using an older version of Visual Studio, but according to the
manual,
I believe it supports building with Visual Studio 2013, so I think this is
bug.

https://www.postgresql.org/docs/12/install-windows-full.html
-----------------------------------
17.1. Building with Visual C++ or the Microsoft Windows SDK

64-bit PostgreSQL builds are supported with Microsoft Windows SDK version
8.1a to 10 or Visual Studio 2013 and above.
-----------------------------------

The main messages when it fails are following:
-----------------------------------
"Z:\postgres\pgsql.sln" (default target) (1) ->
"Z:\postgres\postgres.vcxproj" (default target) (2) ->
(ClCompile target) ->
src/port/snprintf.c(1006): warning C4013: 'snprintf' undefined; assuming
extern returning int [Z:\postgres\postgres.vcxproj]

"Z:\postgres\pgsql.sln" (default target) (1) ->
"Z:\postgres\libpqwalreceiver.vcxproj" (default target) (4) ->
"Z:\postgres\libpq.vcxproj" (default target) (5) ->
"Z:\postgres\libpgport.vcxproj" (default target) (7) ->
src/port/snprintf.c(1006): warning C4013: 'snprintf' undefined; assuming
extern returning int [Z:\postgres\libpgport.vcxproj]

"Z:\postgres\pgsql.sln" (default target) (1) ->
"Z:\postgres\postgres.vcxproj" (default target) (2) ->
(Link target) ->
snprintf.obj : error LNK2019: unresolved external symbol snprintf
referenced in function pg_strfromd [Z:\postgres\postgres.vcxproj]
.\Release\postgres\postgres.exe : fatal error LNK1120: 1 unresolved
externals [Z:\postgres\postgres.vcxproj]

"Z:\postgres\pgsql.sln" (default target) (1) ->
"Z:\postgres\libpqwalreceiver.vcxproj" (default target) (4) ->
"Z:\postgres\libpq.vcxproj" (default target) (5) ->
libpgport.lib(snprintf.obj) : error LNK2019: unresolved external symbol
snprintf referenced in function pg_strfromd [Z:\postgres\libpq.vcxproj]
.\Release\libpq\libpq.dll : fatal error LNK1120: 1 unresolved externals
[Z:\postgres\libpq.vcxproj]
-----------------------------------

I think the cause of this error is the following commit regarding
snprintf.
As a test, I reverted this commit and built again, and the build
succeeded.

d33ac1ec2af5297b2ac8fbf89464f0c7f90a7955

Regards,
Higuchi

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Yugo NAGATA 2022-11-09 10:01:14 Re: BUG #17434: CREATE/DROP DATABASE can be executed in the same transaction with other commands
Previous Message Tom Lane 2022-11-08 15:37:13 Re: BUG #17618: unnecessary filter column <> text even after adding index