Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

openssl_iostream.c error #56

Open
gz15028 opened this issue Dec 4, 2020 · 2 comments
Open

openssl_iostream.c error #56

gz15028 opened this issue Dec 4, 2020 · 2 comments

Comments

@gz15028
Copy link

gz15028 commented Dec 4, 2020

Hello,
I was trying to recompile the lib from source on Ubuntu 18.04 with gcc 7.5.0 and openssl 1.1.1d.
The following error occurred:

libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -pthread -I/usr/local/include -Wpedantic -Wvla -g -O2 -std=gnu11 -fvisibility=hidden -pipe -Wall -W -Werror -Wno-unused-parameter -Wno-missing-field-initializers -Wpointer-arith -Wstrict-prototypes -Wcast-qual -Wcast-align -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=deprecated-declarations -MT libneo4j_client_la-openssl_iostream.lo -MD -MP -MF .deps/libneo4j_client_la-openssl_iostream.Tpo -c openssl_iostream.c -fPIC -DPIC -o .libs/libneo4j_client_la-openssl_iostream.o
openssl_iostream.c:56:1: error: variable ‘_iostream_bio_method’ has initializer but incomplete type
static BIO_METHOD _iostream_bio_method = {
^~~~~~
openssl_iostream.c:57:5: error: excess elements in struct initializer [-Werror]
BIO_TYPE_FILTER,
^~~~~~~~~~~~~~~
openssl_iostream.c:57:5: note: (near initialization for ‘_iostream_bio_method’)
openssl_iostream.c:58:5: error: excess elements in struct initializer [-Werror]
"neo4j_openssl_iostream",
^~~~~~~~~~~~~~~~~~~~~~~~
openssl_iostream.c:58:5: note: (near initialization for ‘_iostream_bio_method’)
openssl_iostream.c:59:5: error: excess elements in struct initializer [-Werror]
iostream_bio_write,
^~~~~~~~~~~~~~~~~~
openssl_iostream.c:59:5: note: (near initialization for ‘_iostream_bio_method’)
openssl_iostream.c:60:5: error: excess elements in struct initializer [-Werror]
iostream_bio_read,
^~~~~~~~~~~~~~~~~
openssl_iostream.c:60:5: note: (near initialization for ‘_iostream_bio_method’)
openssl_iostream.c:61:5: error: excess elements in struct initializer [-Werror]
iostream_bio_puts,
^~~~~~~~~~~~~~~~~
openssl_iostream.c:61:5: note: (near initialization for ‘_iostream_bio_method’)
openssl_iostream.c:62:5: error: excess elements in struct initializer [-Werror]
iostream_bio_gets,
^~~~~~~~~~~~~~~~~
openssl_iostream.c:62:5: note: (near initialization for ‘_iostream_bio_method’)
openssl_iostream.c:63:5: error: excess elements in struct initializer [-Werror]
iostream_bio_ctrl,
^~~~~~~~~~~~~~~~~
openssl_iostream.c:63:5: note: (near initialization for ‘_iostream_bio_method’)
openssl_iostream.c:64:5: error: excess elements in struct initializer [-Werror]
iostream_bio_create,
^~~~~~~~~~~~~~~~~~~
openssl_iostream.c:64:5: note: (near initialization for ‘_iostream_bio_method’)
openssl_iostream.c:65:5: error: excess elements in struct initializer [-Werror]
iostream_bio_destroy
^~~~~~~~~~~~~~~~~~~~
openssl_iostream.c:65:5: note: (near initialization for ‘_iostream_bio_method’)
openssl_iostream.c: In function ‘neo4j_openssl_iostream’:
openssl_iostream.c:68:38: error: dereferencing pointer to incomplete type ‘BIO {aka struct bio_st}’
#define BIO_set_data(bio, value) (bio->ptr = (value))
^
openssl_iostream.c:121:5: note: in expansion of macro ‘BIO_set_data’
BIO_set_data(iostream_bio, delegate);
^~~~~~~~~~~~
openssl_iostream.c: At top level:
openssl_iostream.c:56:19: error: storage size of ‘_iostream_bio_method’ isn’t known
static BIO_METHOD _iostream_bio_method = {
^~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
Makefile:784: recipe for target 'libneo4j_client_la-openssl_iostream.lo' failed
make[3]: *** [libneo4j_client_la-openssl_iostream.lo] Error 1

Any idea what could be the reason? Thanks a lot!

@majensen
Copy link

majensen commented Dec 8, 2020

Incredibly, I may know the fix for this.
OpenSSL 1.1.1 made a bunch of breaking changes to its API from 1.0.2. Luckily, @cleishm made it possible to use the new API, but it is currently obscure.

Try configuring as follows
CFLAGS="-DHAVE_BIO_METH_NEW" ./configure
and make from there.

@gz15028
Copy link
Author

gz15028 commented Jan 4, 2021

It works! thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants