Обсуждение: is libpq and openssl 1.1.* compatible?

Поиск
Список
Период
Сортировка

is libpq and openssl 1.1.* compatible?

От
Konstantin Izmailov
Дата:
I got the latest libpq (from pg 10.1), and tried to compile it with openssl 1.1. I got errors:
libpq10\fe-secure-openssl.c(1582): error C2037: left of 'ptr' specifies undefined struct/union 'bio_st'
libpq10\fe-secure-openssl.c(1582): error C2198: 'pqsecure_raw_read' : too few arguments for call
libpq10\fe-secure-openssl.c(1612): error C2037: left of 'ptr' specifies undefined struct/union 'bio_st'
libpq10\fe-secure-openssl.c(1612): error C2198: 'pqsecure_raw_write' : too few arguments for call
libpq10\fe-secure-openssl.c(1671): error C2027: use of undefined type 'bio_method_st'
          openssl-1.1.0g\inc32\openssl\bio.h(244) : see declaration of 'bio_method_st'
libpq10\fe-secure-openssl.c(1674): error C2027: use of undefined type 'bio_method_st'

I wonder if I'm not doing smth right, or libpq is not compatible with openssl 1.1? Please help.

Thank you!

Re: is libpq and openssl 1.1.* compatible?

От
Adrian Klaver
Дата:
On 02/25/2018 08:36 PM, Konstantin Izmailov wrote:
> I got the latest libpq (from pg 10.1), and tried to compile it with 
> openssl 1.1. I got errors:
> libpq10\fe-secure-openssl.c(1582): error C2037: left of 'ptr' specifies 
> undefined struct/union 'bio_st'
> libpq10\fe-secure-openssl.c(1582): error C2198: 'pqsecure_raw_read' : 
> too few arguments for call
> libpq10\fe-secure-openssl.c(1612): error C2037: left of 'ptr' specifies 
> undefined struct/union 'bio_st'
> libpq10\fe-secure-openssl.c(1612): error C2198: 'pqsecure_raw_write' : 
> too few arguments for call
> libpq10\fe-secure-openssl.c(1671): error C2027: use of undefined type 
> 'bio_method_st'
>            openssl-1.1.0g\inc32\openssl\bio.h(244) : see declaration of 
> 'bio_method_st'
> libpq10\fe-secure-openssl.c(1674): error C2027: use of undefined type 
> 'bio_method_st'
> 
> I wonder if I'm not doing smth right, or libpq is not compatible with 
> openssl 1.1? Please help.

Where did you get the libpq source from?

What was the command you used to compile?

Do you have openssl-dev(el) installed?

> 
> Thank you!


-- 
Adrian Klaver
adrian.klaver@aklaver.com


Re: is libpq and openssl 1.1.* compatible?

От
Michael Paquier
Дата:
On Sun, Feb 25, 2018 at 09:06:39PM -0800, Adrian Klaver wrote:
> On 02/25/2018 08:36 PM, Konstantin Izmailov wrote:
>> I wonder if I'm not doing smth right, or libpq is not compatible with
>> openssl 1.1? Please help.

The answer to the second question is that libpq is compatible with
OpenSSL 1.1.0 since this commit:
commit: 593d4e47db7af1a3a5dd6b6b1971f181b5566dbd
author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date: Thu, 15 Sep 2016 14:42:29 +0300
Support OpenSSL 1.1.0.

This applies down to 9.5.  Porting got a bit more difficult with 9.4 and
older versions.  As 1.0.2 is LTS, meaning that it will become EOL after
1.1.0, porting 1.1.0 does not matter much as most application are going
to use 1.0.2 in priority (I do so for one).

> Do you have openssl-dev(el) installed?

Most likely that's the problem.  Debian does this package split for
example.
--
Michael

Вложения

Re: is libpq and openssl 1.1.* compatible?

От
Konstantin Izmailov
Дата:
Let me ask this differently: can Visual Studio 2013/2017 compile libpq with openssl 1.1 support? Under Windows?

I have not been able to find an answer by googling before asking this question here. Can someone share the compiled library and changes in the source if needed for the openssl 1.1? Magnus please.



On Sun, Feb 25, 2018 at 10:44 PM, Michael Paquier <michael@paquier.xyz> wrote:
On Sun, Feb 25, 2018 at 09:06:39PM -0800, Adrian Klaver wrote:
> On 02/25/2018 08:36 PM, Konstantin Izmailov wrote:
>> I wonder if I'm not doing smth right, or libpq is not compatible with
>> openssl 1.1? Please help.

The answer to the second question is that libpq is compatible with
OpenSSL 1.1.0 since this commit:
commit: 593d4e47db7af1a3a5dd6b6b1971f181b5566dbd
author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
date: Thu, 15 Sep 2016 14:42:29 +0300
Support OpenSSL 1.1.0.

This applies down to 9.5.  Porting got a bit more difficult with 9.4 and
older versions.  As 1.0.2 is LTS, meaning that it will become EOL after
1.1.0, porting 1.1.0 does not matter much as most application are going
to use 1.0.2 in priority (I do so for one).

> Do you have openssl-dev(el) installed?

Most likely that's the problem.  Debian does this package split for
example.
--
Michael

Re: is libpq and openssl 1.1.* compatible?

От
Michael Paquier
Дата:
On Mon, Feb 26, 2018 at 12:30:38AM -0700, Konstantin Izmailov wrote:
> Let me ask this differently: can Visual Studio 2013/2017 compile libpq with
> openssl 1.1 support? Under Windows?

The answer to this question should be yes.  (Please note that no
Windows buildfarm machines use openssl 1.1.0 as far as I can see, I
myself build stuff with 1.0.2 on Windows.)

> I have not been able to find an answer by googling before asking this
> question here. Can someone share the compiled library and changes in the
> source if needed for the openssl 1.1? Magnus please.

No changes should be needed as far as I know in the scripts in
src/tools/msvc.  The set of APIs present in 1.1.0 is the same whatever
the platform so the compatibility is the same, and the dependent
libraries should be ssleay32.lib and libeay32.lib whose location depend
on your installation of OpenSSL.
--
Michael

Вложения

Re: is libpq and openssl 1.1.* compatible?

От
Konstantin Izmailov
Дата:
Thank you everyone who posted answers! I went back to openssl-1.0.2.

On Mon, Feb 26, 2018 at 1:15 AM, Michael Paquier <michael@paquier.xyz> wrote:
On Mon, Feb 26, 2018 at 12:30:38AM -0700, Konstantin Izmailov wrote:
> Let me ask this differently: can Visual Studio 2013/2017 compile libpq with
> openssl 1.1 support? Under Windows?

The answer to this question should be yes.  (Please note that no
Windows buildfarm machines use openssl 1.1.0 as far as I can see, I
myself build stuff with 1.0.2 on Windows.)

> I have not been able to find an answer by googling before asking this
> question here. Can someone share the compiled library and changes in the
> source if needed for the openssl 1.1? Magnus please.

No changes should be needed as far as I know in the scripts in
src/tools/msvc.  The set of APIs present in 1.1.0 is the same whatever
the platform so the compatibility is the same, and the dependent
libraries should be ssleay32.lib and libeay32.lib whose location depend
on your installation of OpenSSL.
--
Michael