wget2 icon indicating copy to clipboard operation
wget2 copied to clipboard

error: use of undeclared identifier 'CRYPTO_EX_INDEX_APP'

Open vollkommenheit opened this issue 2 years ago • 6 comments

Compiling latest wget2 trunk with the latest libressl trunk code results in the following. My last successful build with the combo above was Oct. 4th.

ssl_openssl.c:571:21: warning: passing 'const OCSP_CERTID *' (aka 'const struct ocsp_cert_id_st *') to parameter of type 'OCSP_CERTID *' (aka 'struct ocsp_cert_id_st *') discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers] return OCSP_id_cmp(certid, stored->certid); ^~~~~~ /usr/local/include/openssl/ocsp.h:253:30: note: passing argument to parameter 'a' here int OCSP_id_cmp(OCSP_CERTID *a, OCSP_CERTID *b); ^ ssl_openssl.c:601:40: warning: passing 'const OCSP_CERTID *' (aka 'const struct ocsp_cert_id_st *') to parameter of type 'OCSP_CERTID *' (aka 'struct ocsp_cert_id_st *') discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers] OCSP_CERTID *certid = OCSP_CERTID_dup(OCSP_SINGLERESP_get0_id(singleresp)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/local/include/openssl/ocsp.h:190:43: note: passing argument to parameter 'id' here OCSP_CERTID *OCSP_CERTID_dup(OCSP_CERTID *id); ^

vollkommenheit avatar Nov 09 '22 01:11 vollkommenheit

Interesting, likely an issue with LibreSSL itself. Btw, I can't see the error in your log snippet.

rockdaboot avatar Nov 09 '22 14:11 rockdaboot

Oops, my bad:

../include/wget/wget.h:2821:3: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness] *alpn_protocol; ^ ../include/wget/wget.h:2837:46: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness] wget_tls_stats_callback(wget_tls_stats_data *stats, void *ctx); ^ ../include/wget/wget.h:2837:59: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness] wget_tls_stats_callback(wget_tls_stats_data *stats, void *ctx); ^ ../include/wget/wget.h:2840:58: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness] wget_ssl_set_stats_callback_tls(wget_tls_stats_callback *fn, void *ctx); ^ ../include/wget/wget.h:2840:68: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness] wget_ssl_set_stats_callback_tls(wget_tls_stats_callback *fn, void *ctx); ^ ../include/wget/wget.h:2851:50: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness] wget_server_stats_callback(wget_http_connection *conn, wget_http_response *resp); ^ ../include/wget/wget.h:2851:76: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness] wget_server_stats_callback(wget_http_connection *conn, wget_http_response *resp); ^ ../include/wget/wget.h:2854:60: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness] wget_server_set_stats_callback(wget_server_stats_callback *fn); ^ ssl_openssl.c:133:3: error: use of undeclared identifier 'CRYPTO_EX_INDEX_APP' CRYPTO_EX_INDEX_APP, ^ ssl_openssl.c:143:2: warning: implicit declaration of function 'CRYPTO_free_ex_index' is invalid in C99 [-Wimplicit-function-declaration] CRYPTO_free_ex_index(CRYPTO_EX_INDEX_APP, ssl_userdata_idx); ^ ssl_openssl.c:143:23: error: use of undeclared identifier 'CRYPTO_EX_INDEX_APP' CRYPTO_free_ex_index(CRYPTO_EX_INDEX_APP, ssl_userdata_idx); ^ ssl_openssl.c:571:21: warning: passing 'const OCSP_CERTID *' (aka 'const struct ocsp_cert_id_st *') to parameter of type 'OCSP_CERTID *' (aka 'struct ocsp_cert_id_st *') discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers] return OCSP_id_cmp(certid, stored->certid); ^~~~~~ /usr/local/include/openssl/ocsp.h:253:30: note: passing argument to parameter 'a' here int OCSP_id_cmp(OCSP_CERTID *a, OCSP_CERTID *b); ^ ssl_openssl.c:601:40: warning: passing 'const OCSP_CERTID *' (aka 'const struct ocsp_cert_id_st *') to parameter of type 'OCSP_CERTID *' (aka 'struct ocsp_cert_id_st *') discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers] OCSP_CERTID *certid = OCSP_CERTID_dup(OCSP_SINGLERESP_get0_id(singleresp)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/local/include/openssl/ocsp.h:190:43: note: passing argument to parameter 'id' here OCSP_CERTID *OCSP_CERTID_dup(OCSP_CERTID *id); ^ 1134 warnings and 2 errors generated. make[2]: *** [libwget_la-ssl_openssl.lo] Error 1 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2

vollkommenheit avatar Nov 10 '22 03:11 vollkommenheit

Any updates on this? Running into the same issue. OpenSSL version: OpenSSL 1.1.1g 21 Apr 2020

The configure file specifies that it uses gnuTLS as the default ssl library (and not openssl), so not sure why it is compiling against the above files?

goelayu avatar Mar 10 '23 00:03 goelayu

Any updates on this? Running into the same issue. OpenSSL version: OpenSSL 1.1.1g 21 Apr 2020

The configure file specifies that it uses gnuTLS as the default ssl library (and not openssl), so not sure why it is compiling against the above files?

Still having this issue, with latest trunk code of both (LibreSSL from 2023-02-22).

vollkommenheit avatar Mar 10 '23 04:03 vollkommenheit

So I was able to compile it eventually. My machine didn't have gnutls installed, so installed that and the compiler used it instead of openssl. Also for some reason, the git clone version gave some strange errors about print_error function having insufficient number arguments etc. But when using the source form the tarball, it worked just fine.

goelayu avatar Mar 10 '23 16:03 goelayu

Thanks, I'll take a look.

rockdaboot avatar Mar 10 '23 18:03 rockdaboot

This needs to be fixed on the LibreSSL side (maybe they have already?). We don't have the personal resources to directly support LibreSSL or to investigate further. Please ask at LibreSSL if the symbol is still missing.

rockdaboot avatar May 19 '24 11:05 rockdaboot