Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1osmJN-0002hO-LE for pgsql-bugs@arkaria.postgresql.org; Wed, 09 Nov 2022 14:44:17 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1osmJM-00080I-D2 for pgsql-bugs@arkaria.postgresql.org; Wed, 09 Nov 2022 14:44:16 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1osmJM-000803-4t for pgsql-bugs@lists.postgresql.org; Wed, 09 Nov 2022 14:44:16 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1osmJJ-0008MH-7d for pgsql-bugs@lists.postgresql.org; Wed, 09 Nov 2022 14:44:15 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 2A9EiASU3969641; Wed, 9 Nov 2022 09:44:10 -0500 From: Tom Lane To: higuchi.daisuke@fujitsu.com cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #17681: Building the REL_12_13 source in Visual Studio 2013 fails. In-reply-to: <17681-485ba2ec13e7f392@postgresql.org> References: <17681-485ba2ec13e7f392@postgresql.org> Comments: In-reply-to PG Bug reporting form message dated "Wed, 09 Nov 2022 06:08:36 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3969639.1668005050.1@sss.pgh.pa.us> Date: Wed, 09 Nov 2022 09:44:10 -0500 Message-ID: <3969640.1668005050@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk PG Bug reporting form writes: > I tried to build using the codes of REL_12_13 in the following environment, > but it failed. > The main messages when it fails are following: > ----------------------------------- > "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] Ugh. > 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 Thanks for checking that. However, as that commit message says, we require C99 support in v12 and up, and snprintf is definitely required by C99. So I'm disinclined to revert that. If VS2013 can't supply snprintf, it's not meeting our minimum platform standards, so we should remove it from the list of supported platforms. Having said that, Microsoft had had well over a dozen years by that point to get off their duffs and build a C99-compliant library. So I have to suspect that there is a snprintf lurking somewhere --- maybe there is some build option you need to enable to get it? regards, tom lane