Skip to content

build: fix build errors/warnings in rare configurations#17962

Closed
vszakats wants to merge 25 commits intocurl:masterfrom
vszakats:build-combo-fixes
Closed

build: fix build errors/warnings in rare configurations#17962
vszakats wants to merge 25 commits intocurl:masterfrom
vszakats:build-combo-fixes

Conversation

@vszakats
Copy link
Member

@vszakats vszakats commented Jul 18, 2025

  • vtls: fix unused variable and symbols.
  • ftp: fix unused variable.
  • http: fix unused variables.
  • smtp: fix unsued variable.
  • wolfssl: fix unused variable with !proxy.
  • libssh: fix unused argument.
  • curl_trc: sync guards between declaration and definition.
  • curl_trc: add missing guard for Curl_trc_ssls when !verbose.
  • curl_trc: fix errors with !http + http3.
  • curl_trc: fix missing function with !http + nghttp2.
  • cf-h2-proxy: disable when !http + nghttp2, to avoid calling undeclared
    functions.
  • sha256: fix missing declaration in rare configs.
  • md4: fix symbol conflict when building GnuTLS together with AWS-LC or
    wolfSSL. By prioritizing the latter two. AWS-LC has no option
    to disable the clashing symbol. wolfSSL does, but the most seamless is
    to skip including GnuTLS's standalone md4.h to avoid the clash.
  • build: fix errors with !http + nghttp2.
  • build: catch !ssl + ssls-export combination in source. Convert
    build-level errors to warnings.
  • build: fix errors with !http + http3.
  • build: fix building curl tool and unit1302 in rare combinations.
    By always compiling base64 curlx functions.
  • cmake: add _CURL_SKIP_BUILD_CERTS internal option.
    To disable automatically building certs with the testdeps target.
    To improve performance when testing builds.
    (used locally to find the failing builds fixed in this PR.)

@vszakats vszakats added the build label Jul 18, 2025
@github-actions github-actions bot added the tests label Jul 18, 2025
@vszakats vszakats changed the title build: fix build errors/warning in rare configurations build: fix build errors/warnings in rare configurations Jul 18, 2025
@vszakats

This comment was marked as resolved.

@vszakats vszakats force-pushed the build-combo-fixes branch from ea8deee to 1563efd Compare July 19, 2025 23:19
@vszakats vszakats marked this pull request as draft July 20, 2025 09:05
@github-actions github-actions bot added the CI Continuous Integration label Jul 20, 2025
@vszakats vszakats force-pushed the build-combo-fixes branch 2 times, most recently from 9978c56 to 93db2c6 Compare July 20, 2025 18:52
@vszakats vszakats marked this pull request as ready for review July 20, 2025 19:33
vszakats added 20 commits July 23, 2025 19:54
lib/vtls/vtls.c:1634:51: error: unused parameter 'conn' [-Werror,-Wunused-parameter]
 1634 |                               struct connectdata *conn)
      |                                                   ^
```
lib/curl_trc.c:637:6: error: no previous prototype for function 'Curl_trc_ws' [-Werror,-Wmissing-prototypes]
  637 | void Curl_trc_ws(struct Curl_easy *data, const char *fmt, ...)
      |      ^
lib/curl_trc.c:637:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
  637 | void Curl_trc_ws(struct Curl_easy *data, const char *fmt, ...)
      | ^
      | static
```

options='-DCURL_DISABLE_ALTSVC=ON -DCURL_DISABLE_BASIC_AUTH=ON -DCURL_DISABLE_CA_SEARCH=ON -DCURL_DISABLE_COOKIES=ON -DCURL_DISABLE_DOH=ON -DCURL_DISABLE_FTP=ON -DCURL_DISABLE_GETOPTIONS=ON -DCURL_DISABLE_GOPHER=ON -DCURL_DISABLE_HSTS=ON -DCURL_DISABLE_IMAP=ON -DCURL_DISABLE_INSTALL=ON -DCURL_DISABLE_MIME=ON -DCURL_DISABLE_MQTT=ON -DCURL_DISABLE_OPENSSL_AUTO_LOAD_CONFIG=ON -DCURL_DISABLE_PARSEDATE=ON -DCURL_DISABLE_POP3=ON -DCURL_DISABLE_PROGRESS_METER=ON -DCURL_DISABLE_PROXY=ON -DCURL_DISABLE_RTSP=ON -DCURL_DISABLE_SRP=ON -DCURL_DISABLE_VERBOSE_STRINGS=ON -DCURL_DISABLE_WEBSOCKETS=ON -DENABLE_UNICODE=ON -DHTTP_ONLY=ON -DUSE_SSLS_EXPORT=ON -DENABLE_UNIX_SOCKETS=OFF'
lib/ftp.c:145:42: error: unused parameter 'data' [-Werror,-Wunused-parameter]
  145 | static void _ftp_state(struct Curl_easy *data,
      |                                          ^

options='-DCURL_DISABLE_ALTSVC=ON -DCURL_DISABLE_AWS=ON -DCURL_DISABLE_BASIC_AUTH=ON -DCURL_DISABLE_BEARER_AUTH=ON -DCURL_DISABLE_BINDLOCAL=ON -DCURL_DISABLE_CA_SEARCH=ON -DCURL_DISABLE_COOKIES=ON -DCURL_DISABLE_DICT=ON -DCURL_DISABLE_DIGEST_AUTH=ON -DCURL_DISABLE_DOH=ON -DCURL_DISABLE_FILE=ON -DCURL_DISABLE_FORM_API=ON -DCURL_DISABLE_GETOPTIONS=ON -DCURL_DISABLE_HEADERS_API=ON -DCURL_DISABLE_HSTS=ON -DCURL_DISABLE_HTTP=ON -DCURL_DISABLE_HTTP_AUTH=ON -DCURL_DISABLE_IMAP=ON -DCURL_DISABLE_INSTALL=ON -DCURL_DISABLE_IPFS=ON -DCURL_DISABLE_LDAP=ON -DCURL_DISABLE_LDAPS=ON -DCURL_DISABLE_LIBCURL_OPTION=ON -DCURL_DISABLE_MIME=ON -DCURL_DISABLE_MQTT=ON -DCURL_DISABLE_NETRC=ON -DCURL_DISABLE_NTLM=ON -DCURL_DISABLE_OPENSSL_AUTO_LOAD_CONFIG=ON -DCURL_DISABLE_PARSEDATE=ON -DCURL_DISABLE_POP3=ON -DCURL_DISABLE_PROGRESS_METER=ON -DCURL_DISABLE_PROXY=ON -DCURL_DISABLE_RTSP=ON -DCURL_DISABLE_SHA512_256=ON -DCURL_DISABLE_SHUFFLE_DNS=ON -DCURL_DISABLE_SMTP=ON -DCURL_DISABLE_SOCKETPAIR=ON -DCURL_DISABLE_SRP=ON -DCURL_DISABLE_TELNET=ON -DCURL_DISABLE_VERBOSE_STRINGS=ON -DENABLE_UNICODE=ON -DUSE_SSLS_EXPORT=ON'
```
lib/vtls/vtls.c:153:1: error: unused function 'alpn_get_spec' [-Werror,-Wunused-function]
  153 | alpn_get_spec(http_majors allowed, bool use_alpn)
      | ^~~~~~~~~~~~~
```

options='-DCURL_DISABLE_ALTSVC=ON -DCURL_DISABLE_AWS=ON -DCURL_DISABLE_BASIC_AUTH=ON -DCURL_DISABLE_BEARER_AUTH=ON -DCURL_DISABLE_BINDLOCAL=ON -DCURL_DISABLE_CA_SEARCH=ON -DCURL_DISABLE_COOKIES=ON -DCURL_DISABLE_DICT=ON -DCURL_DISABLE_DIGEST_AUTH=ON -DCURL_DISABLE_DOH=ON -DCURL_DISABLE_FILE=ON -DCURL_DISABLE_FORM_API=ON -DCURL_DISABLE_GETOPTIONS=ON -DCURL_DISABLE_HEADERS_API=ON -DCURL_DISABLE_HSTS=ON -DCURL_DISABLE_HTTP=ON -DCURL_DISABLE_HTTP_AUTH=ON -DCURL_DISABLE_IMAP=ON -DCURL_DISABLE_INSTALL=ON -DCURL_DISABLE_IPFS=ON -DCURL_DISABLE_LDAP=ON -DCURL_DISABLE_LDAPS=ON -DCURL_DISABLE_LIBCURL_OPTION=ON -DCURL_DISABLE_MIME=ON -DCURL_DISABLE_MQTT=ON -DCURL_DISABLE_NETRC=ON -DCURL_DISABLE_NTLM=ON -DCURL_DISABLE_OPENSSL_AUTO_LOAD_CONFIG=ON -DCURL_DISABLE_PARSEDATE=ON -DCURL_DISABLE_POP3=ON -DCURL_DISABLE_PROGRESS_METER=ON -DCURL_DISABLE_PROXY=ON -DCURL_DISABLE_RTSP=ON -DCURL_DISABLE_SHA512_256=ON -DCURL_DISABLE_SHUFFLE_DNS=ON -DCURL_DISABLE_SMTP=ON -DCURL_DISABLE_SOCKETPAIR=ON -DCURL_DISABLE_SRP=ON -DCURL_DISABLE_TELNET=ON -DCURL_DISABLE_VERBOSE_STRINGS=ON -DENABLE_UNICODE=ON -DUSE_SSLS_EXPORT=ON'
_buildroulette/lib/http2.c:218:24: error: field has incomplete type 'struct h1_req_parser'
  218 |   struct h1_req_parser h1; /* parsing the request */
      |                        ^
_buildroulette/lib/http2.c:218:10: note: forward declaration of 'struct h1_req_parser'
  218 |   struct h1_req_parser h1; /* parsing the request */
      |          ^
_buildroulette/lib/http2.c:258:3: error: call to undeclared function 'Curl_h1_req_parse_init'; ISO C99 and later do not support implicit function declarations [-Wimplicit-funct
  258 |   Curl_h1_req_parse_init(&stream->h1, H1_PARSE_DEFAULT_MAX_LINE_LEN);
      |   ^
_buildroulette/lib/http2.c:258:39: error: use of undeclared identifier 'H1_PARSE_DEFAULT_MAX_LINE_LEN'
  258 |   Curl_h1_req_parse_init(&stream->h1, H1_PARSE_DEFAULT_MAX_LINE_LEN);
      |                                       ^
_buildroulette/lib/http2.c:282:3: error: call to undeclared function 'Curl_h1_req_parse_free'; ISO C99 and later do not support implicit function declarations [-Wimplicit-funct
  282 |   Curl_h1_req_parse_free(&stream->h1);
      |   ^
_buildroulette/lib/http2.c:2237:14: error: call to undeclared function 'Curl_h1_req_parse_read'; ISO C99 and later do not support implicit function declarations [-Wimplicit-fun
 2237 |   nwritten = Curl_h1_req_parse_read(&stream->h1, buf, len, NULL, 0, &result);
      |              ^
_buildroulette/lib/http2.c:2251:3: error: call to undeclared function 'Curl_h1_req_parse_free'; ISO C99 and later do not support implicit function declarations [-Wimplicit-func
 2251 |   Curl_h1_req_parse_free(&stream->h1);
      |   ^
_buildroulette/lib/http2.c:2866:19: error: no member named 'http_neg' in 'struct UrlState'
 2866 |      (data->state.http_neg.wanted & CURL_HTTP_V2x) &&
      |       ~~~~~~~~~~~ ^
_buildroulette/lib/http2.c:2867:18: error: no member named 'http_neg' in 'struct UrlState'
 2867 |      data->state.http_neg.h2_prior_knowledge) {
      |      ~~~~~~~~~~~ ^
8 errors generated.
Undefined symbols for architecture arm64:
  "_Curl_cft_nghttp2", referenced from:
      _trc_cfts in unity_1_c.c.o

options='-DCURL_DISABLE_AWS=ON -DCURL_DISABLE_DOH=ON -DCURL_DISABLE_FILE=ON -DCURL_DISABLE_GOPHER=ON -DCURL_DISABLE_HTTP=ON -DCURL_DISABLE_HTTP_AUTH=ON -DCURL_DISABLE_IMAP=ON -DCURL_DISABLE_KERBEROS_AUTH=ON -DCURL_DISABLE_LDAP=ON -DCURL_DISABLE_LIBCURL_OPTION=ON -DCURL_DISABLE_MIME=ON -DCURL_DISABLE_NEGOTIATE_AUTH=ON -DCURL_DISABLE_NETRC=ON -DCURL_DISABLE_NTLM=ON -DCURL_DISABLE_OPENSSL_AUTO_LOAD_CONFIG=ON -DCURL_DISABLE_POP3=ON -DCURL_DISABLE_PROXY=ON -DCURL_DISABLE_SHA512_256=ON -DCURL_DISABLE_SMB=ON -DCURL_DISABLE_SRP=ON -DCURL_DISABLE_TELNET=ON -DCURL_DISABLE_WEBSOCKETS=ON -DHTTP_ONLY=ON -DUSE_SSLS_EXPORT=ON'
lib/cf-h2-proxy.c:97:12: error: call to undeclared function 'Curl_http_proxy_get_destination'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
   97 |   result = Curl_http_proxy_get_destination(cf, &hostname, &port, &ipv6_ip);
      |            ^
lib/cf-h2-proxy.c:937:12: error: call to undeclared function 'Curl_http_proxy_create_CONNECT'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  937 |   result = Curl_http_proxy_create_CONNECT(&req, cf, data, 2);
      |            ^
lib/cf-h2-proxy.c:986:14: error: call to undeclared function 'Curl_http_input_auth'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  986 |     result = Curl_http_input_auth(data, ts->resp->status == 407,
      |              ^
lib/cf-h2-proxy.c:986:14: note: did you mean 'Curl_http_output_auth'?
lib/http.h:209:1: note: 'Curl_http_output_auth' declared here
  209 | Curl_http_output_auth(struct Curl_easy *data,
      | ^
3 errors generated.

options='-DCURL_DISABLE_ALTSVC=ON -DCURL_DISABLE_AWS=ON -DCURL_DISABLE_BASIC_AUTH=ON -DCURL_DISABLE_BEARER_AUTH=ON -DCURL_DISABLE_BINDLOCAL=ON -DCURL_DISABLE_CA_SEARCH=ON -DCURL_DISABLE_COOKIES=ON -DCURL_DISABLE_DICT=ON -DCURL_DISABLE_DIGEST_AUTH=ON -DCURL_DISABLE_DOH=ON -DCURL_DISABLE_FILE=ON -DCURL_DISABLE_FORM_API=ON -DCURL_DISABLE_FTP=ON -DCURL_DISABLE_GETOPTIONS=ON -DCURL_DISABLE_GOPHER=ON -DCURL_DISABLE_HEADERS_API=ON -DCURL_DISABLE_HSTS=ON -DCURL_DISABLE_HTTP=ON -DCURL_DISABLE_HTTP_AUTH=ON -DCURL_DISABLE_INSTALL=ON -DCURL_DISABLE_IPFS=ON -DCURL_DISABLE_LDAP=ON -DCURL_DISABLE_LDAPS=ON -DCURL_DISABLE_LIBCURL_OPTION=ON -DCURL_DISABLE_MIME=ON -DCURL_DISABLE_MQTT=ON -DCURL_DISABLE_NEGOTIATE_AUTH=ON -DCURL_DISABLE_NETRC=ON -DCURL_DISABLE_NTLM=ON -DCURL_DISABLE_OPENSSL_AUTO_LOAD_CONFIG=ON -DCURL_DISABLE_PARSEDATE=ON -DCURL_DISABLE_POP3=ON -DCURL_DISABLE_PROGRESS_METER=ON -DCURL_DISABLE_RTSP=ON -DCURL_DISABLE_SHA512_256=ON -DCURL_DISABLE_SHUFFLE_DNS=ON -DCURL_DISABLE_SMB=ON -DCURL_DISABLE_SMTP=ON -DCURL_DISABLE_SOCKETPAIR=ON -DCURL_DISABLE_SRP=ON -DCURL_DISABLE_TELNET=ON -DCURL_DISABLE_TFTP=ON -DCURL_DISABLE_WEBSOCKETS=ON -DENABLE_UNICODE=ON -DHTTP_ONLY=ON -DUSE_SSLS_EXPORT=ON  -DENABLE_IPV6=OFF'
lib/http.c:1002:49: error: unused parameter 'data' [-Werror,-Wunused-parameter]
 1002 | CURLcode Curl_http_input_auth(struct Curl_easy *data, bool proxy,
      |                                                 ^
lib/http.c:1003:43: error: unused parameter 'auth' [-Werror,-Wunused-parameter]
 1003 |                               const char *auth) /* the first non-space */
      |                                           ^
2 errors generated.

options='-DCURL_DISABLE_BASIC_AUTH=ON -DCURL_DISABLE_BEARER_AUTH=ON -DCURL_DISABLE_CA_SEARCH=ON -DCURL_DISABLE_COOKIES=ON -DCURL_DISABLE_DICT=ON -DCURL_DISABLE_DIGEST_AUTH=ON -DCURL_DISABLE_DOH=ON -DCURL_DISABLE_FILE=ON -DCURL_DISABLE_FORM_API=ON -DCURL_DISABLE_FTP=ON -DCURL_DISABLE_GETOPTIONS=ON -DCURL_DISABLE_GOPHER=ON -DCURL_DISABLE_HSTS=ON -DCURL_DISABLE_HTTP_AUTH=ON -DCURL_DISABLE_IMAP=ON -DCURL_DISABLE_INSTALL=ON -DCURL_DISABLE_KERBEROS_AUTH=ON -DCURL_DISABLE_LDAP=ON -DCURL_DISABLE_LDAPS=ON -DCURL_DISABLE_LIBCURL_OPTION=ON -DCURL_DISABLE_MIME=ON -DCURL_DISABLE_NEGOTIATE_AUTH=ON -DCURL_DISABLE_NTLM=ON -DCURL_DISABLE_OPENSSL_AUTO_LOAD_CONFIG=ON -DCURL_DISABLE_PROGRESS_METER=ON -DCURL_DISABLE_PROXY=ON -DCURL_DISABLE_RTSP=ON -DCURL_DISABLE_SHA512_256=ON -DCURL_DISABLE_SHUFFLE_DNS=ON -DCURL_DISABLE_SMB=ON -DCURL_DISABLE_SMTP=ON -DCURL_DISABLE_SOCKETPAIR=ON -DCURL_DISABLE_TELNET=ON -DCURL_DISABLE_TFTP=ON -DCURL_DISABLE_WEBSOCKETS=ON -DENABLE_CURLDEBUG=ON -DENABLE_DEBUG=ON -DENABLE_UNICODE=ON -DUSE_SSLS_EXPORT=ON '
lib/smtp.c:356:42: error: unused parameter 'data' [-Werror,-Wunused-parameter]
  356 | static void smtp_state(struct Curl_easy *data,
      |                                          ^

-DCURL_DISABLE_ALTSVC=ON -DCURL_DISABLE_BEARER_AUTH=ON -DCURL_DISABLE_BINDLOCAL=ON -DCURL_DISABLE_CA_SEARCH=ON -DCURL_DISABLE_COOKIES=ON -DCURL_DISABLE_DICT=ON -DCURL_DISABLE_DOH=ON -DCURL_DISABLE_FORM_API=ON -DCURL_DISABLE_GOPHER=ON -DCURL_DISABLE_IMAP=ON -DCURL_DISABLE_INSTALL=ON -DCURL_DISABLE_LDAP=ON -DCURL_DISABLE_LDAPS=ON -DCURL_DISABLE_LIBCURL_OPTION=ON -DCURL_DISABLE_MIME=ON -DCURL_DISABLE_MQTT=ON -DCURL_DISABLE_NEGOTIATE_AUTH=ON -DCURL_DISABLE_OPENSSL_AUTO_LOAD_CONFIG=ON -DCURL_DISABLE_PARSEDATE=ON -DCURL_DISABLE_PROXY=ON -DCURL_DISABLE_RTSP=ON -DCURL_DISABLE_SOCKETPAIR=ON -DCURL_DISABLE_SRP=ON -DCURL_DISABLE_VERBOSE_STRINGS=ON -DCURL_DISABLE_WEBSOCKETS=ON -DENABLE_CURLDEBUG=ON -DENABLE_DEBUG=ON -DENABLE_UNICODE=ON
lib/sha256.c:506:26: error: variable has incomplete type 'const struct HMAC_params'
  506 | const struct HMAC_params Curl_HMAC_SHA256 = {
      |                          ^
lib/curl_sha256.h:34:21: note: forward declaration of 'struct HMAC_params'
   34 | extern const struct HMAC_params Curl_HMAC_SHA256;
      |                     ^
1 error generated.

-DCURL_DISABLE_AWS=ON -DCURL_DISABLE_DIGEST_AUTH=ON -DCURL_ENABLE_SSL=OFF + libssh2
…ing in builds

To make it build-system agnostic.

-DCURL_ENABLE_SSL=OFF -DUSE_SSLS_EXPORT=ON
lib/curl_trc.c:643:6: error: no previous prototype for function 'Curl_trc_ssls' [-Werror,-Wmissing-prototypes]
  643 | void Curl_trc_ssls(struct Curl_easy *data, const char *fmt, ...)
      |      ^
lib/curl_trc.c:643:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
  643 | void Curl_trc_ssls(struct Curl_easy *data, const char *fmt, ...)
      | ^
      | static
1 error generated.

options='-DCURL_DISABLE_AWS=ON -DCURL_DISABLE_BEARER_AUTH=ON -DCURL_DISABLE_BINDLOCAL=ON -DCURL_DISABLE_CA_SEARCH=ON -DCURL_DISABLE_DIGEST_AUTH=ON -DCURL_DISABLE_DOH=ON -DCURL_DISABLE_FILE=ON -DCURL_DISABLE_FORM_API=ON -DCURL_DISABLE_FTP=ON -DCURL_DISABLE_GETOPTIONS=ON -DCURL_DISABLE_HSTS=ON -DCURL_DISABLE_HTTP=ON -DCURL_DISABLE_HTTP_AUTH=ON -DCURL_DISABLE_INSTALL=ON -DCURL_DISABLE_IPFS=ON -DCURL_DISABLE_KERBEROS_AUTH=ON -DCURL_DISABLE_LDAPS=ON -DCURL_DISABLE_LIBCURL_OPTION=ON -DCURL_DISABLE_MIME=ON -DCURL_DISABLE_MQTT=ON -DCURL_DISABLE_NEGOTIATE_AUTH=ON -DCURL_DISABLE_NTLM=ON -DCURL_DISABLE_PARSEDATE=ON -DCURL_DISABLE_POP3=ON -DCURL_DISABLE_PROXY=ON -DCURL_DISABLE_RTSP=ON -DCURL_DISABLE_SHA512_256=ON -DCURL_DISABLE_SHUFFLE_DNS=ON -DCURL_DISABLE_SMB=ON -DCURL_DISABLE_SRP=ON -DCURL_DISABLE_TELNET=ON -DCURL_DISABLE_VERBOSE_STRINGS=ON -DENABLE_UNICODE=ON  -DCURL_ENABLE_SSL=OFF'
lib/vquic/curl_osslq.c:579:24: error: field has incomplete type 'struct h1_req_parser'
  579 |   struct h1_req_parser h1; /* h1 request parsing */
      |                        ^
lib/vquic/curl_osslq.c:579:10: note: forward declaration of 'struct h1_req_parser'
  579 |   struct h1_req_parser h1; /* h1 request parsing */
      |          ^
lib/vquic/curl_osslq.c:598:3: error: call to undeclared function 'Curl_h1_req_parse_free'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  598 |   Curl_h1_req_parse_free(&stream->h1);
      |   ^
lib/vquic/curl_osslq.c:635:3: error: call to undeclared function 'Curl_h1_req_parse_init'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  635 |   Curl_h1_req_parse_init(&stream->h1, H1_PARSE_DEFAULT_MAX_LINE_LEN);
      |   ^
lib/vquic/curl_osslq.c:635:39: error: use of undeclared identifier 'H1_PARSE_DEFAULT_MAX_LINE_LEN'
  635 |   Curl_h1_req_parse_init(&stream->h1, H1_PARSE_DEFAULT_MAX_LINE_LEN);
      |                                       ^
lib/vquic/curl_osslq.c:1889:14: error: call to undeclared function 'Curl_h1_req_parse_read'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
 1889 |   nwritten = Curl_h1_req_parse_read(&stream->h1, buf, len, NULL, 0, err);
      |              ^
lib/vquic/curl_osslq.c:1904:3: error: call to undeclared function 'Curl_h1_req_parse_free'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
 1904 |   Curl_h1_req_parse_free(&stream->h1);
      |   ^
6 errors generated.

lib/vquic/vquic.c:76:3: error: call to undeclared function 'Curl_osslq_ver'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
   76 |   Curl_osslq_ver(p, len);
      |   ^
lib/vquic/vquic.c:691:10: error: call to undeclared function 'Curl_cf_osslq_create'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  691 |   return Curl_cf_osslq_create(pcf, data, conn, ai);
      |          ^
2 errors generated.

Undefined symbols for architecture arm64:
  "_Curl_cf_quic_create", referenced from:
      _transport_providers in unity_0_c.c.o
  "_Curl_vquic_init", referenced from:
      _global_init in unity_1_c.c.o

options='-DCURL_DISABLE_ALTSVC=ON -DCURL_DISABLE_AWS=ON -DCURL_DISABLE_BASIC_AUTH=ON -DCURL_DISABLE_BEARER_AUTH=ON -DCURL_DISABLE_BINDLOCAL=ON -DCURL_DISABLE_COOKIES=ON -DCURL_DISABLE_DICT=ON -DCURL_DISABLE_DIGEST_AUTH=ON -DCURL_DISABLE_DOH=ON -DCURL_DISABLE_FILE=ON -DCURL_DISABLE_FORM_API=ON -DCURL_DISABLE_FTP=ON -DCURL_DISABLE_GETOPTIONS=ON -DCURL_DISABLE_HEADERS_API=ON -DCURL_DISABLE_HSTS=ON -DCURL_DISABLE_HTTP=ON -DCURL_DISABLE_HTTP_AUTH=ON -DCURL_DISABLE_IMAP=ON -DCURL_DISABLE_INSTALL=ON -DCURL_DISABLE_IPFS=ON -DCURL_DISABLE_KERBEROS_AUTH=ON -DCURL_DISABLE_LDAP=ON -DCURL_DISABLE_LDAPS=ON -DCURL_DISABLE_LIBCURL_OPTION=ON -DCURL_DISABLE_MIME=ON -DCURL_DISABLE_MQTT=ON -DCURL_DISABLE_NEGOTIATE_AUTH=ON -DCURL_DISABLE_NETRC=ON -DCURL_DISABLE_NTLM=ON -DCURL_DISABLE_OPENSSL_AUTO_LOAD_CONFIG=ON -DCURL_DISABLE_PARSEDATE=ON -DCURL_DISABLE_RTSP=ON -DCURL_DISABLE_SHA512_256=ON -DCURL_DISABLE_SHUFFLE_DNS=ON -DCURL_DISABLE_SMB=ON -DCURL_DISABLE_SMTP=ON -DCURL_DISABLE_SOCKETPAIR=ON -DCURL_DISABLE_SRP=ON -DCURL_DISABLE_TFTP=ON -DCURL_DISABLE_VERBOSE_STRINGS=ON -DCURL_DISABLE_WEBSOCKETS=ON -DENABLE_DEBUG=ON -DENABLE_UNICODE=ON -DHTTP_ONLY=ON -DUSE_SSLS_EXPORT=ON   -DENABLE_CURLDEBUG=ON -DCURL_USE_OPENSSL=ON -DUSE_OPENSSL_QUIC=ON'
lib/curl_trc.c:486:6: error: use of undeclared identifier 'Curl_cft_http3'
  486 |   { &Curl_cft_http3,          TRC_CT_PROTOCOL },
      |      ^
lib/curl_trc.c:497:18: error: invalid application of 'sizeof' to an incomplete type 'struct trc_cft_def[]'
  497 |   for(i = 0; i < CURL_ARRAYSIZE(trc_cfts); ++i) {
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~
lib/curl_setup.h:957:34: note: expanded from macro 'CURL_ARRAYSIZE'
  957 | #define CURL_ARRAYSIZE(A) (sizeof(A)/sizeof((A)[0]))
      |                                  ^~~
In file included from _buildroulette/bld/lib/CMakeFiles/libcurl_shared.dir/Unity/unity_1_c.c:13:
lib/curl_trc.c:515:18: error: invalid application of 'sizeof' to an incomplete type 'struct trc_cft_def[]'
  515 |   for(i = 0; i < CURL_ARRAYSIZE(trc_cfts); ++i) {
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~
lib/curl_setup.h:957:34: note: expanded from macro 'CURL_ARRAYSIZE'
  957 | #define CURL_ARRAYSIZE(A) (sizeof(A)/sizeof((A)[0]))
      |                                  ^~~
3 errors generated.

options='-DCURL_DISABLE_DIGEST_AUTH=ON -DCURL_DISABLE_DOH=ON -DCURL_DISABLE_HTTP=ON -DCURL_DISABLE_IMAP=ON -DCURL_DISABLE_KERBEROS_AUTH=ON -DCURL_DISABLE_PARSEDATE=ON -DCURL_DISABLE_SHA512_256=ON -DCURL_DISABLE_SHUFFLE_DNS=ON   -DENABLE_CURLDEBUG=OFF -DCURL_USE_OPENSSL=ON -DUSE_OPENSSL_QUIC=ON'
-DCURL_USE_GNUTLS=ON -DCURL_USE_WOLFSSL=ON

```
lib/md4.c:98:24: error: typedef redefinition with different types ('struct md4_ctx' vs 'WOLFSSL_MD4_CTX' (aka 'struct WOLFSSL_MD4_CTX'))
   98 | typedef struct md4_ctx MD4_CTX;
      |                        ^
/opt/homebrew/Cellar/wolfssl/5.8.0/include/wolfssl/openssl/md4.h:51:25: note: previous definition is here
   51 | typedef WOLFSSL_MD4_CTX MD4_CTX;
      |                         ^
In file included from _buildroulette/bld/lib/CMakeFiles/curlu.dir/Unity/unity_0_c.c:235:
lib/md4.c:100:12: error: static declaration of 'wolfSSL_MD4_Init' follows non-static declaration
  100 | static int MD4_Init(MD4_CTX *ctx)
      |            ^
/opt/homebrew/Cellar/wolfssl/5.8.0/include/wolfssl/openssl/ssl.h:859:41: note: expanded from macro 'MD4_Init'
  859 | #define MD4_Init                        wolfSSL_MD4_Init
      |                                         ^
/opt/homebrew/Cellar/wolfssl/5.8.0/include/wolfssl/openssl/md4.h:44:18: note: previous declaration is here
   44 | WOLFSSL_API void wolfSSL_MD4_Init(WOLFSSL_MD4_CTX* md4);
      |                  ^
In file included from _buildroulette/bld/lib/CMakeFiles/curlu.dir/Unity/unity_0_c.c:235:
lib/md4.c:102:12: error: incompatible pointer types passing 'MD4_CTX *' (aka 'struct WOLFSSL_MD4_CTX *') to parameter of type 'struct md4_ctx *' [-Werror,-Wincompatible-pointer-types]
  102 |   md4_init(ctx);
      |            ^~~
/opt/homebrew/Cellar/nettle/3.10.2/include/nettle/md4.h:66:26: note: passing argument to parameter 'ctx' here
   66 | md4_init(struct md4_ctx *ctx);
      |                          ^
In file included from _buildroulette/bld/lib/CMakeFiles/curlu.dir/Unity/unity_0_c.c:235:
lib/md4.c:106:13: error: static declaration of 'wolfSSL_MD4_Update' follows non-static declaration
  106 | static void MD4_Update(MD4_CTX *ctx, const void *data, unsigned long size)
      |             ^
/opt/homebrew/Cellar/wolfssl/5.8.0/include/wolfssl/openssl/ssl.h:860:41: note: expanded from macro 'MD4_Update'
  860 | #define MD4_Update                      wolfSSL_MD4_Update
      |                                         ^
/opt/homebrew/Cellar/wolfssl/5.8.0/include/wolfssl/openssl/md4.h:45:18: note: previous declaration is here
   45 | WOLFSSL_API void wolfSSL_MD4_Update(WOLFSSL_MD4_CTX* md4, const void* data,
      |                  ^
In file included from _buildroulette/bld/lib/CMakeFiles/curlu.dir/Unity/unity_0_c.c:235:
lib/md4.c:108:14: error: incompatible pointer types passing 'MD4_CTX *' (aka 'struct WOLFSSL_MD4_CTX *') to parameter of type 'struct md4_ctx *' [-Werror,-Wincompatible-pointer-types]
  108 |   md4_update(ctx, size, data);
      |              ^~~
/opt/homebrew/Cellar/nettle/3.10.2/include/nettle/md4.h:69:28: note: passing argument to parameter 'ctx' here
   69 | md4_update(struct md4_ctx *ctx,
      |                            ^
In file included from _buildroulette/bld/lib/CMakeFiles/curlu.dir/Unity/unity_0_c.c:235:
lib/md4.c:111:13: error: static declaration of 'wolfSSL_MD4_Final' follows non-static declaration
  111 | static void MD4_Final(unsigned char *result, MD4_CTX *ctx)
      |             ^
/opt/homebrew/Cellar/wolfssl/5.8.0/include/wolfssl/openssl/ssl.h:861:41: note: expanded from macro 'MD4_Final'
  861 | #define MD4_Final                       wolfSSL_MD4_Final
      |                                         ^
/opt/homebrew/Cellar/wolfssl/5.8.0/include/wolfssl/openssl/md4.h:47:18: note: previous declaration is here
   47 | WOLFSSL_API void wolfSSL_MD4_Final(unsigned char* digest, WOLFSSL_MD4_CTX* md4);
      |                  ^
In file included from _buildroulette/bld/lib/CMakeFiles/curlu.dir/Unity/unity_0_c.c:235:
lib/md4.c:113:14: error: incompatible pointer types passing 'MD4_CTX *' (aka 'struct WOLFSSL_MD4_CTX *') to parameter of type 'struct md4_ctx *' [-Werror,-Wincompatible-pointer-types]
  113 |   md4_digest(ctx, MD4_DIGEST_SIZE, result);
      |              ^~~
/opt/homebrew/Cellar/nettle/3.10.2/include/nettle/md4.h:74:28: note: passing argument to parameter 'ctx' here
   74 | md4_digest(struct md4_ctx *ctx,
      |                            ^
7 errors generated.
```
lib/vssh/libssh.c:235:33: error: unused parameter 'lineno' [-Werror,-Wunused-parameter]
  235 |                           , int lineno
      |                                 ^

options='-DCURL_DISABLE_ALTSVC=ON -DCURL_DISABLE_COOKIES=ON -DCURL_DISABLE_DIGEST_AUTH=ON -DCURL_DISABLE_DOH=ON -DCURL_DISABLE_GOPHER=ON -DCURL_DISABLE_HSTS=ON -DCURL_DISABLE_HTTP_AUTH=ON -DCURL_DISABLE_IMAP=ON -DCURL_DISABLE_LDAP=ON -DCURL_DISABLE_LIBCURL_OPTION=ON -DCURL_DISABLE_NEGOTIATE_AUTH=ON -DCURL_DISABLE_PARSEDATE=ON -DCURL_DISABLE_SOCKETPAIR=ON -DCURL_DISABLE_SRP=ON -DCURL_DISABLE_VERBOSE_STRINGS=ON -DENABLE_DEBUG=ON -DENABLE_UNICODE=ON -DHTTP_ONLY=ON -DCURL_ENABLE_SSL=OFF -DENABLE_IPV6=OFF -DENABLE_CURLDEBUG=ON -DCURL_USE_LIBSSH=ON -DCURL_USE_GNUTLS=ON -DCURL_USE_MBEDTLS=ON -DCURL_USE_WOLFSSL=ON -DUSE_ECH=OFF '
lib/vtls/vtls.c:140:31: error: 'ALPN_SPEC_H11' defined but not used [-Werror=unused-const-variable=]
  140 | static const struct alpn_spec ALPN_SPEC_H11 = {
      |                               ^~~~~~~~~~~~~

options='-DCMAKE_SYSTEM_NAME=Windows -DCMAKE_C_COMPILER_TARGET=x86_64-w64-mingw32 -DCMAKE_C_COMPILER=x86_64-w64-mingw32-gcc -DCURL_USE_LIBPSL=OFF -DCMAKE_IGNORE_PREFIX_PATH=/opt/homebrew -DCURL_USE_SCHANNEL=ON -DUSE_APPLE_IDN=ON -DUSE_LIBIDN2=ON -DUSE_WIN32_IDN=ON -DCURL_DISABLE_ALTSVC=ON -DCURL_DISABLE_BASIC_AUTH=ON -DCURL_DISABLE_BEARER_AUTH=ON -DCURL_DISABLE_DIGEST_AUTH=ON -DCURL_DISABLE_FILE=ON -DCURL_DISABLE_FTP=ON -DCURL_DISABLE_GETOPTIONS=ON -DCURL_DISABLE_GOPHER=ON -DCURL_DISABLE_HSTS=ON -DCURL_DISABLE_HTTP=ON -DCURL_DISABLE_HTTP_AUTH=ON -DCURL_DISABLE_IMAP=ON -DCURL_DISABLE_IPFS=ON -DCURL_DISABLE_KERBEROS_AUTH=ON -DCURL_DISABLE_LDAP=ON -DCURL_DISABLE_LDAPS=ON -DCURL_DISABLE_LIBCURL_OPTION=ON -DCURL_DISABLE_MIME=ON -DCURL_DISABLE_MQTT=ON -DCURL_DISABLE_NEGOTIATE_AUTH=ON -DCURL_DISABLE_NETRC=ON -DCURL_DISABLE_PARSEDATE=ON -DCURL_DISABLE_POP3=ON -DCURL_DISABLE_PROGRESS_METER=ON -DCURL_DISABLE_PROXY=ON -DCURL_DISABLE_RTSP=ON -DCURL_DISABLE_SHA512_256=ON -DCURL_DISABLE_SHUFFLE_DNS=ON -DCURL_DISABLE_SMTP=ON -DCURL_DISABLE_SOCKETPAIR=ON -DCURL_DISABLE_SRP=ON -DCURL_DISABLE_TELNET=ON -DCURL_DISABLE_TFTP=ON -DCURL_DISABLE_VERBOSE_STRINGS=ON -DCURL_WINDOWS_SSPI=ON -DENABLE_DEBUG=ON -DENABLE_UNICODE=ON -DHTTP_ONLY=ON -DUSE_HTTPSRR=ON -DUSE_SSLS_EXPORT=ON -DENABLE_THREADED_RESOLVER=OFF -DBUILD_STATIC_LIBS=ON -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_CURL=OFF -DENABLE_CURLDEBUG=OFF'
vszakats added 4 commits July 23, 2025 19:55
…se.pl

these functions are used by these places:

unit1302: curlx_base64_decode, curlx_base64_encode, curlx_base64url_encode
src/tool_ssls_load: curlx_base64_decode, curlx_base64_encode
src/varfunc: curlx_base64_decode, curlx_base64_encode

Reproducers:
- unit: -DCURL_ENABLE_SSL=OFF -DCURL_DISABLE_DIGEST_AUTH=ON -DCURL_DISABLE_HTTP=ON -DHTTP_ONLY=ON
- src:  -DCURL_ENABLE_SSL=OFF -DCURL_DISABLE_DIGEST_AUTH=ON -DCURL_DISABLE_HTTP=ON -DHTTP_ONLY=ON -DBUILD_SHARED_LIBS=OFF
de-prioritze the gnutls implementation. this works better because we can
avoid include its explicit md4 header, but with wolfssl we need to set
a macro and with some openssl forks there is no way to exclude the md4
type because it's included via openssl/base.h (boringssl, aws-lc).

options='-DCURL_USE_SCHANNEL=OFF -DCURL_USE_GNUTLS=ON -DCURL_USE_MBEDTLS=ON -DCURL_USE_RUSTLS=ON -DCURL_USE_OPENSSL=ON
 -DOPENSSL_ROOT_DIR=/opt/homebrew/opt/aws-lc -DCURL_ZLIB=ON -DCURL_USE_LIBSSH=ON -DCURL_USE_GSASL=ON -DCURL_USE_GSSAPI=ON
 -DUSE_LIBRTMP=OFF -DUSE_NGHTTP2=ON -DCURL_CA_FALLBACK=ON -DCURL_CA_SEARCH_SAFE=ON -DCURL_DISABLE_ALTSVC=ON -DCURL_DISABLE_BASIC_AUTH=ON
 -DCURL_DISABLE_BEARER_AUTH=ON -DCURL_DISABLE_BINDLOCAL=ON -DCURL_DISABLE_CA_SEARCH=ON -DCURL_DISABLE_COOKIES=ON
 -DCURL_DISABLE_DIGEST_AUTH=ON -DCURL_DISABLE_DOH=ON -DCURL_DISABLE_FILE=ON -DCURL_DISABLE_FORM_API=ON -DCURL_DISABLE_HEADERS_API=ON
 -DCURL_DISABLE_HTTP=ON -DCURL_DISABLE_IMAP=ON -DCURL_DISABLE_INSTALL=ON -DCURL_DISABLE_IPFS=ON -DCURL_DISABLE_KERBEROS_AUTH=ON
 -DCURL_DISABLE_LDAP=ON -DCURL_DISABLE_LIBCURL_OPTION=ON -DCURL_DISABLE_MIME=ON -DCURL_DISABLE_MQTT=ON -DCURL_DISABLE_NEGOTIATE_AUTH=ON
 -DCURL_DISABLE_OPENSSL_AUTO_LOAD_CONFIG=ON -DCURL_DISABLE_PARSEDATE=ON -DCURL_DISABLE_POP3=ON -DCURL_DISABLE_PROGRESS_METER=ON
 -DCURL_DISABLE_RTSP=ON -DCURL_DISABLE_SHA512_256=ON -DCURL_DISABLE_SHUFFLE_DNS=ON -DCURL_DISABLE_SMB=ON -DCURL_DISABLE_SOCKETPAIR=ON
 -DCURL_DISABLE_TELNET=ON -DCURL_DISABLE_WEBSOCKETS=ON -DENABLE_DEBUG=ON -DUSE_ECH=ON -DUSE_HTTPSRR=ON -DENABLE_IPV6=OFF
 -DBUILD_STATIC_LIBS=OFF -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_CURL=OFF -DENABLE_CURLDEBUG=ON'

lib/md4.c:98:24: error: typedef redefinition with different types ('struct md4_ctx' vs 'struct md4_state_st')
   98 | typedef struct md4_ctx MD4_CTX;
      |                        ^
/opt/homebrew/opt/aws-lc/include/openssl/base.h:379:29: note: previous definition is here
  379 | typedef struct md4_state_st MD4_CTX;
      |                             ^
In file included from _buildroulette/bld/lib/CMakeFiles/libcurl_shared.dir/Unity/unity_2_c.c:55:
lib/md4.c:102:12: error: incompatible pointer types passing 'MD4_CTX *' (aka 'struct md4_state_st *') to parameter of type 'struct md4_ctx *' [-Werror,-Wincompatible-pointer-types]
  102 |   md4_init(ctx);
      |            ^~~
/opt/homebrew/Cellar/nettle/3.10.2/include/nettle/md4.h:66:26: note: passing argument to parameter 'ctx' here
   66 | md4_init(struct md4_ctx *ctx);
      |                          ^
In file included from _buildroulette/bld/lib/CMakeFiles/libcurl_shared.dir/Unity/unity_2_c.c:55:
lib/md4.c:108:14: error: incompatible pointer types passing 'MD4_CTX *' (aka 'struct md4_state_st *') to parameter of type 'struct md4_ctx *' [-Werror,-Wincompatible-pointer-types]
  108 |   md4_update(ctx, size, data);
      |              ^~~
/opt/homebrew/Cellar/nettle/3.10.2/include/nettle/md4.h:69:28: note: passing argument to parameter 'ctx' here
   69 | md4_update(struct md4_ctx *ctx,
      |                            ^
In file included from _buildroulette/bld/lib/CMakeFiles/libcurl_shared.dir/Unity/unity_2_c.c:55:
lib/md4.c:113:14: error: incompatible pointer types passing 'MD4_CTX *' (aka 'struct md4_state_st *') to parameter of type 'struct md4_ctx *' [-Werror,-Wincompatible-pointer-types]
  113 |   md4_digest(ctx, MD4_DIGEST_SIZE, result);
      |              ^~~
/opt/homebrew/Cellar/nettle/3.10.2/include/nettle/md4.h:74:28: note: passing argument to parameter 'ctx' here
   74 | md4_digest(struct md4_ctx *ctx,
      |                            ^
In file included from _buildroulette/bld/lib/CMakeFiles/libcurl_shared.dir/Unity/unity_2_c.c:55:
lib/md4.c:528:11: error: variable has incomplete type 'MD4_CTX' (aka 'struct md4_state_st')
  528 |   MD4_CTX ctx;
      |           ^
/opt/homebrew/opt/aws-lc/include/openssl/base.h:379:16: note: forward declaration of 'struct md4_state_st'
  379 | typedef struct md4_state_st MD4_CTX;
      |                ^
5 errors generated.
This reverts commit 93db2c6.

CI is clean without these exceptions. Probably depends of configuration
options.
@vszakats vszakats force-pushed the build-combo-fixes branch from 67c5ddb to 8845d35 Compare July 23, 2025 17:55
To disable automatically building certs with the testdeps target.
To improve performance when testing builds.
@vszakats vszakats force-pushed the build-combo-fixes branch from 8845d35 to 674f2a3 Compare July 23, 2025 17:57
@vszakats vszakats closed this in c37e06c Jul 23, 2025
@vszakats vszakats deleted the build-combo-fixes branch July 23, 2025 20:20
vszakats added a commit that referenced this pull request Mar 5, 2026
To omit them from CMake GUI option listings.

Follow-up to c37e06c #17962
Follow-up to 6ab1fa4 #16278

Closes #20818
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build CI Continuous Integration tests

Development

Successfully merging this pull request may close these issues.

1 participant