libressl: compile fails when using libressl 3.5.0 #1005

Closed
opened 2026-10-05 04:58:10 +02:00 by adam · 1 comment
Owner

compiling with libressl 3.4.2 and znc https://github.com/znc/znc/commit/81df4dec56ba312f70bfa9ea4c7e6f2dda6b144d works fine.
but znc https://github.com/znc/znc/commit/81df4dec56ba312f70bfa9ea4c7e6f2dda6b144d with latest https://github.com/libressl-portable/portable/commit/ea53dcd569c3a7aed1d9ad65b520488599120ded (3.5.0):

[  1%] Building CXX object src/CMakeFiles/znclib.dir/Csocket.cpp.o
/home/user/work/znc/src/Csocket.cpp: In member function ‘CString Csock::GetPeerPubKey() const’:
/home/user/work/znc/src/Csocket.cpp:2836:20: error: invalid use of incomplete type ‘EVP_PKEY’ {aka ‘struct evp_pkey_st’}
    int iType = pKey->type;
                    ^~
In file included from /home/user/include/openssl/evp.h:64,
                 from /home/user/include/openssl/hmac.h:67,
                 from /home/user/include/openssl/ssl.h:150,
                 from /home/user/work/znc/include/znc/Csocket.h:101,
                 from /home/user/work/znc/src/Csocket.cpp:41:
/home/user/include/openssl/ossl_typ.h:121:16: note: forward declaration of ‘EVP_PKEY’ {aka ‘struct evp_pkey_st’}
 typedef struct evp_pkey_st EVP_PKEY;
                ^~~~~~~~~~~
/home/user/work/znc/src/Csocket.cpp:2845:19: error: invalid use of incomplete type ‘EVP_PKEY’ {aka ‘struct evp_pkey_st’}
     pPubKey = pKey->pkey.rsa->n;
                   ^~
In file included from /home/user/include/openssl/evp.h:64,
                 from /home/user/include/openssl/hmac.h:67,
                 from /home/user/include/openssl/ssl.h:150,
                 from /home/user/work/znc/include/znc/Csocket.h:101,
                 from /home/user/work/znc/src/Csocket.cpp:41:
/home/user/include/openssl/ossl_typ.h:121:16: note: forward declaration of ‘EVP_PKEY’ {aka ‘struct evp_pkey_st’}
 typedef struct evp_pkey_st EVP_PKEY;
                ^~~~~~~~~~~
/home/user/work/znc/src/Csocket.cpp:2854:19: error: invalid use of incomplete type ‘EVP_PKEY’ {aka ‘struct evp_pkey_st’}
     pPubKey = pKey->pkey.dsa->pub_key;
                   ^~
In file included from /home/user/include/openssl/evp.h:64,
                 from /home/user/include/openssl/hmac.h:67,
                 from /home/user/include/openssl/ssl.h:150,
                 from /home/user/work/znc/include/znc/Csocket.h:101,
                 from /home/user/work/znc/src/Csocket.cpp:41:
/home/user/include/openssl/ossl_typ.h:121:16: note: forward declaration of ‘EVP_PKEY’ {aka ‘struct evp_pkey_st’}
 typedef struct evp_pkey_st EVP_PKEY;
                ^~~~~~~~~~~
/home/user/work/znc/src/Csocket.cpp: In member function ‘long int Csock::GetPeerFingerprint(CString&) const’:
/home/user/work/znc/src/Csocket.cpp:2892:33: error: invalid use of incomplete type ‘X509’ {aka ‘struct x509_st’}
  if( pCert && (sha1_hash = pCert->sha1_hash) )
                                 ^~
In file included from /home/user/include/openssl/evp.h:64,
                 from /home/user/include/openssl/hmac.h:67,
                 from /home/user/include/openssl/ssl.h:150,
                 from /home/user/work/znc/include/znc/Csocket.h:101,
                 from /home/user/work/znc/src/Csocket.cpp:41:
/home/user/include/openssl/ossl_typ.h:147:16: note: forward declaration of ‘X509’ {aka ‘struct x509_st’}
 typedef struct x509_st X509;
                ^~~~~~~
make[2]: *** [src/CMakeFiles/znclib.dir/build.make:432: src/CMakeFiles/znclib.dir/Csocket.cpp.o] Fehler 1 
make[1]: *** [CMakeFiles/Makefile2:418: src/CMakeFiles/znclib.dir/all] Fehler 2
make: *** [Makefile:130: all] Fehler 2
compiling with libressl 3.4.2 and znc https://github.com/znc/znc/commit/81df4dec56ba312f70bfa9ea4c7e6f2dda6b144d works fine. but znc https://github.com/znc/znc/commit/81df4dec56ba312f70bfa9ea4c7e6f2dda6b144d with latest https://github.com/libressl-portable/portable/commit/ea53dcd569c3a7aed1d9ad65b520488599120ded (3.5.0): ``` [ 1%] Building CXX object src/CMakeFiles/znclib.dir/Csocket.cpp.o /home/user/work/znc/src/Csocket.cpp: In member function ‘CString Csock::GetPeerPubKey() const’: /home/user/work/znc/src/Csocket.cpp:2836:20: error: invalid use of incomplete type ‘EVP_PKEY’ {aka ‘struct evp_pkey_st’} int iType = pKey->type; ^~ In file included from /home/user/include/openssl/evp.h:64, from /home/user/include/openssl/hmac.h:67, from /home/user/include/openssl/ssl.h:150, from /home/user/work/znc/include/znc/Csocket.h:101, from /home/user/work/znc/src/Csocket.cpp:41: /home/user/include/openssl/ossl_typ.h:121:16: note: forward declaration of ‘EVP_PKEY’ {aka ‘struct evp_pkey_st’} typedef struct evp_pkey_st EVP_PKEY; ^~~~~~~~~~~ /home/user/work/znc/src/Csocket.cpp:2845:19: error: invalid use of incomplete type ‘EVP_PKEY’ {aka ‘struct evp_pkey_st’} pPubKey = pKey->pkey.rsa->n; ^~ In file included from /home/user/include/openssl/evp.h:64, from /home/user/include/openssl/hmac.h:67, from /home/user/include/openssl/ssl.h:150, from /home/user/work/znc/include/znc/Csocket.h:101, from /home/user/work/znc/src/Csocket.cpp:41: /home/user/include/openssl/ossl_typ.h:121:16: note: forward declaration of ‘EVP_PKEY’ {aka ‘struct evp_pkey_st’} typedef struct evp_pkey_st EVP_PKEY; ^~~~~~~~~~~ /home/user/work/znc/src/Csocket.cpp:2854:19: error: invalid use of incomplete type ‘EVP_PKEY’ {aka ‘struct evp_pkey_st’} pPubKey = pKey->pkey.dsa->pub_key; ^~ In file included from /home/user/include/openssl/evp.h:64, from /home/user/include/openssl/hmac.h:67, from /home/user/include/openssl/ssl.h:150, from /home/user/work/znc/include/znc/Csocket.h:101, from /home/user/work/znc/src/Csocket.cpp:41: /home/user/include/openssl/ossl_typ.h:121:16: note: forward declaration of ‘EVP_PKEY’ {aka ‘struct evp_pkey_st’} typedef struct evp_pkey_st EVP_PKEY; ^~~~~~~~~~~ /home/user/work/znc/src/Csocket.cpp: In member function ‘long int Csock::GetPeerFingerprint(CString&) const’: /home/user/work/znc/src/Csocket.cpp:2892:33: error: invalid use of incomplete type ‘X509’ {aka ‘struct x509_st’} if( pCert && (sha1_hash = pCert->sha1_hash) ) ^~ In file included from /home/user/include/openssl/evp.h:64, from /home/user/include/openssl/hmac.h:67, from /home/user/include/openssl/ssl.h:150, from /home/user/work/znc/include/znc/Csocket.h:101, from /home/user/work/znc/src/Csocket.cpp:41: /home/user/include/openssl/ossl_typ.h:147:16: note: forward declaration of ‘X509’ {aka ‘struct x509_st’} typedef struct x509_st X509; ^~~~~~~ make[2]: *** [src/CMakeFiles/znclib.dir/build.make:432: src/CMakeFiles/znclib.dir/Csocket.cpp.o] Fehler 1 make[1]: *** [CMakeFiles/Makefile2:418: src/CMakeFiles/znclib.dir/all] Fehler 2 make: *** [Makefile:130: all] Fehler 2 ``` <!-- github-sync-id:1106420145 -->
adam closed this issue 2026-10-05 04:58:10 +02:00
Author
Owner
https://github.com/jimloco/Csocket/pull/78 <!-- github-comment-id:1125684386 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/znc#1005