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

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

Open
orbea opened this issue Sep 17, 2023 · 1 comment

Comments

@orbea
Copy link
Contributor

orbea commented Sep 17, 2023

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

gentoo-bot pushed a commit that referenced this issue Sep 17, 2023
Build fails starting with >= postfix-3.5.20.

Bug: #536
Signed-off-by: orbea <orbea@riseup.net>
@orbea
Copy link
Contributor Author

orbea commented Sep 17, 2023

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

libressl/portable#914

gentoo-bot pushed a commit that referenced this issue Dec 20, 2023
Bug: #536
Signed-off-by: orbea <orbea@riseup.net>
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

1 participant