pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #14308: Postgres 9.5.4 does not configure against OpenSSL 1.1.0
4+ messages / 3 participants
[nested] [flat]

* BUG #14308: Postgres 9.5.4 does not configure against OpenSSL 1.1.0
@ 2016-09-02 06:10 noloader@gmail.com
  2016-09-02 06:21 ` Re: BUG #14308: Postgres 9.5.4 does not configure against OpenSSL 1.1.0 Michael Paquier <michael.paquier@gmail.com>
  0 siblings, 1 reply; 4+ messages in thread

From: noloader@gmail.com @ 2016-09-02 06:10 UTC (permalink / raw)
  To: pgsql-bugs

The following bug has been logged on the website:

Bug reference:      14308
Logged by:          Jeffrey Walton
Email address:      noloader@gmail.com
PostgreSQL version: 9.5.4
Operating system:   OS X
Description:        

OpenSSL 1.1.0 does not use SSL_library_init. Instead, it uses 
OPENSSL_init_ssl.

$ ./configure --with-openssl --with-includes=/usr/local/ssl/include
--with-libraries=/usr/local/ssl/lib
...

Results in:

checking for SSL_library_init in -lssl... no
configure: error: library 'ssl' is required for OpenSSL

Relevant entry from 'config.log':

configure:8732: gcc -o conftest -Wall -Wmissing-prototypes -Wpointer-arith
-Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute
-Wformat-security -fno-strict-aliasing -fwrapv
-Wno-unused-command-line-argument -I/usr/local/ssl/include
-L/usr/local/ssl/lib   -I/usr/local/ssl/include   -L/usr/local/ssl/lib
conftest.c -lssl  -lcrypto -lz -lreadline -lm  >&5
Undefined symbols for architecture x86_64:
  "_SSL_library_init", referenced from:
      _main in conftest-c0c2a1.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
configure:8732: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "PostgreSQL"
| #define PACKAGE_TARNAME "postgresql"
| #define PACKAGE_VERSION "9.5.4"
| #define PACKAGE_STRING "PostgreSQL 9.5.4"
| #define PACKAGE_BUGREPORT "pgsql-bugs@postgresql.org"
| #define PACKAGE_URL ""
| #define PG_MAJORVERSION "9.5"
| #define PG_VERSION "9.5.4"
| #define USE_INTEGER_DATETIMES 1
| #define DEF_PGPORT 5432
| #define DEF_PGPORT_STR "5432"
| #define BLCKSZ 8192
| #define RELSEG_SIZE 131072
| #define XLOG_BLCKSZ 8192
| #define XLOG_SEG_SIZE (16 * 1024 * 1024)
| #define ENABLE_THREAD_SAFETY 1
| #define PG_KRB_SRVNAM "postgres"
| #define USE_OPENSSL 1
| #define HAVE_LIBM 1
| #define HAVE_LIBREADLINE 1
| #define HAVE_LIBZ 1
| #define HAVE_SPINLOCKS 1
| #define HAVE_ATOMICS 1
| #define HAVE_LIBCRYPTO 1
| /* end confdefs.h.  */
| 
| /* Override any GCC internal prototype to avoid an error.
|    Use char because int might match the return type of a GCC
|    builtin and then its argument prototype would still apply.  */
| #ifdef __cplusplus
| extern "C"
| #endif
| char SSL_library_init ();
| int
| main ()
| {
| return SSL_library_init ();
|   ;
|   return 0;
| }
configure:8741: result: no
configure:8751: error: library 'ssl' is required for OpenSSL


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


^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: BUG #14308: Postgres 9.5.4 does not configure against OpenSSL 1.1.0
  2016-09-02 06:10 BUG #14308: Postgres 9.5.4 does not configure against OpenSSL 1.1.0 noloader@gmail.com
@ 2016-09-02 06:21 ` Michael Paquier <michael.paquier@gmail.com>
  2016-09-04 04:07   ` Re: BUG #14308: Postgres 9.5.4 does not configure against OpenSSL 1.1.0 Jeffrey Walton <noloader@gmail.com>
  0 siblings, 1 reply; 4+ messages in thread

From: Michael Paquier @ 2016-09-02 06:21 UTC (permalink / raw)
  To: noloader@gmail.com; +Cc: pgsql-bugs

On Fri, Sep 2, 2016 at 3:10 PM,  <noloader@gmail.com> wrote:
> OpenSSL 1.1.0 does not use SSL_library_init. Instead, it uses
> OPENSSL_init_ssl.

The work to be done with OpenSSL 1.1.0 is discussed here:
https://www.postgresql.org/message-id/20160627151604.GD1051@msg.df7cb.de
I'd expect a patch to land soon.
-- 
Michael


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



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: BUG #14308: Postgres 9.5.4 does not configure against OpenSSL 1.1.0
  2016-09-02 06:10 BUG #14308: Postgres 9.5.4 does not configure against OpenSSL 1.1.0 noloader@gmail.com
  2016-09-02 06:21 ` Re: BUG #14308: Postgres 9.5.4 does not configure against OpenSSL 1.1.0 Michael Paquier <michael.paquier@gmail.com>
@ 2016-09-04 04:07   ` Jeffrey Walton <noloader@gmail.com>
  2016-09-04 04:44     ` Re: BUG #14308: Postgres 9.5.4 does not configure against OpenSSL 1.1.0 Michael Paquier <michael.paquier@gmail.com>
  0 siblings, 1 reply; 4+ messages in thread

From: Jeffrey Walton @ 2016-09-04 04:07 UTC (permalink / raw)
  To: Michael Paquier <michael.paquier@gmail.com>; +Cc: pgsql-bugs

The following gets past the OpenSSL 1.1.0 configuration problems.

It was tested against Postgres 9.5.4 and Master (6591f4226c81104f).
Thanks to ldav1s at http://stackoverflow.com/q/39285733 (I'm an
OpenSSL guy; not an Autoconf guy).

$ git diff configure.in > configure.in.patch
riemann:postgresql$ cat configure.in.patch
inline patch 1: configure.in (+0/-0 lines) download inline-1.patchdiff --git a/configure.in b/configure.in index c878b4e..c12bfb6 100644 --- a/configure.in +++ b/configure.in @@ -1112,10 +1112,16 @@ if test "$with_openssl" = yes ; then dnl Order matters! if test "$PORTNAME" != "win32"; then AC_CHECK_LIB(crypto, CRYPTO_new_ex_data, [],
[AC_MSG_ERROR([library 'crypto' is required for OpenSSL])]) - AC_CHECK_LIB(ssl, SSL_library_init, [], [AC_MSG_ERROR([library 'ssl' is required for OpenSSL])]) + FOUND_SSL_LIB="no" + AC_CHECK_LIB(ssl, OPENSSL_init_ssl, [FOUND_SSL_LIB="yes"]) + AC_CHECK_LIB(ssl, SSL_library_init, [FOUND_SSL_LIB="yes"]) + AS_IF([test "x$FOUND_SSL_LIB" = xno], [AC_MSG_ERROR([library 'ssl' is required for OpenSSL])]) else AC_SEARCH_LIBS(CRYPTO_new_ex_data, eay32 crypto, [], [AC_MSG_ERROR([library 'eay32' or 'crypto' is required for OpenSSL])]) - AC_SEARCH_LIBS(SSL_library_init, ssleay32 ssl, [], [AC_MSG_ERROR([library 'ssleay32' or 'ssl' is required for OpenSSL])]) + FOUND_SSL_LIB="no" + AC_SEARCH_LIBS(ssleay32 ssl, OPENSSL_init_ssl, [FOUND_SSL_LIB="yes"]) + AC_SEARCH_LIBS(ssleay32 ssl, SSL_library_init, [FOUND_SSL_LIB="yes"]) + AS_IF([test "x$FOUND_SSL_LIB" = xno], [AC_MSG_ERROR([library 'ssleay32' or 'ssl' is required for OpenSSL])]) fi AC_CHECK_FUNCS([SSL_get_current_compression]) fi On Fri, Sep 2, 2016 at 2:21 AM, Michael Paquier <michael.paquier@gmail.com> wrote: > On Fri, Sep 2, 2016 at 3:10 PM, <noloader@gmail.com> wrote: >> OpenSSL 1.1.0 does not use SSL_library_init. Instead, it uses >> OPENSSL_init_ssl. > > The work to be done with OpenSSL 1.1.0 is discussed here: > https://www.postgresql.org/message-id/20160627151604.GD1051@msg.df7cb.de > I'd expect a patch to land soon. > -- > Michael -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs Patches and attachments: download all (2 files, .tar.gz)
configure.in.patch (text/x-patch, 1.3K) download diff --git a/configure.in b/configure.in index c878b4e..c12bfb6 100644 --- a/configure.in +++ b/configure.in @@ -1112,10 +1112,16 @@ if test "$with_openssl" = yes ; then dnl Order matters! if test "$PORTNAME" != "win32"; then AC_CHECK_LIB(crypto, CRYPTO_new_ex_data, [], [AC_MSG_ERROR([library 'crypto' is required for OpenSSL])]) - AC_CHECK_LIB(ssl, SSL_library_init, [], [AC_MSG_ERROR([library 'ssl' is required for OpenSSL])]) + FOUND_SSL_LIB="no" + AC_CHECK_LIB(ssl, OPENSSL_init_ssl, [FOUND_SSL_LIB="yes"]) + AC_CHECK_LIB(ssl, SSL_library_init, [FOUND_SSL_LIB="yes"]) + AS_IF([test "x$FOUND_SSL_LIB" = xno], [AC_MSG_ERROR([library 'ssl' is required for OpenSSL])]) else AC_SEARCH_LIBS(CRYPTO_new_ex_data, eay32 crypto, [], [AC_MSG_ERROR([library 'eay32' or 'crypto' is required for OpenSSL])]) - AC_SEARCH_LIBS(SSL_library_init, ssleay32 ssl, [], [AC_MSG_ERROR([library 'ssleay32' or 'ssl' is required for OpenSSL])]) + FOUND_SSL_LIB="no" + AC_SEARCH_LIBS(ssleay32 ssl, OPENSSL_init_ssl, [FOUND_SSL_LIB="yes"]) + AC_SEARCH_LIBS(ssleay32 ssl, SSL_library_init, [FOUND_SSL_LIB="yes"]) + AS_IF([test "x$FOUND_SSL_LIB" = xno], [AC_MSG_ERROR([library 'ssleay32' or 'ssl' is required for OpenSSL])]) fi AC_CHECK_FUNCS([SSL_get_current_compression]) fi
^ permalink raw reply [nested|flat] 4+ messages in thread

* Re: BUG #14308: Postgres 9.5.4 does not configure against OpenSSL 1.1.0
  2016-09-02 06:10 BUG #14308: Postgres 9.5.4 does not configure against OpenSSL 1.1.0 noloader@gmail.com
  2016-09-02 06:21 ` Re: BUG #14308: Postgres 9.5.4 does not configure against OpenSSL 1.1.0 Michael Paquier <michael.paquier@gmail.com>
  2016-09-04 04:07   ` Re: BUG #14308: Postgres 9.5.4 does not configure against OpenSSL 1.1.0 Jeffrey Walton <noloader@gmail.com>
@ 2016-09-04 04:44     ` Michael Paquier <michael.paquier@gmail.com>
  0 siblings, 0 replies; 4+ messages in thread

From: Michael Paquier @ 2016-09-04 04:44 UTC (permalink / raw)
  To: noloader@gmail.com; +Cc: pgsql-bugs

On Sun, Sep 4, 2016 at 1:07 PM, Jeffrey Walton <noloader@gmail.com> wrote:
> The following gets past the OpenSSL 1.1.0 configuration problems.
>
> It was tested against Postgres 9.5.4 and Master (6591f4226c81104f).
> Thanks to ldav1s at http://stackoverflow.com/q/39285733 (I'm an
> OpenSSL guy; not an Autoconf guy).

Yes, a similar method is part of the existing patches. Note that this
is not enough, the exiting code would not go through compilation. If
you have an interest in getting that done, I think that it would be
good if you could review the existing patches and help to move on.
-- 
Michael


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



^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2016-09-04 04:44 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-09-02 06:10 BUG #14308: Postgres 9.5.4 does not configure against OpenSSL 1.1.0 noloader@gmail.com
2016-09-02 06:21 ` Michael Paquier <michael.paquier@gmail.com>
2016-09-04 04:07   ` Jeffrey Walton <noloader@gmail.com>
2016-09-04 04:44     ` Michael Paquier <michael.paquier@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox