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 1lizuI-0003zz-JB for pgsql-docs@arkaria.postgresql.org; Tue, 18 May 2021 13:37:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lizuA-0006hz-P9 for pgsql-docs@arkaria.postgresql.org; Tue, 18 May 2021 13:37:02 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lizZe-0005HP-3Y for pgsql-docs@lists.postgresql.org; Tue, 18 May 2021 13:15:50 +0000 Received: from mail-lf1-x12d.google.com ([2a00:1450:4864:20::12d]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lizZb-0006ze-Er for pgsql-docs@lists.postgresql.org; Tue, 18 May 2021 13:15:49 +0000 Received: by mail-lf1-x12d.google.com with SMTP id a2so14060847lfc.9 for ; Tue, 18 May 2021 06:15:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=q3CgCr6DXY2QcxBI+p9V7hgZX1A6uXgrr6uQsZ5iNF8=; b=KjHffjjSnF8i6ZXx8a59LMjpD8SweX1vLGRBXn1daSXHN++MTn7VtCAGd6ZMIGqq35 00BXvUVvYxFKFcJI2CL7mUzzf6eAxLyK0TTpxQKuxXMc8YooiobG33ml/mlnxX8Vv5MV 0u9fv+onbhBzXqZGl69rNzOJvJDfLo5UX3w0EJ1ps7Ps4BiuPN/WlSfpFyQHjNiruQq5 WCtDK/eDLYkfBA4sSd6TzPF3Zc+mPmSJ/68/PzfkD6HthAd/mDA4EP48/riOCVAqiyZb eGiqAsx8Y1BXXzH785LOUbfmItffKuAI90IQTT3g79v5DoiZJ9CIT35wWMyePRjHa33E jypQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=q3CgCr6DXY2QcxBI+p9V7hgZX1A6uXgrr6uQsZ5iNF8=; b=gJFVDznKgHAF8R5cdQVxSS3OzcfPOMkI3eSth5FsB2qlbHwGDas74VGSFP6yuFcI1N n2+4AqnxsmQA5CylgtO7bn5rUJAPYwYPZoCnGMgc6ccVfyGBtG4WG/ouGzINHmrvtjNq NHxDpB8eerClSNGk49sGbQd2v4FT0qXkXc963Sit+foiMegA1Q7kJRMaZa0wB/OPHvrJ U4eYAWF/fZooeJZKuu9/eJtyeMCa6aH0idw9r0bkcXVfJwI52dQnWaaG7fj+fNuAm3Mr 3RC8K8SOFoOD5wpe+WHqpMKrh5d0x2Zwsa0TiMjV9fUMehwMuzdBZjjOSBf9YB2ckoFw dhTA== X-Gm-Message-State: AOAM533WAEVi/35O+2MeV/2fQ0tifKIjzk645s+t71Zemjk3UGterpbB 4l/vmqJfDVxy6MrAjuPNdVptuwgo24FeghC9Moo2w0mm/Xk= X-Google-Smtp-Source: ABdhPJwHyTVeQW5WvuyC+rXrXSzNv2EIT/AQZHq/aXKmTH5/P5ERgphALOlKEOONb2U632hB6AXQn+lrl8Y0hmC1eAc= X-Received: by 2002:a05:6512:33c9:: with SMTP id d9mr3246042lfg.77.1621343746515; Tue, 18 May 2021 06:15:46 -0700 (PDT) MIME-Version: 1.0 References: <162128202219.27274.12616756784952017465@wrigleys.postgresql.org> In-Reply-To: From: Brian Ye Date: Tue, 18 May 2021 08:15:35 -0500 Message-ID: Subject: Re: Error building for 64-bit Windows (10) To: Michael Paquier Cc: pgsql-docs@lists.postgresql.org Content-Type: multipart/alternative; boundary="00000000000011e6e205c29a823d" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --00000000000011e6e205c29a823d Content-Type: text/plain; charset="UTF-8" Hi Michael, Thanks for the reply. Yes I also saw that after installing 64-bit, the 32-bit "bin" and "include" directories were removed. I think the content of the "include" are common for both 32- and 64-bit. Windows can run both 32-bit and 64-bit binaries so removing these 2 directories is probably okay. Just my guess. Again, thanks! Brian Ye On Tue, May 18, 2021 at 12:57 AM Michael Paquier wrote: > 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 > --00000000000011e6e205c29a823d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Michael,
Thanks for the reply.
Yes I also= saw that after installing 64-bit, the 32-bit "bin" and "inc= lude" directories were removed.
I think the content of the &= quot;include" are common for both 32- and 64-bit.=C2=A0 Windows can ru= n both 32-bit and=C2=A0
64-bit binaries so removing these 2 direc= tories is probably okay.=C2=A0 Just my guess.
Again, thanks!
Brian Ye


On Tue, May 18, 2021 at 12:57 AM Michael= Paquier <michael@paquier.xyz= > wrote:
On M= on, May 17, 2021 at 08:07:02PM +0000, PG Doc comments form wrote:
> The Solution.pm file has the following lines:
>=C2=A0 =C2=A0 =C2=A0 =C2=A0if ($self->{options}->{gss})
>=C2=A0 =C2=A0 =C2=A0 =C2=A0{
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0$proj->AddIncludeDir($self-= >{options}->{gss} . '\inc\krb5');
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0$proj->AddLibrary($self->= ;{options}->{gss} . '\lib\i386\krb5_32.lib');
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0$proj->AddLibrary($self->= ;{options}->{gss} .
> '\lib\i386\comerr32.lib');
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0$proj->AddLibrary($self->= ;{options}->{gss} .
> '\lib\i386\gssapi32.lib');
>=C2=A0 =C2=A0 =C2=A0 =C2=A0}
> I had to change them to the following or the compiling failed:
>=C2=A0 =C2=A0 =C2=A0 =C2=A0if ($self->{options}->{gss})
>=C2=A0 =C2=A0 =C2=A0 =C2=A0{
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0$proj->AddInc= ludeDir($self->{options}->{gss} . '\include');
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0$proj->AddInc= ludeDir($self->{options}->{gss} . '\include\krb5');
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0$proj->AddLib= rary($self->{options}->{gss} . '\lib\amd64\krb5_64.lib');
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0$proj->AddLib= rary($self->{options}->{gss} . '\lib\amd64\comerr64.lib'); >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0$proj->AddLib= rary($self->{options}->{gss} . '\lib\amd64\gssapi64.lib');
Yes, you are right.=C2=A0 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".=C2=A0 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<= br> necessary except if we use krb5.h, but we don't.=C2=A0 Upstream code recommends actually to use krb5/krb5.h, meaning that only "include/&qu= ot;
would be sufficient.=C2=A0 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
--00000000000011e6e205c29a823d--