Created attachment 477596 [details] build.log openldap-2.4.45 does not build against (current ~amd64) libressl-2.5.4. This is not the same as bug 580888: openldap-2.4.44 does still build here. The errors are caused by changes to tls_o.c. That file now uses some new openssl functions, with backwards compatibility #defines (that fall back to code from openldap-2.4.44) behind OPENSSL_VERSION_NUMBER checks. libressl sets a high OPENSSL_VERSION_NUMBER (0x20000000L) but does not provide the functionality openldap expects. I don't know if there's a quick fix for this. Checking for the actual functionality provided by the ssl library from configure instead of using version checks would probably be the most robust fix, but if upstream is not interested in supporting LibreSSL they might not want to carry those checks. Full build.log attached. Relevant errors: /var/tmp/portage/net-nds/openldap-2.4.45/work/openldap-2.4.45/libraries/libldap/tls_o.c: In function ‘tlso_init’: /var/tmp/portage/net-nds/openldap-2.4.45/work/openldap-2.4.45/libraries/libldap/tls_o.c:165:2: warning: implicit declaration of function ‘OPENSSL_init_ssl’ [-Wimplicit-function-declaration] OPENSSL_init_ssl(0, NULL); ^~~~~~~~~~~~~~~~ /var/tmp/portage/net-nds/openldap-2.4.45/work/openldap-2.4.45/libraries/libldap/tls_o.c: In function ‘tlso_ctx_ref’: /var/tmp/portage/net-nds/openldap-2.4.45/work/openldap-2.4.45/libraries/libldap/tls_o.c:211:2: warning: implicit declaration of function ‘SSL_CTX_up_ref’ [-Wimplicit-function-declaration] SSL_CTX_up_ref( c ); ^~~~~~~~~~~~~~ /var/tmp/portage/net-nds/openldap-2.4.45/work/openldap-2.4.45/libraries/libldap/tls_o.c: In function ‘tlso_session_my_dn’: /var/tmp/portage/net-nds/openldap-2.4.45/work/openldap-2.4.45/libraries/libldap/tls_o.c:474:3: warning: implicit declaration of function ‘X509_NAME_get0_der’ [-Wimplicit-function-declaration] X509_NAME_get0_der( xn, (const unsigned char **)&der_dn->bv_val, &len ); ^~~~~~~~~~~~~~~~~~ /var/tmp/portage/net-nds/openldap-2.4.45/work/openldap-2.4.45/libraries/libldap/tls_o.c: In function ‘tlso_session_chkhost’: /var/tmp/portage/net-nds/openldap-2.4.45/work/openldap-2.4.45/libraries/libldap/tls_o.c:51:29: warning: implicit declaration of function ‘ASN1_STRING_get0_data’ [-Wimplicit-function-declaration] #define ASN1_STRING_data(x) ASN1_STRING_get0_data(x) ^ /var/tmp/portage/net-nds/openldap-2.4.45/work/openldap-2.4.45/libraries/libldap/tls_o.c:593:20: note: in expansion of macro ‘ASN1_STRING_data’ sn = (char *) ASN1_STRING_data(gn->d.ia5); ^~~~~~~~~~~~~~~~ /var/tmp/portage/net-nds/openldap-2.4.45/work/openldap-2.4.45/libraries/libldap/tls_o.c:593:11: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] sn = (char *) ASN1_STRING_data(gn->d.ia5); ^ /var/tmp/portage/net-nds/openldap-2.4.45/work/openldap-2.4.45/libraries/libldap/tls_o.c:614:11: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] sn = (char *) ASN1_STRING_data(gn->d.ia5); ^ /var/tmp/portage/net-nds/openldap-2.4.45/work/openldap-2.4.45/libraries/libldap/tls_o.c: In function ‘tlso_bio_create’: /var/tmp/portage/net-nds/openldap-2.4.45/work/openldap-2.4.45/libraries/libldap/tls_o.c:732:2: warning: implicit declaration of function ‘BIO_set_init’ [-Wimplicit-function-declaration] BIO_set_init( b, 1 ); ^~~~~~~~~~~~ /var/tmp/portage/net-nds/openldap-2.4.45/work/openldap-2.4.45/libraries/libldap/tls_o.c:733:2: warning: implicit declaration of function ‘BIO_set_data’ [-Wimplicit-function-declaration] BIO_set_data( b, NULL ); ^~~~~~~~~~~~ /var/tmp/portage/net-nds/openldap-2.4.45/work/openldap-2.4.45/libraries/libldap/tls_o.c: In function ‘tlso_bio_read’: /var/tmp/portage/net-nds/openldap-2.4.45/work/openldap-2.4.45/libraries/libldap/tls_o.c:757:25: warning: implicit declaration of function ‘BIO_get_data’ [-Wimplicit-function-declaration] p = (struct tls_data *)BIO_get_data(b); ^~~~~~~~~~~~ /var/tmp/portage/net-nds/openldap-2.4.45/work/openldap-2.4.45/libraries/libldap/tls_o.c:757:6: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] p = (struct tls_data *)BIO_get_data(b); ^ /var/tmp/portage/net-nds/openldap-2.4.45/work/openldap-2.4.45/libraries/libldap/tls_o.c: In function ‘tlso_bio_write’: /var/tmp/portage/net-nds/openldap-2.4.45/work/openldap-2.4.45/libraries/libldap/tls_o.c:784:6: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] p = (struct tls_data *)BIO_get_data(b); ^ /var/tmp/portage/net-nds/openldap-2.4.45/work/openldap-2.4.45/libraries/libldap/tls_o.c: At top level: /var/tmp/portage/net-nds/openldap-2.4.45/work/openldap-2.4.45/libraries/libldap/tls_o.c:826:8: error: redefinition of ‘struct bio_method_st’ struct bio_method_st { ^~~~~~~~~~~~~ In file included from /usr/include/openssl/evp.h:67:0, from /usr/include/openssl/hmac.h:67, from /usr/include/openssl/ssl.h:149, from /var/tmp/portage/net-nds/openldap-2.4.45/work/openldap-2.4.45/libraries/libldap/tls_o.c:41: /usr/include/openssl/bio.h:268:16: note: originally defined here typedef struct bio_method_st { ^~~~~~~~~~~~~ make[2]: *** [Makefile:414: tls_o.lo] Error 1
cc'ing libressl as they may be better equipped to handle this.
Fixed: https://gitweb.gentoo.org/repo/gentoo.git/commit/net-nds/openldap/openldap-2.4.45.ebuild?id=d8579d0f043e8eefe774b8aec6a21316e0a6c527