From: noloader@gmail.com
To: pgsql-bugs@postgresql.org
Subject: BUG #14309: SSL_get_current_compression magic from port.h breaks compile against OpenSSL 1.1.0
Date: Sun, 04 Sep 2016 04:45:59 +0000
Message-ID: <20160904044559.1411.98981@wrigleys.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
The following bug has been logged on the website:
Bug reference: 14309
Logged by: Jeffrey Walton
Email address: noloader@gmail.com
PostgreSQL version: Unsupported/Unknown
Operating system: OS X
Description:
I'm working from Master (6591f4226c81104f7746). I'm also using OpenSSL
1.1.0.
gcc -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../../../../src/include
-I/usr/local/ssl/include -c -o printtup.o printtup.c
In file included from printtup.c:19:
In file included from ../../../../src/include/libpq/libpq.h:21:
In file included from ../../../../src/include/libpq/libpq-be.h:25:
/usr/local/ssl/include/openssl/ssl.h:1777:27: error: expected identifier or
'('
__owur const COMP_METHOD *SSL_get_current_compression(SSL *s);
^
../../../../src/include/port.h:418:40: note: expanded from macro
'SSL_get_current_compression'
#define SSL_get_current_compression(x) 0
^
1 error generated.
<builtin>: recipe for target 'printtup.o' failed
make[4]: *** [printtup.o] Error 1
*****
It looks like port.h does this:
#ifndef HAVE_SSL_GET_CURRENT_COMPRESSION
#define SSL_get_current_compression(x) 0
#endif
I could be mistaken, but SSL_get_current_compression is an OpenSSL symbol.
Postgres should not be doing anything with OpenSSL symbols other than using
them.
*****
Here are the various configure's.
OpenSSL:
$ ./Configure darwin64-x86_64-cc shared enable-ec_nistp_64_gcc_128 no-ssl2
no-ssl3 no-comp --openssldir=/usr/local/ssl --prefix=/usr/local/ssl
Postgres:
$ ./configure --with-openssl --with-includes=/usr/local/ssl/include
--with-libraries=/usr/local/ssl/lib
*****
Here's what <openssl/ssl.h> looks like:
...
__owur const COMP_METHOD *SSL_get_current_compression(SSL *s);
__owur const COMP_METHOD *SSL_get_current_expansion(SSL *s);
__owur const char *SSL_COMP_get_name(const COMP_METHOD *comp);
STACK_OF(SSL_COMP) *SSL_COMP_get_compression_methods(void);
__owur STACK_OF(SSL_COMP)
*SSL_COMP_set0_compression_methods(STACK_OF(SSL_COMP)
*meths);
#if OPENSSL_API_COMPAT < 0x10100000L
# define SSL_COMP_free_compression_methods() while(0) continue
#endif
__owur int SSL_COMP_add_compression_method(int id, COMP_METHOD *cm);
...
#endif
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: noloader@gmail.com
Subject: Re: BUG #14309: SSL_get_current_compression magic from port.h breaks compile against OpenSSL 1.1.0
In-Reply-To: <20160904044559.1411.98981@wrigleys.postgresql.org>
References: <20160904044559.1411.98981@wrigleys.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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