Opened 2 years ago

Closed 2 years ago

#63854 closed defect (fixed)

ldns: error: incomplete definition of type 'struct evp_pkey_st'

Reported by: marka63 Owned by: Schamschula (Marius Schamschula)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: ShadSterling (Shad Sterling), Schamschula (Marius Schamschula), blair (Blair Zajac)
Port: ldns

Description

ldns fails to build against the latest openssl 3.0.0 package. Will most probably need OPENSSL_SUPPRESS_DEPRECATED to be defined when building.

Attachments (2)

main.log (57.4 KB) - added by marka63 2 years ago.
dnssec_sign.c.patch (913 bytes) - added by marka63 2 years ago.
dnssec_sign.c patch

Download all attachments as: .zip

Change History (15)

Changed 2 years ago by marka63

Attachment: main.log added

comment:1 Changed 2 years ago by reneeotten (Renee Otten)

I am not convinced that these errors are related to OpenSSL v3 (the warnings indeed are). I just tried to have this port use the openssl PG and version 1.1, but it fails as well:

./dnssec_sign.c:535:23: error: incomplete definition of type 'struct evp_pkey_st'
        if (EVP_PKEY_type(key->type) == EVP_PKEY_DSA) {
                          ~~~^
/opt/local/libexec/openssl11/include/openssl/ossl_typ.h:93:16: note: forward declaration of 'struct evp_pkey_st'
typedef struct evp_pkey_st EVP_PKEY;
               ^
./dnssec_sign.c:547:20: error: incomplete definition of type 'struct evp_pkey_st'
                EVP_PKEY_type(key->type)
                              ~~~^
/opt/local/libexec/openssl11/include/openssl/ossl_typ.h:93:16: note: forward declaration of 'struct evp_pkey_st'
typedef struct evp_pkey_st EVP_PKEY;
               ^
3 errors generated.

comment:2 Changed 2 years ago by jmroot (Joshua Root)

Yes, the structs were already made opaque in 1.1.

comment:3 Changed 2 years ago by marka63

EVP_PKEY_base_id was a function prior to OpenSSL 3. It has been replaced with a #define which breaks configure.

comment:4 Changed 2 years ago by marka63

Adding a weak symbol for EVP_PKEY_base_id as an alias for EVP_PKEY_get_base_id would allow configure to work for existing programs.

Changed 2 years ago by marka63

Attachment: dnssec_sign.c.patch added

dnssec_sign.c patch

comment:5 Changed 2 years ago by marka63

Patching dnssec_sign.c to look for OpenSSL's EVP_PKEY_base_id define or looking for HAVE_EVP_PKEY_BASE_ID will also work. See dnssec_sign.c patch and should work with both OpenSSL < 3.0 and OpenSSL 3.0

comment:6 Changed 2 years ago by danielluke (Daniel J. Luke)

comment:7 Changed 2 years ago by ShadSterling (Shad Sterling)

Cc: ShadSterling added

comment:8 Changed 2 years ago by Schamschula (Marius Schamschula)

Cc: Schamschula added

comment:9 Changed 2 years ago by reneeotten (Renee Otten)

Summary: ldns does not build against openssl-3.0.0ldns: error: incomplete definition of type 'struct evp_pkey_st'

comment:10 Changed 2 years ago by danielluke (Daniel J. Luke)

upstream v1.8.0 will include a configure change for EVP_PKEY_get_base_id - https://github.com/NLnetLabs/ldns/commit/5100d8546b1a9c3d08cf9e24cd7e30421033ec4c

comment:11 Changed 2 years ago by blair (Blair Zajac)

Cc: blair added

comment:12 Changed 2 years ago by blair (Blair Zajac)

Can we use that patch for the current 1.7.1 release and get ldns unbroken?

comment:13 Changed 2 years ago by Schamschula (Marius Schamschula)

Owner: set to Schamschula
Resolution: fixed
Status: newclosed

In 1ab110ae8bca8b56e8703af3109269ee7c1d84f6/macports-ports (master):

ldns: fix incomplete definition of type 'struct evp_pkey_st' error

Closes: #63854

Note: See TracTickets for help on using tickets.