Re: pgsql: Fix contrib/pgcrypto to autoconfigure for OpenSSL when

Lists: pgsql-committers
From: tgl(at)svr1(dot)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix contrib/pgcrypto to autoconfigure for OpenSSL when
Date: 2005-07-05 23:13:58
Message-ID: 20050705231358.133395293B@svr1.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers

Log Message:
-----------
Fix contrib/pgcrypto to autoconfigure for OpenSSL when --with-openssl
is used in the toplevel configure. Per Marko Kreen.

Modified Files:
--------------
pgsql:
configure (r1.442 -> r1.443)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/configure.diff?r1=1.442&r2=1.443)
configure.in (r1.415 -> r1.416)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/configure.in.diff?r1=1.415&r2=1.416)
pgsql/contrib/pgcrypto:
Makefile (r1.14 -> r1.15)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/contrib/pgcrypto/Makefile.diff?r1=1.14&r2=1.15)
pgsql/src:
Makefile.global.in (r1.215 -> r1.216)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/Makefile.global.in.diff?r1=1.215&r2=1.216)


From: Kris Jurka <books(at)ejurka(dot)com>
To: tgl(at)sss(dot)pgh(dot)pa(dot)us
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Fix contrib/pgcrypto to autoconfigure for
Date: 2005-07-06 03:26:17
Message-ID: Pine.BSO.4.56.0507052222080.875@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers

On Tue, 5 Jul 2005, Tom Lane wrote:

> Log Message:
> -----------
> Fix contrib/pgcrypto to autoconfigure for OpenSSL when --with-openssl
> is used in the toplevel configure. Per Marko Kreen.
>

This seems to have broken the canary buildfarm member:


http://www.pgbuildfarm.org/cgi-bin/show_log.pl?nm=canary&dt=2005-07-06%2002:30:01

ldd on pgcrypto.so shows:

-lc.12 => /usr/lib/libc.so.12
-lcrypto.300 => /usr/pkg/lib/libcrypto.so.300
-lssl.300 => /usr/pkg/lib/libssl.so.300
-lcrypt.0 => /usr/lib/libcrypt.so.0

if that's any help.

Kris Jurka


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Kris Jurka <books(at)ejurka(dot)com>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Fix contrib/pgcrypto to autoconfigure for OpenSSL when
Date: 2005-07-06 05:20:01
Message-ID: 22127.1120627201@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers

Kris Jurka <books(at)ejurka(dot)com> writes:
> This seems to have broken the canary buildfarm member:

> http://www.pgbuildfarm.org/cgi-bin/show_log.pl?nm=canary&dt=2005-07-06%2002:30:01

Not a lot of help there:

ERROR: could not load library "/usr/home/pgfarm/netbsd/HEAD/inst/lib/postgresql/pgcrypto.so": dlopen (/usr/home/pgfarm/netbsd/HEAD/inst/lib/postgresql/pgcrypto.so) failed
ERROR: could not load library "/usr/home/pgfarm/netbsd/HEAD/inst/lib/postgresql/pgcrypto.so": dlopen (/usr/home/pgfarm/netbsd/HEAD/inst/lib/postgresql/pgcrypto.so) failed
ERROR: could not load library "/usr/home/pgfarm/netbsd/HEAD/inst/lib/postgresql/pgcrypto.so": dlopen (/usr/home/pgfarm/netbsd/HEAD/inst/lib/postgresql/pgcrypto.so) failed

On most Unixen that I've dealt with, this sort of shared-library load
failure is accompanied by some actually-useful detail messages on
stderr. It looks like the buildfarm infrastructure is losing that
detail :-(

regards, tom lane


From: Kris Jurka <books(at)ejurka(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Fix contrib/pgcrypto to autoconfigure for
Date: 2005-07-06 06:40:32
Message-ID: Pine.BSO.4.56.0507060137580.13716@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers

On Wed, 6 Jul 2005, Tom Lane wrote:

> Not a lot of help there:
>
> ERROR: could not load library "/usr/home/pgfarm/netbsd/HEAD/inst/lib/postgresql/pgcrypto.so": dlopen (/usr/home/pgfarm/netbsd/HEAD/inst/lib/postgresql/pgcrypto.so) failed
>
> On most Unixen that I've dealt with, this sort of shared-library load
> failure is accompanied by some actually-useful detail messages on
> stderr. It looks like the buildfarm infrastructure is losing that
> detail :-(
>

Actually it looks like the netbsd dynloader code is at fault. The
attached patch gives me:

ERROR: could not load library "/usr/home/jurka/tmp/pg81/lib/postgresql/pgcrypto.so":
dlopen '/usr/home/jurka/tmp/pg81/lib/postgresql/pgcrypto.so' failed.
(/usr/home/jurka/tmp/pg81/lib/postgresql/pgcrypto.so: Undefined PLT
symbol "DES_set_key" (reloc type = 7, symnum = 75))

Note also that openbsd's dynloader is missing this error reporting.

Kris Jurka

Attachment Content-Type Size
netbsd.dlopen.message.patch text/plain 792 bytes

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Kris Jurka <books(at)ejurka(dot)com>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Fix contrib/pgcrypto to autoconfigure for OpenSSL when
Date: 2005-07-06 16:58:07
Message-ID: 28079.1120669087@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers

Kris Jurka <books(at)ejurka(dot)com> writes:
> Actually it looks like the netbsd dynloader code is at fault. The
> attached patch gives me:

Patch applied, thanks.

> ERROR: could not load library "/usr/home/jurka/tmp/pg81/lib/postgresql/pgcrypto.so":
> dlopen '/usr/home/jurka/tmp/pg81/lib/postgresql/pgcrypto.so' failed.
> (/usr/home/jurka/tmp/pg81/lib/postgresql/pgcrypto.so: Undefined PLT
> symbol "DES_set_key" (reloc type = 7, symnum = 75))

Hm, so it seems that libssl or libcrypto isn't getting loaded in
properly. What does ldd (or local equivalent) say about pgcrypto.so's
dependencies? Are these libraries properly mentioned on the command
line when pgcrypto.so is linked?

regards, tom lane


From: Kris Jurka <books(at)ejurka(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Fix contrib/pgcrypto to autoconfigure for
Date: 2005-07-06 18:46:20
Message-ID: Pine.BSO.4.56.0507061323030.27929@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers

On Wed, 6 Jul 2005, Tom Lane wrote:

> Hm, so it seems that libssl or libcrypto isn't getting loaded in
> properly. What does ldd (or local equivalent) say about pgcrypto.so's
> dependencies? Are these libraries properly mentioned on the command
> line when pgcrypto.so is linked?
>

Actually looks like a compile time problem:

gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -fno-strict-aliasing -g
-fpic -DPIC -DRAND_OPENSSL -I. -I../../src/include -I/usr/pkg/include -c
-o openssl.o openssl.c
openssl.c: In function `ossl_des3_init':
openssl.c:403: warning: implicit declaration of function `DES_set_key'
openssl.c: In function `ossl_des3_ecb_encrypt':
openssl.c:426: warning: implicit declaration of function
`DES_ecb3_encrypt'
openssl.c: In function `ossl_des3_cbc_encrypt':
openssl.c:451: warning: implicit declaration of function
`DES_ede3_cbc_encrypt'

<openssl/des.h> has entries for des_set_key (and lowercase versions of
others), but not DES_set_key. Adjusting the code to use the lowercase
versions results in compile warnings, but the regression tests pass
(except for rijndael which fails with 'ERROR: Cannot use "aes": No such
cipher algorithm'. I've got OpenSSL 0.9.6g 9 Aug 2002, is that just too
old?

Kris Jurka

gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -fno-strict-aliasing
-g -fpic -DPIC -DRAND_OPENSSL -I. -I../../src/include -I/usr/pkg/include
-c -o openssl.o openssl.c
openssl.c: In function `ossl_des3_init':
openssl.c:403: warning: passing arg 2 of `des_set_key' from incompatible
pointer type
openssl.c:404: warning: passing arg 2 of `des_set_key' from incompatible
pointer type
openssl.c:405: warning: passing arg 2 of `des_set_key' from incompatible
pointer type
openssl.c: In function `ossl_des3_ecb_encrypt':
openssl.c:427: warning: passing arg 1 of `des_ecb3_encrypt' from
incompatible pointer type
openssl.c:427: warning: passing arg 2 of `des_ecb3_encrypt' from
incompatible pointer type
openssl.c:427: warning: passing arg 3 of `des_ecb3_encrypt' from
incompatible pointer type
openssl.c:427: warning: passing arg 4 of `des_ecb3_encrypt' from
incompatible pointer type
openssl.c:427: warning: passing arg 5 of `des_ecb3_encrypt' from
incompatible pointer type
openssl.c: In function `ossl_des3_ecb_decrypt':
openssl.c:441: warning: passing arg 1 of `des_ecb3_encrypt' from
incompatible pointer type
openssl.c:441: warning: passing arg 2 of `des_ecb3_encrypt' from
incompatible pointer type
openssl.c:441: warning: passing arg 3 of `des_ecb3_encrypt' from
incompatible pointer type
openssl.c:441: warning: passing arg 4 of `des_ecb3_encrypt' from
incompatible pointer type
openssl.c:441: warning: passing arg 5 of `des_ecb3_encrypt' from
incompatible pointer type
openssl.c: In function `ossl_des3_cbc_encrypt':
openssl.c:453: warning: passing arg 4 of `des_ede3_cbc_encrypt' from
incompatible pointer type
openssl.c:453: warning: passing arg 5 of `des_ede3_cbc_encrypt' from
incompatible pointer type
openssl.c:453: warning: passing arg 6 of `des_ede3_cbc_encrypt' from
incompatible pointer type
openssl.c: In function `ossl_des3_cbc_decrypt':
openssl.c:465: warning: passing arg 4 of `des_ede3_cbc_encrypt' from
incompatible pointer type
openssl.c:465: warning: passing arg 5 of `des_ede3_cbc_encrypt' from
incompatible pointer type
openssl.c:465: warning: passing arg 6 of `des_ede3_cbc_encrypt' from
incompatible pointer type
,


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Kris Jurka <books(at)ejurka(dot)com>
Cc: pgsql-committers(at)postgresql(dot)org, Marko Kreen <marko(at)l-t(dot)ee>
Subject: Re: pgsql: Fix contrib/pgcrypto to autoconfigure for OpenSSL when
Date: 2005-07-06 18:57:50
Message-ID: 29373.1120676270@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers

Kris Jurka <books(at)ejurka(dot)com> writes:
> I've got OpenSSL 0.9.6g 9 Aug 2002, is that just too old?

Not sure --- I forwarded your message to Marko for comment.

According to http://www.openssl.org/news/ you're short at least two
security fixes, so I don't feel any strong need to support 0.9.6g per se.
But if the same API issue exists in 0.9.6-current then we probably ought
to think about whether we can cope. It looks to me like 0.9.6 is still
considered a supported branch by the OpenSSL community.

regards, tom lane