Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hidYS-0007Ws-Kv for pgsql-bugs@arkaria.postgresql.org; Wed, 03 Jul 2019 11:36:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hidYR-0000EL-Fh for pgsql-bugs@arkaria.postgresql.org; Wed, 03 Jul 2019 11:36:03 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hidYP-00008S-MB for pgsql-bugs@lists.postgresql.org; Wed, 03 Jul 2019 11:36:03 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hidYM-0003L1-7k for pgsql-bugs@lists.postgresql.org; Wed, 03 Jul 2019 11:36:00 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 2204122007; Wed, 3 Jul 2019 07:35:57 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Wed, 03 Jul 2019 07:35:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm2; bh=NWPfNyzXVm7Y61hFNdTMWjdigkt 3+4K/Uqd7B1jzdmA=; b=lNeE1ia5nUjBAY/5ScaruervNNKBjGcQpDk4hLEeGYi M948B93KXqIfxUwdzG6ZVsyDNmxU3/t7pxZu6UVlijRULU6fWghQHlJtZ06jybf7 oHxFEpfKec16MVgeT0Xt7Gw06pRXtcS9zdE8apqcNKAA6KAR1/lPfrZAWXpXgwm7 +9TtW1X+yIZwZuNvm321Vfa/YfANi3YSA3REoKhvNvvzqNp1s1IMMwUqWYl90uTa tZnylrA8mYKsybhMdfQGhrlXHEtozhkxm9MDD000RwjuaU12xUziBniQHNYmCxJm fvvr0X0zDr0FM3vrKC55FyiFXpACPu8f6ozbGf6GGGQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=NWPfNy zXVm7Y61hFNdTMWjdigkt3+4K/Uqd7B1jzdmA=; b=T3gLZni5iZ8HzZzKux9CeS SzpU6KoZ22rkpiucZH2Zs+6D4upTkr8dsxUxrKkAzXvIwNrn7oEPOFNdc1mMQ1uQ bLR7F8l54yILB/LkIQIvmEc1KWLKG/c6U/JDWlcPy0dSSdzPJzEBYmt/0TDOUpve 7KfXelN2zsGp6YXxN5iaXQqekxGHeZwDUrZeo57FtYJFqDQF18fVuYJzY2HlItXJ s6FEcdPPb5qjjjvCIwB4AfCGA6e4gejKRGFCkXfyjgKqeg7b7OjOsvkd9yrpp00r m4rx0ni07EmIzAP4WrCwCdzmrzIAGIv0GqJTbEFzVHi5zHoN+ItUe9Tmiez8qEKw == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddrfedtgdegfecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecufghrlhcuvffnffculdefhedmnecujfgurhepfffhvf fukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpefoihgthhgrvghlucfrrghquhhi vghruceomhhitghhrggvlhesphgrqhhuihgvrhdrgiihiieqnecuffhomhgrihhnpehpoh hsthhgrhgvshhqlhdrohhrghenucfkphepudduuddruddtvddrudektddrudekheenucfr rghrrghmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiihiienuc evlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from paquier.xyz (ee0822lan1.rev.em-net.ne.jp [111.102.180.185]) by mail.messagingengine.com (Postfix) with ESMTPA id 339F980068; Wed, 3 Jul 2019 07:35:55 -0400 (EDT) Date: Wed, 3 Jul 2019 20:35:51 +0900 From: Michael Paquier To: gaolin01@beyondsoft.com, pgsql-bugs@lists.postgresql.org Cc: kommi.haribabu@gmail.com Subject: Re: BUG #15889: PostgreSQL failed to build due to error MSB8020 with MSVC on windows Message-ID: <20190703113551.GH3084@paquier.xyz> References: <15889-1ee90dbc3b860518@postgresql.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="6lCXDTVICvIQMz0h" Content-Disposition: inline In-Reply-To: <15889-1ee90dbc3b860518@postgresql.org> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --6lCXDTVICvIQMz0h Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable (Adding Hari who has helped with this work.) On Wed, Jul 03, 2019 at 09:10:34AM +0000, PG Bug reporting form wrote: > PostgreSQL failed to build due to error MSB8020: The build tools for v142 > (Platform Toolset =3D 'v142') cannot be found with MSVC on windows. It c= an be > first reproduced on master branch 2b1394fc2b52a2573d08aa626e7b49568f27464e > reversion which is 'Add support for Visual Studio 2019 in build scripts'.= =20 >=20 > Further investigation we found that VS2017 does not seem to be supported = in > this commit. We mainly use open source projects to test VS compilers. > Currently we are using VS2017 and there is no plan to migrate to VS2019. > Could you please help look at this issue and provide a work around to us = to > solve this issue? Thanks a lot! Mumble. VS 2017 should be supported in our builds. It happens that we do have a buildfarm member called bowerbird which uses Visual Studio 2017, and this is not complaining at all: https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=3Dbowerbird&dt=3D20= 19-07-02%2018%3A30%3A56 So at first sight the logic we have does not seem that wrong because it has already tested the commit which adds VS 2019 :) > Failures: > C:\Program Files (x86)\Microsoft Visual > Studio\2017\Enterprise\Common7\IDE\VC\VCTargets\Microsoft.Cpp.Platform.ta= rgets(57,5): > error MSB8020: The build tools for v142 (Platform Toolset =3D 'v142') can= not > be found. To build using the v142 build tools, please install v142 build > tools. Alternatively, you may upgrade to the current Visual Studio tools= by > selecting the Project menu or right-click the solution, and then selecting > "Retarget solution". [D:\PostgreSQL\src\postgres.vcxproj] Looking at the code, it looks to be an effect of the version checking in CreateProject()/MSBuildProject.pm, causing a VC2019Project object to be generated instead of a VC2017Project one. Your scripts seem to be rather advanced, and I have little idea how your installation looks like. What's the return result of DetermineVisualStudioVersion()? With VS 2017, the result is assumed to be between 14.10 and 14.20 as far as I know. You can also know that by looking at the version of nmake shipped with your installation using the native tool terminal for example. I guess that in your case the version of nmake is between 14.20.XX.YY and 15.00.NN.PP? -- Michael --6lCXDTVICvIQMz0h Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAl0ckxcACgkQnvQgOdby QH0M0hAApXiG9xRwL44DO4wzh5Ya3Pa94deXTlDTmxFHeP7BsnJvShVi+RM/rX5L jt31X94PHwO+HkjTDfoROqNw0nVF09ErDzqR1sZcAkn2whEeroERKZypCX1jfOUy F49rAl1T4qBj7e847WS+VadmFKyQunE1PJF6yBshKw7qgrourZk3qmZNmTrlkPZb KWo9VbqI/a21CrgBoG3IBGNfhy/Pt3OWNZuRnEAHbdrNEzE41eLwVb2ulZp18zGF pMYDea6jmV8jh5Rc83h0BVt3dfdtw2rMsRkmm8gJtSzusG2HugHilIjW0+/2jtQr QZz5cOqscWxXj/XwIibE4/aOuuWoD3zgNZ4YtWtOoSQxENmpV9E07uKvU59ViGdV NU6RGEik2TuUh4DdIxBZjpQ4dF4pnkoSdrp46zgQibQWpUTk3zPsIpFPJLDfbKKx si7B7FcyWpuInYpaJrdeMcg0Eho/T52OHkE56vCqjtPiUGXXsnWAYo0+zJ5hM/14 K5KvC/8o9oxZkt6IQ3GMrH1mk6vRd79bRtYvXgj8myevaJDB5zvYDH+ELzHrvD61 /bMTj82AMKTsdoTSdlmVv4CO0p5L7cJMey7zCRdJapDy7WE6SpHFWL5oReIPxXNU nIde8OCZ1RuSoxcRzS3kSYMtBC7C9FU9YFZ+9lo8g3FPtBOn5Mw= =fSa2 -----END PGP SIGNATURE----- --6lCXDTVICvIQMz0h--