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 1lisjF-0003cS-Gx for pgsql-docs@arkaria.postgresql.org; Tue, 18 May 2021 05:57:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lisjE-0003r6-H7 for pgsql-docs@arkaria.postgresql.org; Tue, 18 May 2021 05:57: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 1lisjD-0003qy-CB for pgsql-docs@lists.postgresql.org; Tue, 18 May 2021 05:57:16 +0000 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lisj8-0001Et-67 for pgsql-docs@lists.postgresql.org; Tue, 18 May 2021 05:57:14 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id E3417F94; Tue, 18 May 2021 01:57:07 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Tue, 18 May 2021 01:57:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= date:from:to:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm1; bh=l+aQmgxhRn/kME3kahD4NCLNL+3 7wunEjiGLLe8bYIc=; b=rYNllUmWW1liZbeD0zXH3Juj5vghR4KnPPk+1PGRxVD eDgM+te7ieSejvX0Jy+S55SpmFlGs/9RNUMfoPBfDuis95tOg3147j7ZdanI2asH /9kJpbv6oFG08UmPyYwd7A+6eSyJLsFEc5dQFhFBg2ZaFqhbnEMHBtg3FVmwZ3g3 QJPdYfjdJFPMOy4jHqUvfjRhCCBl3vAM3u1FnpMsBivZ25FZhs2yODmrPpVn3tnB Z4GLrG6ayEcmKbqTXEtDGFe/9gq2XcEpT08wr4t4ESNZ76f8a0S+tefzc89zqtNi dKyymMGehTuojSF7j4kdU5MDJ3qfDkCkSBt+6TRfAQg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=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=fm2; bh=l+aQmg xhRn/kME3kahD4NCLNL+37wunEjiGLLe8bYIc=; b=tZX5k66t6X+l76KOUC4E2d 4Hzs7epZtZDBf1ysyFCiXXcJE0MSElSS2mehyuxpr2DbTM0NfxBa5FjfG4+yZWGV mRLnPeEZU/BulNwdjhrGRH2Hv4Ye7jsjMODzEG1fxOp/bAdI9XsaSeXmz5SXZemA m/hnbiMVPaNOX0J9f31OXRjoqi5gu+x7CriF/Ux0AuM+P2coJNlMsFjSW7ERA7et /ChOnNvKxOKz1JK81wrGhy7SsbCQmJcBJrOjLcWibdQ/cQZM2UMGcpt1pYkc8RKb yp2cQe4V97vK71w8gyctiadjp7wm2ywqBRfhH4QRyT4Egj/v7NFrmdxJebZIg+Cw == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvdeiiedgleeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucgfrhhlucfvnfffucdlfeehmdenucfjughrpeffhf fvuffkfhggtggujgesghdtreertddtvdenucfhrhhomhepofhitghhrggvlhcurfgrqhhu ihgvrhcuoehmihgthhgrvghlsehprghquhhivghrrdighiiiqeenucggtffrrghtthgvrh hnpedtgeelhfettdffjeejiefftdehudetkefgteeiieevgeegleefgedvgedvffeguden ucffohhmrghinhepmhhithdrvgguuhenucfkphepudduuddruddtvddrudektddrudekhe enucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmihgt hhgrvghlsehprghquhhivghrrdighiii X-ME-Proxy: Received: from paquier.xyz (ee0822lan1.rev.em-net.ne.jp [111.102.180.185]) by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 18 May 2021 01:57:05 -0400 (EDT) Date: Tue, 18 May 2021 14:56:59 +0900 From: Michael Paquier To: brian.y.ye@gmail.com, pgsql-docs@lists.postgresql.org Subject: Re: Error building for 64-bit Windows (10) Message-ID: References: <162128202219.27274.12616756784952017465@wrigleys.postgresql.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="lCQJCMiEL68sRdbd" Content-Disposition: inline In-Reply-To: <162128202219.27274.12616756784952017465@wrigleys.postgresql.org> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --lCQJCMiEL68sRdbd Content-Type: multipart/mixed; boundary="GafiVAvjIhd6snMW" Content-Disposition: inline --GafiVAvjIhd6snMW Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, May 17, 2021 at 08:07:02PM +0000, PG Doc comments form wrote: > The Solution.pm file has the following lines: > if ($self->{options}->{gss}) > { > $proj->AddIncludeDir($self->{options}->{gss} . '\inc\krb5'); > $proj->AddLibrary($self->{options}->{gss} . '\lib\i386\krb5_32.lib'); > $proj->AddLibrary($self->{options}->{gss} . > '\lib\i386\comerr32.lib'); > $proj->AddLibrary($self->{options}->{gss} . > '\lib\i386\gssapi32.lib'); > } > I had to change them to the following or the compiling failed: > if ($self->{options}->{gss}) > { > $proj->AddIncludeDir($self->{options}->{gss} . '\include'); > $proj->AddIncludeDir($self->{options}->{gss} . '\include\krb5'); > $proj->AddLibrary($self->{options}->{gss} . '\lib\amd64\krb5_64.lib'); > $proj->AddLibrary($self->{options}->{gss} . '\lib\amd64\comerr64.lib'); > $proj->AddLibrary($self->{options}->{gss} . '\lib\amd64\gssapi64.lib'); Yes, you are right. I have been playing with the deliverables we recommend in the docs as of [1], and there are a couple of gotchas here: - For the 32b and 64b MSI installer, the include path is not "inc", but "include". So I could not get the installation on Win32 to work either on HEAD. - There is a sub-path called "include/krb5", which is not really necessary except if we use krb5.h, but we don't. Upstream code recommends actually to use krb5/krb5.h, meaning that only "include/" would be sufficient. Keeping "include/krb5/" around is not a big deal either. This has not been changed in ages, so perhaps few have bothered. Anyway, the attached patch fixes both the 32b and 64b builds for me. Another interesting thing is that the installation of krb5 for amd64 and i386 cannot co-exist together, so installing one removes the second automatically. [1]: https://web.mit.edu/Kerberos/dist/index.html -- Michael --GafiVAvjIhd6snMW Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="fix-gss-msvc.patch" diff --git a/src/tools/msvc/Solution.pm b/src/tools/msvc/Solution.pm index 3c5fe5dddc..05866af925 100644 --- a/src/tools/msvc/Solution.pm +++ b/src/tools/msvc/Solution.pm @@ -1023,10 +1023,20 @@ sub AddProject } if ($self->{options}->{gss}) { - $proj->AddIncludeDir($self->{options}->{gss} . '\inc\krb5'); - $proj->AddLibrary($self->{options}->{gss} . '\lib\i386\krb5_32.lib'); - $proj->AddLibrary($self->{options}->{gss} . '\lib\i386\comerr32.lib'); - $proj->AddLibrary($self->{options}->{gss} . '\lib\i386\gssapi32.lib'); + $proj->AddIncludeDir($self->{options}->{gss} . '\include'); + $proj->AddIncludeDir($self->{options}->{gss} . '\include\krb5'); + if ($self->{platform} eq 'Win32') + { + $proj->AddLibrary($self->{options}->{gss} . '\lib\i386\krb5_32.lib'); + $proj->AddLibrary($self->{options}->{gss} . '\lib\i386\comerr32.lib'); + $proj->AddLibrary($self->{options}->{gss} . '\lib\i386\gssapi32.lib'); + } + else + { + $proj->AddLibrary($self->{options}->{gss} . '\lib\amd64\krb5_64.lib'); + $proj->AddLibrary($self->{options}->{gss} . '\lib\amd64\comerr64.lib'); + $proj->AddLibrary($self->{options}->{gss} . '\lib\amd64\gssapi64.lib'); + } } if ($self->{options}->{iconv}) { --GafiVAvjIhd6snMW-- --lCQJCMiEL68sRdbd Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmCjVysACgkQnvQgOdby QH3SnA/+MDHGjLDwPcye3ZMyk2ufomYkTMqp8IMVFU0MNHfQJyzEsC80XpMbYnai 9xiUeLwkgPfPtD/Uf30EFMhELNOCq2TS+Qwb0ZtBaGMrVAwfohaTyc+fhJS/4f2M Ya2v5w17qIvTq1jc7a8B6d+1AiFM4d2GFxncKvbV4OLjhSnE9aSTKtrppDm531tj XuhPaKX2coSH8ChPERjPB0H6B5M4xFLOiZPCbzDX9Ti04ZTHJNDPVvZzuHfVmPLt 6sQ6mXpDnTrGGK+37KjTBQyHWJCCWkn4ltcIV8RlfUcBgVR22XqXaAI4sHHgwPKq Yb/I/oCIWN6deEoHNPZUNDc1q6vGq2R7ApoCgg/QyMQ8Wly0Vt4xZDYlQ2uKxmq9 MsbMYBSIH4G4MVrrmZlYha/x1WGbtrGqMiU96RJnlC0psxJdzeAi7qTqkz5ZuKR8 4kyM4bW7ja7Uy+cmlh7OwBK0bzwxzVM0xljmCQh9N7A2xog3LvtlG+VzYiTyfIdt GmZDZYgKhvbwnM6EttpZVnOqYg0diXsOU4AOrNLsnF3Zu748su66tY6IKwAq5OHK y2LPxsfKS2tLLi5z8YMjqCzqBsXmdZmIA5QdpHfRZSX4L8cpQyM3s2ABpg2O3Out vQ4a4FkQfiwwQyqGIqX8XDtCq9ROZAMJL1R3jC/gSgZOXcPY4gY= =4lpk -----END PGP SIGNATURE----- --lCQJCMiEL68sRdbd--