Thread: crypto library is not installed

crypto library is not installed

From
Andreas 'ads' Scherbaum
Date:
Hi,

when compiling pgAdmin3 I ran into the same problem as others before:
openssl-devel is not installed.


./configure --prefix=/home/ads/tmp-pgadmin3 --with-pgsql=/usr/pgsql-9.3/

make[3]: Entering directory `/home/ads/pgadmin3/xtra/png2c'
gcc -DHAVE_CONFIG_H -I. -I../.. -I../../pgadmin/include/libssh2
-I/usr/pgsql-9.3/include -I/usr/pgsql-9.3/include/server
-I/usr/pgsql-9.3/include -DHAVE_CONNINFO_PARSE
-I/usr/lib64/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8
-D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -DEMBED_XRC
-I/usr/include/libxml2 -I/usr/include/libxml2  -O2 -MT png2c.o -MD -MP
-MF .deps/png2c.Tpo -c -o png2c.o png2c.c
mv -f .deps/png2c.Tpo .deps/png2c.Po
gcc  -O2  -L/usr/pgsql-9.3/lib -Wl,-as-needed -L/usr/lib -o png2c
png2c.o  -L/usr/pgsql-9.3/lib -lcrypto -lpq
/usr/bin/ld: cannot find -lcrypto
collect2: ld returned 1 exit status
make[3]: *** [png2c] Error 1


Yes, I know how to fix this. My question is: why is "configure" not
checking for this library, when it is required to build pgAdmin3?



Thanks,

--
                Andreas 'ads' Scherbaum
German PostgreSQL User Group
European PostgreSQL User Group - Board of Directors
Volunteer Regional Contact, Germany - PostgreSQL Project


Re: crypto library is not installed

From
Dave Page
Date:
On Mon, Mar 3, 2014 at 10:20 AM, Andreas 'ads' Scherbaum
<adsmail@wars-nicht.de> wrote:
>
> Hi,
>
> when compiling pgAdmin3 I ran into the same problem as others before:
> openssl-devel is not installed.
>
>
> ./configure --prefix=/home/ads/tmp-pgadmin3 --with-pgsql=/usr/pgsql-9.3/
>
> make[3]: Entering directory `/home/ads/pgadmin3/xtra/png2c'
> gcc -DHAVE_CONFIG_H -I. -I../.. -I../../pgadmin/include/libssh2
> -I/usr/pgsql-9.3/include -I/usr/pgsql-9.3/include/server
> -I/usr/pgsql-9.3/include -DHAVE_CONNINFO_PARSE
> -I/usr/lib64/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8
> -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -DEMBED_XRC
> -I/usr/include/libxml2 -I/usr/include/libxml2  -O2 -MT png2c.o -MD -MP -MF
> .deps/png2c.Tpo -c -o png2c.o png2c.c
> mv -f .deps/png2c.Tpo .deps/png2c.Po
> gcc  -O2  -L/usr/pgsql-9.3/lib -Wl,-as-needed -L/usr/lib -o png2c png2c.o
> -L/usr/pgsql-9.3/lib -lcrypto -lpq
> /usr/bin/ld: cannot find -lcrypto
> collect2: ld returned 1 exit status
> make[3]: *** [png2c] Error 1
>
>
> Yes, I know how to fix this. My question is: why is "configure" not checking
> for this library, when it is required to build pgAdmin3?

Noone wrote the code I guess. Patches welcome :-)


--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Compan


Re: crypto library is not installed

From
Andreas 'ads' Scherbaum
Date:
On 03/03/2014 11:32 AM, Dave Page wrote:
> On Mon, Mar 3, 2014 at 10:20 AM, Andreas 'ads' Scherbaum
> <adsmail@wars-nicht.de> wrote:
>>
>> Yes, I know how to fix this. My question is: why is "configure" not checking
>> for this library, when it is required to build pgAdmin3?
>
> Noone wrote the code I guess. Patches welcome :-)

Just checking the code: why is it even requiring "crypto" when compiling
without --with-openssl?


Regards,

--
                Andreas 'ads' Scherbaum
German PostgreSQL User Group
European PostgreSQL User Group - Board of Directors
Volunteer Regional Contact, Germany - PostgreSQL Project


Re: crypto library is not installed

From
Dave Page
Date:
On Mon, Mar 3, 2014 at 1:05 PM, Andreas 'ads' Scherbaum
<adsmail@wars-nicht.de> wrote:
> On 03/03/2014 11:32 AM, Dave Page wrote:
>>
>> On Mon, Mar 3, 2014 at 10:20 AM, Andreas 'ads' Scherbaum
>> <adsmail@wars-nicht.de> wrote:
>>>
>>>
>>> Yes, I know how to fix this. My question is: why is "configure" not
>>> checking
>>> for this library, when it is required to build pgAdmin3?
>>
>>
>> Noone wrote the code I guess. Patches welcome :-)
>
>
> Just checking the code: why is it even requiring "crypto" when compiling
> without --with-openssl?

That's actually the likely reason why we don't do that test. It seems
to be required because we're linking with libpq which is linked with
OpenSSL, apps linking to it (on some platforms) also need to link with
libcypto. It may also be that an element of bitrot has crept into that
configure option - I very much doubt anyone has tested without SSL
support in a long time.

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Re: crypto library is not installed

From
Andreas 'ads' Scherbaum
Date:
On 03/03/2014 02:44 PM, Dave Page wrote:
> On Mon, Mar 3, 2014 at 1:05 PM, Andreas 'ads' Scherbaum
> <adsmail@wars-nicht.de> wrote:
>> On 03/03/2014 11:32 AM, Dave Page wrote:
>>>
>>> On Mon, Mar 3, 2014 at 10:20 AM, Andreas 'ads' Scherbaum
>>> <adsmail@wars-nicht.de> wrote:
>>>>
>>>>
>>>> Yes, I know how to fix this. My question is: why is "configure" not
>>>> checking
>>>> for this library, when it is required to build pgAdmin3?
>>>
>>>
>>> Noone wrote the code I guess. Patches welcome :-)
>>
>>
>> Just checking the code: why is it even requiring "crypto" when compiling
>> without --with-openssl?
>
> That's actually the likely reason why we don't do that test. It seems
> to be required because we're linking with libpq which is linked with
> OpenSSL, apps linking to it (on some platforms) also need to link with
> libcypto. It may also be that an element of bitrot has crept into that
> configure option - I very much doubt anyone has tested without SSL
> support in a long time.

Given what you said, attached is a patch which requires "openssl/ssl.h"
to be available. If not, configure bails out with an error message.


Regards,

--
                Andreas 'ads' Scherbaum
German PostgreSQL User Group
European PostgreSQL User Group - Board of Directors
Volunteer Regional Contact, Germany - PostgreSQL Project

Attachment

Re: crypto library is not installed

From
Andreas 'ads' Scherbaum
Date:
On 03/04/2014 09:29 AM, Andreas 'ads' Scherbaum wrote:
> On 03/03/2014 02:44 PM, Dave Page wrote:
>> On Mon, Mar 3, 2014 at 1:05 PM, Andreas 'ads' Scherbaum
>> <adsmail@wars-nicht.de> wrote:
>>> On 03/03/2014 11:32 AM, Dave Page wrote:
>>>>
>>>> On Mon, Mar 3, 2014 at 10:20 AM, Andreas 'ads' Scherbaum
>>>> <adsmail@wars-nicht.de> wrote:
>>>>>
>>>>>
>>>>> Yes, I know how to fix this. My question is: why is "configure" not
>>>>> checking
>>>>> for this library, when it is required to build pgAdmin3?
>>>>
>>>>
>>>> Noone wrote the code I guess. Patches welcome :-)
>>>
>>>
>>> Just checking the code: why is it even requiring "crypto" when compiling
>>> without --with-openssl?
>>
>> That's actually the likely reason why we don't do that test. It seems
>> to be required because we're linking with libpq which is linked with
>> OpenSSL, apps linking to it (on some platforms) also need to link with
>> libcypto. It may also be that an element of bitrot has crept into that
>> configure option - I very much doubt anyone has tested without SSL
>> support in a long time.
>
> Given what you said, attached is a patch which requires "openssl/ssl.h"
> to be available. If not, configure bails out with an error message.

Any feedback regarding this patch?


Thanks,

--
                Andreas 'ads' Scherbaum
German PostgreSQL User Group
European PostgreSQL User Group - Board of Directors
Volunteer Regional Contact, Germany - PostgreSQL Project


Re: crypto library is not installed

From
Dave Page
Date:
On Thu, Mar 13, 2014 at 7:24 PM, Andreas 'ads' Scherbaum
<adsmail@wars-nicht.de> wrote:
> On 03/04/2014 09:29 AM, Andreas 'ads' Scherbaum wrote:
>>
>> On 03/03/2014 02:44 PM, Dave Page wrote:
>>>
>>> On Mon, Mar 3, 2014 at 1:05 PM, Andreas 'ads' Scherbaum
>>> <adsmail@wars-nicht.de> wrote:
>>>>
>>>> On 03/03/2014 11:32 AM, Dave Page wrote:
>>>>>
>>>>>
>>>>> On Mon, Mar 3, 2014 at 10:20 AM, Andreas 'ads' Scherbaum
>>>>> <adsmail@wars-nicht.de> wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>> Yes, I know how to fix this. My question is: why is "configure" not
>>>>>> checking
>>>>>> for this library, when it is required to build pgAdmin3?
>>>>>
>>>>>
>>>>>
>>>>> Noone wrote the code I guess. Patches welcome :-)
>>>>
>>>>
>>>>
>>>> Just checking the code: why is it even requiring "crypto" when compiling
>>>> without --with-openssl?
>>>
>>>
>>> That's actually the likely reason why we don't do that test. It seems
>>> to be required because we're linking with libpq which is linked with
>>> OpenSSL, apps linking to it (on some platforms) also need to link with
>>> libcypto. It may also be that an element of bitrot has crept into that
>>> configure option - I very much doubt anyone has tested without SSL
>>> support in a long time.
>>
>>
>> Given what you said, attached is a patch which requires "openssl/ssl.h"
>> to be available. If not, configure bails out with an error message.
>
>
> Any feedback regarding this patch?

Not from me at least (yet). I've been up to my eyeballs all week at work.

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Re: crypto library is not installed

From
Dave Page
Date:
On Fri, Mar 14, 2014 at 9:12 AM, Dave Page <dpage@pgadmin.org> wrote:
> On Thu, Mar 13, 2014 at 7:24 PM, Andreas 'ads' Scherbaum
> <adsmail@wars-nicht.de> wrote:
>> On 03/04/2014 09:29 AM, Andreas 'ads' Scherbaum wrote:
>>>
>>> On 03/03/2014 02:44 PM, Dave Page wrote:
>>>>
>>>> On Mon, Mar 3, 2014 at 1:05 PM, Andreas 'ads' Scherbaum
>>>> <adsmail@wars-nicht.de> wrote:
>>>>>
>>>>> On 03/03/2014 11:32 AM, Dave Page wrote:
>>>>>>
>>>>>>
>>>>>> On Mon, Mar 3, 2014 at 10:20 AM, Andreas 'ads' Scherbaum
>>>>>> <adsmail@wars-nicht.de> wrote:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Yes, I know how to fix this. My question is: why is "configure" not
>>>>>>> checking
>>>>>>> for this library, when it is required to build pgAdmin3?
>>>>>>
>>>>>>
>>>>>>
>>>>>> Noone wrote the code I guess. Patches welcome :-)
>>>>>
>>>>>
>>>>>
>>>>> Just checking the code: why is it even requiring "crypto" when compiling
>>>>> without --with-openssl?
>>>>
>>>>
>>>> That's actually the likely reason why we don't do that test. It seems
>>>> to be required because we're linking with libpq which is linked with
>>>> OpenSSL, apps linking to it (on some platforms) also need to link with
>>>> libcypto. It may also be that an element of bitrot has crept into that
>>>> configure option - I very much doubt anyone has tested without SSL
>>>> support in a long time.
>>>
>>>
>>> Given what you said, attached is a patch which requires "openssl/ssl.h"
>>> to be available. If not, configure bails out with an error message.
>>
>>
>> Any feedback regarding this patch?
>
> Not from me at least (yet). I've been up to my eyeballs all week at work.

I took a quick look at this (and then passed the buck to Ashesh for
additional review and commit :-p ) - I think it's fine except that the
test needs to be inside the OpenSSL block above. See attached.

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Attachment

Re: crypto library is not installed

From
Andreas 'ads' Scherbaum
Date:
On 03/14/2014 12:39 PM, Dave Page wrote:
 >
> I took a quick look at this (and then passed the buck to Ashesh for
> additional review and commit :-p ) - I think it's fine except that the
> test needs to be inside the OpenSSL block above. See attached.

Not sure you want to move this into this check: as you pointed out,
libpq is pulling in SSL anyway, therefore this check should be
standalone. The optional --with-openssl should be removed instead,
because it's no longer optional.


Regards,

--
                Andreas 'ads' Scherbaum
German PostgreSQL User Group
European PostgreSQL User Group - Board of Directors
Volunteer Regional Contact, Germany - PostgreSQL Project


Re: crypto library is not installed

From
Dave Page
Date:
On Fri, Mar 14, 2014 at 12:37 PM, Andreas 'ads' Scherbaum
<adsmail@wars-nicht.de> wrote:
> On 03/14/2014 12:39 PM, Dave Page wrote:
>>
>>
>> I took a quick look at this (and then passed the buck to Ashesh for
>> additional review and commit :-p ) - I think it's fine except that the
>> test needs to be inside the OpenSSL block above. See attached.
>
>
> Not sure you want to move this into this check: as you pointed out, libpq is
> pulling in SSL anyway, therefore this check should be standalone. The
> optional --with-openssl should be removed instead, because it's no longer
> optional.

Libpq doesn't *always* pull in OpenSSL.


--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Re: crypto library is not installed

From
Ashesh Vashi
Date:
Looks good to me.


On Fri, Mar 14, 2014 at 5:09 PM, Dave Page <dpage@pgadmin.org> wrote:
On Fri, Mar 14, 2014 at 9:12 AM, Dave Page <dpage@pgadmin.org> wrote:
> On Thu, Mar 13, 2014 at 7:24 PM, Andreas 'ads' Scherbaum
> <adsmail@wars-nicht.de> wrote:
>> On 03/04/2014 09:29 AM, Andreas 'ads' Scherbaum wrote:
>>>
>>> On 03/03/2014 02:44 PM, Dave Page wrote:
>>>>
>>>> On Mon, Mar 3, 2014 at 1:05 PM, Andreas 'ads' Scherbaum
>>>> <adsmail@wars-nicht.de> wrote:
>>>>>
>>>>> On 03/03/2014 11:32 AM, Dave Page wrote:
>>>>>>
>>>>>>
>>>>>> On Mon, Mar 3, 2014 at 10:20 AM, Andreas 'ads' Scherbaum
>>>>>> <adsmail@wars-nicht.de> wrote:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Yes, I know how to fix this. My question is: why is "configure" not
>>>>>>> checking
>>>>>>> for this library, when it is required to build pgAdmin3?
>>>>>>
>>>>>>
>>>>>>
>>>>>> Noone wrote the code I guess. Patches welcome :-)
>>>>>
>>>>>
>>>>>
>>>>> Just checking the code: why is it even requiring "crypto" when compiling
>>>>> without --with-openssl?
>>>>
>>>>
>>>> That's actually the likely reason why we don't do that test. It seems
>>>> to be required because we're linking with libpq which is linked with
>>>> OpenSSL, apps linking to it (on some platforms) also need to link with
>>>> libcypto. It may also be that an element of bitrot has crept into that
>>>> configure option - I very much doubt anyone has tested without SSL
>>>> support in a long time.
>>>
>>>
>>> Given what you said, attached is a patch which requires "openssl/ssl.h"
>>> to be available. If not, configure bails out with an error message.
>>
>>
>> Any feedback regarding this patch?
>
> Not from me at least (yet). I've been up to my eyeballs all week at work.

I took a quick look at this (and then passed the buck to Ashesh for
additional review and commit :-p ) - I think it's fine except that the
test needs to be inside the OpenSSL block above. See attached.

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


--
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers




--
--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA:
Enterprise PostgreSQL Company

 

http://www.linkedin.com/in/asheshvashi

Re: crypto library is not installed

From
Ashesh Vashi
Date:
On Fri, Mar 21, 2014 at 11:54 AM, Ashesh Vashi <ashesh.vashi@enterprisedb.com> wrote:
Looks good to me.
checked-in


On Fri, Mar 14, 2014 at 5:09 PM, Dave Page <dpage@pgadmin.org> wrote:
On Fri, Mar 14, 2014 at 9:12 AM, Dave Page <dpage@pgadmin.org> wrote:
> On Thu, Mar 13, 2014 at 7:24 PM, Andreas 'ads' Scherbaum
> <adsmail@wars-nicht.de> wrote:
>> On 03/04/2014 09:29 AM, Andreas 'ads' Scherbaum wrote:
>>>
>>> On 03/03/2014 02:44 PM, Dave Page wrote:
>>>>
>>>> On Mon, Mar 3, 2014 at 1:05 PM, Andreas 'ads' Scherbaum
>>>> <adsmail@wars-nicht.de> wrote:
>>>>>
>>>>> On 03/03/2014 11:32 AM, Dave Page wrote:
>>>>>>
>>>>>>
>>>>>> On Mon, Mar 3, 2014 at 10:20 AM, Andreas 'ads' Scherbaum
>>>>>> <adsmail@wars-nicht.de> wrote:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Yes, I know how to fix this. My question is: why is "configure" not
>>>>>>> checking
>>>>>>> for this library, when it is required to build pgAdmin3?
>>>>>>
>>>>>>
>>>>>>
>>>>>> Noone wrote the code I guess. Patches welcome :-)
>>>>>
>>>>>
>>>>>
>>>>> Just checking the code: why is it even requiring "crypto" when compiling
>>>>> without --with-openssl?
>>>>
>>>>
>>>> That's actually the likely reason why we don't do that test. It seems
>>>> to be required because we're linking with libpq which is linked with
>>>> OpenSSL, apps linking to it (on some platforms) also need to link with
>>>> libcypto. It may also be that an element of bitrot has crept into that
>>>> configure option - I very much doubt anyone has tested without SSL
>>>> support in a long time.
>>>
>>>
>>> Given what you said, attached is a patch which requires "openssl/ssl.h"
>>> to be available. If not, configure bails out with an error message.
>>
>>
>> Any feedback regarding this patch?
>
> Not from me at least (yet). I've been up to my eyeballs all week at work.

I took a quick look at this (and then passed the buck to Ashesh for
additional review and commit :-p ) - I think it's fine except that the
test needs to be inside the OpenSSL block above. See attached.

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


--
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers




--
--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA:
Enterprise PostgreSQL Company

 

http://www.linkedin.com/in/asheshvashi




--
--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA:
Enterprise PostgreSQL Company

 

http://www.linkedin.com/in/asheshvashi