public inbox for [email protected]  
help / color / mirror / Atom feed
From: gamefunc <[email protected]>
To: Michael Paquier <[email protected]>
Cc: [email protected] <[email protected]>
Subject: RE: [PATCH] fix msvc build libpq error LNK2019 when link openssl;
Date: Mon, 27 Feb 2023 15:33:50 +0800
Message-ID: <[email protected]> (raw)
In-Reply-To: <Y/w/[email protected]>
References: <[email protected]>
	<Y/w/[email protected]>

sorry i should have made it clear – I am only reporting my build error issue;
the patch is only for illustrative purpose, not for merging to upstream;
And my English is not good, so I can only write simple descriptions;
>> This diff forces the creation of a VS2022Solution():
yes, my env: vs2022, openssl3.0.7; 

>> Note that buildfarm member drongo is providing coverage for 64b:
thank you, But I need to build libpq myself because I need to add functions to libpq for my example use; https://github.com/gamefunc/Aiolibpq_simple;

>> Are you sure that you just didn't mix 64b builds with 32b libraries;
no, all 64b;

From: Michael Paquier
Date: 2023年2月27日 13:27
To: gamefunc
CC: pgsql-hackers
Subject: Re: [PATCH] fix msvc build libpq error LNK2019 when link openssl;

On Mon, Feb 27, 2023 at 09:58:28AM +0800, gamefunc wrote:
> # I:
>     (default target) (1) -&gt; (Link target) -&gt;
>       libcrypto.lib(libcrypto-lib-e_capi.obj) : error LNK2019:  __imp_CertOpenStore, capi_open_store  
>       libcrypto.lib(libcrypto-lib-e_capi.obj) : error LNK2019:  __imp_CertCloseStore, capi_find_key  
>       libcrypto.lib(libcrypto-lib-e_capi.obj) : error LNK2019:  __imp_CertEnumCertificatesInStore, capi_find_cert  
>       libcrypto.lib(libcrypto-lib-e_capi.obj) : error LNK2019:  __imp_CertFindCertificateInStore, capi_find_cert
>       libcrypto.lib(libcrypto-lib-e_capi.obj) : error LNK2019:  __imp_CertDuplicateCertificateContext, capi_load_ssl_client_cert
>       libcrypto.lib(libcrypto-lib-e_capi.obj) : error LNK2019:  __imp_CertFreeCertificateContext, capi_dsa_free
>       libcrypto.lib(libcrypto-lib-e_capi.obj) : error LNK2019:  __imp_CertGetCertificateContextProperty, capi_cert_get_fname 

@@ -94,7 +94,7 @@ sub mkvcbuild
    die 'Must run from root or msvc directory'
      unless (-d 'src/tools/msvc' && -d 'src')

-   my $vsVersion = DetermineVisualStudioVersion();
+   my $vsVersion = "17.00";

This diff forces the creation of a VS2022Solution(), which would be
incorrect when using an MSVC environment different than 17.0 as
version number, no?

Note that buildfarm member drongo is providing coverage for 64b
Windows builds with Visual 2019 and OpenSSL:
https://buildfarm.postgresql.org/cgi-bin/show_history.pl?nm=drongo&br=HEAD

Are you sure that you just didn't mix 64b builds with 32b libraries,
or vice-versa?
--
Michael




view thread (2+ messages)

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: [PATCH] fix msvc build libpq error LNK2019 when link openssl;
  In-Reply-To: <[email protected]>

* 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