Bug 267673 - mail/sendmail Fails to build with libressl 3.5: tls.c:105:4: error: incomplete definition of type 'struct dh_st'
Summary: mail/sendmail Fails to build with libressl 3.5: tls.c:105:4: error: incomplet...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Dirk Meyer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-11-09 23:16 UTC by Dave Hayes
Modified: 2022-11-13 14:12 UTC (History)
1 user (show)

See Also:
dinoex: maintainer-feedback+
dinoex: maintainer-feedback+
dinoex: merge-quarterly-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dave Hayes 2022-11-09 23:16:14 UTC
Latest HEAD (11/9/22) does not build sendmail with SSL=libressl 


cc  -O2 -pipe  -fstack-protector-strong -fno-strict-aliasing -I. -I../../include  -I/usr/local/include -I/usr/local/include -DNEWDB -DMAP_REGEX -DUSE_EAI -DTCPWRAPPERS -DDANE -DUSE_BLACKLIST -DMILTER -DHASSRANDOMDEV -DSTARTTLS -DTLS_EC=2 -D_FFR_TLS_ALTNAMES -D_FFR_VRFY_TRUSTED_FIRST -DPICKY_HELO_CHECK  -c blacklist.c -o blacklist.o
--- tls.o ---
tls.c:105:4: error: incomplete definition of type 'struct dh_st'
        dh->p = BN_bin2bn(dh512_p, sizeof(dh512_p), NULL);
        ~~^
/usr/local/include/openssl/ossl_typ.h:132:16: note: forward declaration of 'struct dh_st'
typedef struct dh_st DH;
               ^
tls.c:106:4: error: incomplete definition of type 'struct dh_st'
        dh->g = BN_bin2bn(dh512_g, sizeof(dh512_g), NULL);
        ~~^
/usr/local/include/openssl/ossl_typ.h:132:16: note: forward declaration of 'struct dh_st'
typedef struct dh_st DH;
               ^
tls.c:107:9: error: incomplete definition of type 'struct dh_st'
        if ((dh->p == NULL) || (dh->g == NULL))
             ~~^
/usr/local/include/openssl/ossl_typ.h:132:16: note: forward declaration of 'struct dh_st'
typedef struct dh_st DH;
               ^
tls.c:107:28: error: incomplete definition of type 'struct dh_st'
        if ((dh->p == NULL) || (dh->g == NULL))
                                ~~^
/usr/local/include/openssl/ossl_typ.h:132:16: note: forward declaration of 'struct dh_st'
typedef struct dh_st DH;
               ^
tls.c:175:4: error: incomplete definition of type 'struct dh_st'
        dh->p=BN_bin2bn(dh2048_p,sizeof(dh2048_p),NULL);
        ~~^
/usr/local/include/openssl/ossl_typ.h:132:16: note: forward declaration of 'struct dh_st'
typedef struct dh_st DH;
               ^
tls.c:176:4: error: incomplete definition of type 'struct dh_st'
        dh->g=BN_bin2bn(dh2048_g,sizeof(dh2048_g),NULL);
        ~~^
/usr/local/include/openssl/ossl_typ.h:132:16: note: forward declaration of 'struct dh_st'
typedef struct dh_st DH;
               ^
tls.c:177:9: error: incomplete definition of type 'struct dh_st'
        if ((dh->p == NULL) || (dh->g == NULL))
             ~~^
/usr/local/include/openssl/ossl_typ.h:132:16: note: forward declaration of 'struct dh_st'
typedef struct dh_st DH;
               ^
tls.c:177:28: error: incomplete definition of type 'struct dh_st'
        if ((dh->p == NULL) || (dh->g == NULL))
                                ~~^
/usr/local/include/openssl/ossl_typ.h:132:16: note: forward declaration of 'struct dh_st'
typedef struct dh_st DH;
               ^
tls.c:2347:9: error: incomplete definition of type 'struct x509_store_ctx_st'
        cert = X509_STORE_CTX_get0_cert(ctx);
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tls.c:47:46: note: expanded from macro 'X509_STORE_CTX_get0_cert'
#  define X509_STORE_CTX_get0_cert(ctx) (ctx)->cert
                                        ~~~~~^
/usr/local/include/openssl/ossl_typ.h:155:16: note: forward declaration of 'struct x509_store_ctx_st'
typedef struct x509_store_ctx_st X509_STORE_CTX;
               ^
9 errors generated.
*** [tls.o] Error code 1
Comment 1 commit-hook freebsd_committer freebsd_triage 2022-11-10 08:31:56 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=fd4bbc0814d37b02930ab287ba79c5d54f9b1620

commit fd4bbc0814d37b02930ab287ba79c5d54f9b1620
Author:     Dirk Meyer <dinoex@FreeBSD.org>
AuthorDate: 2022-11-10 08:29:40 +0000
Commit:     Dirk Meyer <dinoex@FreeBSD.org>
CommitDate: 2022-11-10 08:29:40 +0000

    mail/sendmail: mark broken for libressl

    PR: 267673

 mail/sendmail-devel/Makefile | 4 ++++
 mail/sendmail/Makefile       | 4 ++++
 2 files changed, 8 insertions(+)
Comment 2 Dirk Meyer freebsd_committer freebsd_triage 2022-11-10 08:42:50 UTC
Sorry, no easy fix to make this run within the libressl API 3.5.0 and later
Comment 3 Dave Hayes 2022-11-10 19:57:18 UTC
Ok so I just tried mail/sendmail-devel and -it builds fine-. Please unbreak the compatibility with mail/sendmail-devel?
Comment 4 commit-hook freebsd_committer freebsd_triage 2022-11-13 14:00:07 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=3ed68ea6552516586b01f577cb4951103caf509b

commit 3ed68ea6552516586b01f577cb4951103caf509b
Author:     Dirk Meyer <dinoex@FreeBSD.org>
AuthorDate: 2022-11-13 13:59:11 +0000
Commit:     Dirk Meyer <dinoex@FreeBSD.org>
CommitDate: 2022-11-13 13:59:11 +0000

    mail/sendmail-devel: remove broken for libressl

    PR: 267673

 mail/sendmail-devel/Makefile | 4 ----
 1 file changed, 4 deletions(-)
Comment 5 commit-hook freebsd_committer freebsd_triage 2022-11-13 14:07:10 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=0078df83b2630324ba886913be316c53f817f74c

commit 0078df83b2630324ba886913be316c53f817f74c
Author:     Dirk Meyer <dinoex@FreeBSD.org>
AuthorDate: 2022-11-13 14:05:59 +0000
Commit:     Dirk Meyer <dinoex@FreeBSD.org>
CommitDate: 2022-11-13 14:05:59 +0000

    mail/sendmail: unbreak build for libresslS

    PR: 267673

 mail/sendmail/Makefile                |  4 ----
 mail/sendmail/files/patch-tls.c (new) | 11 +++++++++++
 2 files changed, 11 insertions(+), 4 deletions(-)
Comment 6 Dirk Meyer freebsd_committer freebsd_triage 2022-11-13 14:12:15 UTC
Packages in Quarterly are not affected,
they are build with openssl from base.

For reference the dependencies packages fails to build as well:

===>  curl-7.85.0 only supports TLS-SRP with either OpenSSL or GnuTLS.
*** Error code 1


===>  Building for libssh2-1.10.0,3
--- hostkey.lo ---
libtool: compile:  cc -DHAVE_CONFIG_H -I../include -I../src -I/usr/local/include -DNDEBUG -O2 -pipe
-fstack-protector-strong -fno-strict-aliasing -MT hostkey.lo -MD -MP -MF .deps/hostkey.Tpo -c hostke
y.c  -fPIC -DPIC -o .libs/hostkey.o
hostkey.c:212:22: error: variable has incomplete type 'EVP_MD_CTX' (aka 'struct env_md_ctx_st')
    libssh2_sha1_ctx ctx;
                     ^

To test I needed to extend my /etc/make.conf:
ftp_curl_UNSET+=TLS_SRP
ftp_curl_UNSET+=LIBSSH2