public inbox for [email protected]
help / color / mirror / Atom feedFrom: Michael Paquier <[email protected]>
To: [email protected]
To: [email protected]
Subject: Re: Error building for 64-bit Windows (10)
Date: Tue, 18 May 2021 14:56:59 +0900
Message-ID: <YKNXK88JHdgLgkF/@paquier.xyz> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
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
Attachments:
[text/x-diff] fix-gss-msvc.patch (1.2K, 2-fix-gss-msvc.patch)
download | inline diff:
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})
{
[application/pgp-signature] signature.asc (833B, 3-signature.asc)
download
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: Error building for 64-bit Windows (10)
In-Reply-To: <YKNXK88JHdgLgkF/@paquier.xyz>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox