gentoo / libressl

[MIRROR] LibreSSL ebuilds testing repository
https://gitweb.gentoo.org/repo/proj/libressl.git
72 stars 42 forks source link

mail-mta/postfix-3.8.1[ssl] - error: unknown type name 'OPENSSL_INIT_SETTINGS' #536

Open orbea opened 12 months ago

orbea commented 12 months ago

postfix for a long time has failed to build with libressl with unknown types and implicit function declarations.

tls_misc.c: In function 'tls_library_init':
tls_misc.c:705:5: error: unknown type name 'OPENSSL_INIT_SETTINGS'; did you mean 'OPENSSL_INIT_ATFORK'?
  705 |     OPENSSL_INIT_SETTINGS *init_settings;
      |     ^~~~~~~~~~~~~~~~~~~~~
      |     OPENSSL_INIT_ATFORK
tls_misc.c:729:26: error: implicit declaration of function 'OPENSSL_INIT_new'; did you mean 'OPENSSL_init_ssl'? [-Werror=implicit-function-declaration]
  729 |     if ((init_settings = OPENSSL_INIT_new()) == 0) {
      |                          ^~~~~~~~~~~~~~~~
      |                          OPENSSL_init_ssl
tls_misc.c:729:24: warning: assignment to 'int *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
  729 |     if ((init_settings = OPENSSL_INIT_new()) == 0) {
      |                        ^
tls_misc.c:735:10: error: implicit declaration of function 'OPENSSL_INIT_free'; did you mean 'OPENSSL_INIT_ASYNC'? [-Werror=implicit-function-declaration]
  735 |     do { OPENSSL_INIT_free(init_settings); return (init_res = (x)); } while(0)
      |          ^~~~~~~~~~~~~~~~~
tls_misc.c:786:13: note: in expansion of macro 'TLS_LIB_INIT_RETURN'
  786 |             TLS_LIB_INIT_RETURN(TLS_LIB_INIT_ERR);
      |             ^~~~~~~~~~~~~~~~~~~
tls_misc.c:789:9: error: implicit declaration of function 'OPENSSL_INIT_set_config_file_flags' [-Werror=implicit-function-declaration]
  789 |         OPENSSL_INIT_set_config_file_flags(init_settings, file_flags);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tls_misc.c:794:9: error: implicit declaration of function 'OPENSSL_INIT_set_config_filename' [-Werror=implicit-function-declaration]
  794 |         OPENSSL_INIT_set_config_filename(init_settings, conf_file);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tls_misc.c:796:9: error: implicit declaration of function 'OPENSSL_INIT_set_config_appname' [-Werror=implicit-function-declaration]
  796 |         OPENSSL_INIT_set_config_appname(init_settings, conf_name);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make: *** [Makefile:92: tls_misc.o] Error 1
make: *** Waiting for unfinished jobs....
tls_dane.c: In function 'tls_dane_enable':
tls_dane.c:803:15: error: implicit declaration of function 'SSL_dane_tlsa_add' [-Werror=implicit-function-declaration]
  803 |         ret = SSL_dane_tlsa_add(ssl, tp->usage, tp->selector,
      |               ^~~~~~~~~~~~~~~~~
tls_dane.c: In function 'tls_dane_digest_init':
tls_dane.c:952:13: error: implicit declaration of function 'SSL_CTX_dane_mtype_set' [-Werror=implicit-function-declaration]
  952 |         if (SSL_CTX_dane_mtype_set(ctx, mtypes[m].alg, m,
      |             ^~~~~~~~~~~~~~~~~~~~~~
tls_dane.c: In function 'tls_dane_log':
tls_dane.c:968:21: error: implicit declaration of function 'SSL_get0_dane_authority' [-Werror=implicit-function-declaration]
  968 |     int     depth = SSL_get0_dane_authority(TLScontext->con, NULL, &mspki);
      |                     ^~~~~~~~~~~~~~~~~~~~~~~
tls_dane.c:989:12: error: implicit declaration of function 'SSL_get0_dane_tlsa' [-Werror=implicit-function-declaration]
  989 |     (void) SSL_get0_dane_tlsa(TLScontext->con, &u, &s, &m, &data, &dlen);
      |            ^~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make: *** [Makefile:92: tls_dane.o] Error 1
tls_certkey.c: In function 'use_chain':
tls_certkey.c:163:15: error: implicit declaration of function 'SSL_CTX_use_cert_and_key'; did you mean 'SSL_CTX_use_certificate'? [-Werror=implicit-function-declaration]
  163 |         ret = SSL_CTX_use_cert_and_key(st->ctx, st->cert, st->pkey, st->chain,
      |               ^~~~~~~~~~~~~~~~~~~~~~~~
      |               SSL_CTX_use_certificate
tls_certkey.c:166:15: error: implicit declaration of function 'SSL_use_cert_and_key' [-Werror=implicit-function-declaration]
  166 |         ret = SSL_use_cert_and_key(st->ssl, st->cert, st->pkey, st->chain,
      |               ^~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make: *** [Makefile:92: tls_certkey.o] Error 1
make: *** [Makefile:102: update] Error 1

Build log: build.log

Unfortunately for us OpenBSD uses openssl to build postfix.

https://github.com/openbsd/ports/blob/dce94975560b18e52943920a42ff29ca6a191611/mail/postfix/stable/Makefile#L7

orbea commented 12 months ago

Additionally >= 3.5.20 is also broken as described in this LibreSSL issue.

https://github.com/libressl/portable/issues/914