8000 Unable to build curl with HTTP/3 using Openssl · Issue #17164 · curl/curl · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Unable to build curl with HTTP/3 using Openssl #17164

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Karthikdasari0423 opened this issue Apr 24, 2025 · 8 comments
Closed

Unable to build curl with HTTP/3 using Openssl #17164

Karthikdasari0423 opened this issue Apr 24, 2025 · 8 comments
Labels
build HTTP/3 h3 or quic related

Comments

@Karthikdasari0423
Copy link
Contributor

I did this

I followed steps from below link
https://github.com/curl/curl/blob/master/docs/HTTP3.md#openssl-version

Openssl version

root@ubuntu:/src/openssl# git log
commit 636dfadc70ce26f2473870570bfd9ec352806b1d (grafted, HEAD, tag: openssl-3.5.0)
Author: openssl-machine <openssl-machine@openssl.org>
Date:   Tue Apr 8 13:09:06 2025 +0000

    Prepare for release of 3.5.0


    Reviewed-by: Saša Nedvědický <sashan@openssl.org>
    Reviewed-by: Matt Caswell <matt@openssl.org>
    Release: yes
root@ubuntu:/src/openssl#

nghttp3 version

root@ubuntu:/src/nghttp3# git log
commit 9ee0c9248f97c502cce01e6c8edcccd3723c61e6 (grafted, HEAD, tag: v1.9.0)
Author: Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>
Date:   Wed Apr 16 18:36:27 2025 +0900

    Bump package and library versions
root@ubuntu:/src/nghttp3#

Curl version

root@ubuntu:/src/nghttp3# cd /src/curl_openssl/
root@ubuntu:/src/curl_openssl# git log
commit 596da988c437d4fa7eb40d8a0e0c285b852098ee (HEAD -> master, origin/master, origin/HEAD)
Author: Viktor Szakats <commit@vsz.me>
Date:   Wed Apr 23 19:30:39 2025 +0200

    GHA/windows: fixup MSYS2 downgrade step

    Fix step failing when 3.6 is detected.
    Ref: https://github.com/curl/curl/actions/runs/14620854081/job/41020237740?pr=17157#step:14:8

    Follow-up to 20d9d3bcce5efe47ab14e5c9233c2889515fada1 #17151
    Follow-up to b06c12b7248592cf001e621d7cd8dc78a827212b #16574

    Closes #17158

Curl built using


LDFLAGS="-Wl,-rpath,/var/local/openssl/lib" ./configure --with-openssl=/var/local/openssl --with-openssl-quic --with-nghttp3=/var/local/nghttp3
make

Curl error

root@ubuntu:/src/curl_openssl# make
Making all in lib
make[1]: Entering directory '/src/curl_openssl/lib'
make  all-am
make[2]: Entering directory '/src/curl_openssl/lib'
  CC       vquic/libcurl_la-curl_osslq.lo
vquic/curl_osslq.c:288:20: error: field ‘streams’ has incomplete type
  288 |   struct uint_hash streams;          /* hash `data->mid` to `h3_stream_ctx` */
      |                    ^~~~~~~
vquic/curl_osslq.c: In function ‘cf_osslq_ctx_init’:
vquic/curl_osslq.c:309:3: error: implicit declaration of function ‘Curl_uint_hash_init’; did you mean ‘Curl_uint_tbl_init’? [-Werror=implicit-function-declaration]
  309 |   Curl_uint_hash_init(&ctx->streams, 63, h3_stream_hash_free);
      |   ^~~~~~~~~~~~~~~~~~~
      |   Curl_uint_tbl_init
vquic/curl_osslq.c: In function ‘cf_osslq_ctx_free’:
vquic/curl_osslq.c:320:5: error: implicit declaration of function ‘Curl_uint_hash_destroy’; did you mean ‘Curl_uint_tbl_destroy’? [-Werror=implicit-function-declaration]
  320 |     Curl_uint_hash_destroy(&ctx->streams);
      |     ^~~~~~~~~~~~~~~~~~~~~~
      |     Curl_uint_tbl_destroy
In file included from vquic/curl_osslq.c:51:
vquic/curl_osslq.c: In function ‘h3_data_setup’:
vquic/vquic_int.h:55:11: error: implicit declaration of function ‘Curl_uint_hash_get’; did you mean ‘Curl_uint_tbl_get’? [-Werror=implicit-function-declaration]
   55 |   (data ? Curl_uint_hash_get(&(ctx)->streams, (data)->mid) : NULL)
      |           ^~~~~~~~~~~~~~~~~~
vquic/curl_osslq.c:613:34: note: in expansion of macro ‘H3_STREAM_CTX’
  613 |   struct h3_stream_ctx *stream = H3_STREAM_CTX(ctx, data);
      |                                  ^~~~~~~~~~~~~
vquic/curl_osslq.c:637:7: error: implicit declaration of function ‘Curl_uint_hash_set’; did you mean ‘Curl_uint_tbl_get’? [-Werror=implicit-function-declaration]
  637 |   if(!Curl_uint_hash_set(&ctx->streams, data->mid, stream)) {
      |       ^~~~~~~~~~~~~~~~~~
      |       Curl_uint_tbl_get
vquic/curl_osslq.c: In function ‘h3_data_done’:
vquic/curl_osslq.c:662:5: error: implicit declaration of function ‘Curl_uint_hash_remove’; did you mean ‘Curl_uint_tbl_remove’? [-Werror=implicit-function-declaration]
  662 |     Curl_uint_hash_remove(&ctx->streams, data->mid);
      |     ^~~~~~~~~~~~~~~~~~~~~
      |     Curl_uint_tbl_remove
vquic/curl_osslq.c: In function ‘cf_osslq_get_qstream’:
vquic/curl_osslq.c:707:5: error: implicit declaration of function ‘Curl_uint_hash_visit’; did you mean ‘Curl_uint_tbl_init’? [-Werror=implicit-function-declaration]
  707 |     Curl_uint_hash_visit(&ctx->streams, cf_osslq_find_stream, &fctx);
      |     ^~~~~~~~~~~~~~~~~~~~
      |     Curl_uint_tbl_init
vquic/curl_osslq.c: In function ‘cf_osslq_check_and_unblock’:
vquic/curl_osslq.c:1523:25: error: implicit declaration of function ‘Curl_uint_hash_count’; did you mean ‘Curl_uint_tbl_count’? [-Werror=implicit-function-declaration]
 1523 |     if(ctx->items_max < Curl_uint_hash_count(&ctx->streams)) {
      |                         ^~~~~~~~~~~~~~~~~~~~
      |                         Curl_uint_tbl_count
cc1: some warnings being treated as errors
make[2]: *** [Makefile:3531: vquic/libcurl_la-curl_osslq.lo] Error 1
make[2]: Leaving directory '/src/curl_openssl/lib'
make[1]: *** [Makefile:1656: all] Error 2
make[1]: Leaving directory '/src/curl_openssl/lib'
make: *** [Makefile:626: all-recursive] Error 1
root@ubuntu:/src/curl_openssl#

I expected the following

I expect curl to built sucessfully

curl/libcurl version

curl 7.81.0 (x86_64-pc-linux-gnu) libcurl/7.81.0 OpenSSL/3.0.2 zlib/1.2.11 brotli/1.1.0 zstd/1.4.8 libidn2/2.3.2 libpsl/0.21.0 (+libidn2/2.3.2) libssh/0.9.6/openssl/zlib nghttp2/1.43.0 librtmp/2.3 OpenLDAP/2.5.18
Release-Date: 2022-01-05
Protocols: dict file ftp ftps gopher gophers http https imap imaps ldap ldaps mqtt pop3 pop3s rtmp rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: alt-svc AsynchDNS brotli GSS-API HSTS HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz NTLM NTLM_WB PSL SPNEGO SSL TLS-SRP UnixSockets zstd

operating system

root@ubuntu:/src/curl_openssl# uname -a
Linux ubuntu 5.15.0-134-generic #145-Ubuntu SMP Wed Feb 12 20:08:39 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
root@ubuntu:/src/curl_openssl#

@Karthikdasari0423
Copy link
Contributor Author

Am I missing anything here?

@dfandrich
Copy link
Contributor
dfandrich commented Apr 24, 2025 via email

@bagder
Copy link
Member
bagder commented Apr 24, 2025

I suspect @Karthikdasari0423 did not build 7.81.0 based on that build error. Maybe #17156 is needed?

@Karthikdasari0423
Copy link
Contributor Author
Karthikdasari0423 commented Apr 24, 2025

Yes @bagder
I didnt build 7.81.0 explicitly
It was there by default on my VM
I was trying to build new curl with master branch

root@ubuntu:/src/nghttp3# cd /src/curl_openssl/
root@ubuntu:/src/curl_openssl# git log
commit 596da988c437d4fa7eb40d8a0e0c285b852098ee (HEAD -> master, origin/master, origin/HEAD)
Author: Viktor Szakats <commit@vsz.me>
Date:   Wed Apr 23 19:30:39 2025 +0200

    GHA/windows: fixup MSYS2 downgrade step

    Fix step failing when 3.6 is detected.
    Ref: https://github.com/curl/curl/actions/runs/14620854081/job/41020237740?pr=17157#step:14:8

    Follow-up to 20d9d3bcce5efe47ab14e5c9233c2889515fada1 #17151
    Follow-up to b06c12b7248592cf001e621d7cd8dc78a827212b #16574

    Closes #17158

@dfandrich

@bagder bagder changed the title Unable to build curl using Openssl library Unable to build curl with HTTP/3 using Openssl Apr 24, 2025
@bagder bagder added build HTTP/3 h3 or quic related labels Apr 24, 2025
@bagder
Copy link
Member
bagder commented Apr 24, 2025

@Karthikdasari0423 try pulling master again and see if the problem is fixed!

@Karthikdasari0423
Copy link
Contributor Author

Thanks @bagder @dfandrich
Problem solved with latest master

  CC       ../lib/libcurltool_la-warnless.lo
  CCLD     libcurltool.la
make[1]: Leaving directory '/src/curl_openssl/src'
Making all in scripts
make[1]: Entering directory '/src/curl_openssl/scripts'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/src/curl_openssl/scripts'
make[1]: Entering directory '/src/curl_openssl'
make[1]: Nothing to be done for 'all-am'.
make[1]: Leaving directory '/src/curl_openssl'
root@ubuntu:/src/curl_openssl#
root@ubuntu:/src/curl_openssl# git log
commit 29e0a8a09ba5128b50972c48b04bdbd787c2e665 (HEAD -> master, origin/master, origin/HEAD)
Author: Sergey <sergey@solidstatenetworks.com>
Date:   Wed Apr 23 18:45:17 2025 -0700

    cmake: fix option() and mark_as_advanced() mixed order

    Closes #17163

commit c1c99054abcee3887bb7b9c3d0e1857c25276755
Author: Viktor Szakats <commit@vsz.me>
Date:   Wed Apr 23 10:26:38 2025 +0200

    cmake: install shell completions for cross-builds

    Also:
    - omit auto-detecting `CURL_COMPLETION_FISH_DIR` via `pkg-config`
      for cross-builds and when `CMAKE_INSTALL_PREFIX` is set.
    - flatten nested `if`s.

    Note:
    On macOS with Homebrew, `pkg-config --variable completionsdir fish`
    returns the version-specific Cellar path instead of the permanent path
    `/opt/homebrew/share/fish/vendor_completions.d/`. This mimics what
    autotools does, but may need further fixing, possibly upstream.
    https://github.com/Homebrew/homebrew-core/blob/9c13e62b009b8e814fda180e0fcc5096318daf31/Formula/f/fish.rb
    https://github.com/fish-shell/fish-shell/blob/ce631fd2fb1f5b63f5f0f1b4041a30dfad823d22/cmake/Install.cmake#L15-L21

    Ref: #17147
    Ref: 51170b52d15256d4aaf74ed6eea9a9297f5d595c #17159
    Bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1103938

    Closes #17145

commit 82606325e3a65c06985bbf621da7b360d753791e
Author: Jochen Sprickerhof <git@jochen.sprickerhof.de>
Date:   Wed Apr 23 15:54:21 2025 +0200
root@ubuntu:/src/curl_openssl# /src/curl_openssl/src/curl -V
curl 8.14.0-DEV (x86_64-pc-linux-gnu) libcurl/8.14.0-DEV OpenSSL/3.5.0 zlib/1.2.11 brotli/1.1.0 libidn2/2.3.2 libpsl/0.21.0 nghttp2/1.43.0 nghttp3/1.9.0 OpenLDAP/2.5.18
Release-Date: [unreleased]
Protocols: dict file ftp ftps gopher gophers http https imap imaps ipfs ipns ldap ldaps mqtt pop3 pop3s rtsp smb smbs smtp smtps telnet tftp ws wss
Features: alt-svc AsynchDNS brotli HSTS HTTP2 HTTP3 HTTPS-proxy IDN IPv6 Largefile libz NTLM PSL SSL threadsafe TLS-SRP UnixSockets
root@ubuntu:/src/curl_openssl#

@bagder
Copy link
Member
bagder commented Apr 24, 2025

Thanks for confirming, cased closed!

@bagder bagder closed this as completed Apr 24, 2025
@Karthikdasari0423
Copy link
Contributor Author

Thanks @bagder

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build HTTP/3 h3 or quic related
Development

No branches or pull requests

3 participants
0