Skip to content
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

curl build error when ngtcp2 is installed but nghttp3 is not #10793

Closed
chiouss opened this issue Mar 19, 2023 · 3 comments
Closed

curl build error when ngtcp2 is installed but nghttp3 is not #10793

chiouss opened this issue Mar 19, 2023 · 3 comments
Assignees
Labels

Comments

@chiouss
Copy link

chiouss commented Mar 19, 2023

Hi,

I installed ngtcp2 on Openwrt in order to build some small program with QUIC I wrote. But then I found curl will build failed after it finds ngtcp2 in system is usable but doesn't notice there's no nghttp3 in system.

I know I can add --without-ngtcp2 in configure, but I add --without-nghttp3 at the first time and found nothing changed. Then I realized that there's no checking of USE_NGHTTP3 in code.

I think in configure.ac we need to check nghttp3 first then check ngtcp2 maybe?

In file included from quic.h:29,
                 from urldata.h:142,
                 from altsvc.c:30:
vquic/ngtcp2.h:30:10: fatal error: nghttp3/nghttp3.h: No such file or directory
 #include <nghttp3/nghttp3.h>
          ^~~~~~~~~~~~~~~~~~~
compilation terminated.
Makefile:1670: recipe for target 'libcurl_la-altsvc.lo' failed

I did this

./configure --target=aarch64-openwrt-linux --host=aarch64-openwrt-linux --build=x86_64-pc-linux-gnu --program-prefix="" --program-suffix="" --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/lib --sysconfdir=/etc --datadir=/usr/share --localstatedir=/var --mandir=/usr/man --infodir=/usr/info --disable-nls --disable-debug --disable-ares --enable-shared --enable-static --disable-manual --without-nss --without-librtmp --without-libidn --without-ca-path --without-libpsl --without-zstd --with-ca-bundle=/etc/ssl/certs/ca-certificates.crt --enable-ipv6 --without-wolfssl --without-gnutls --with-ssl="/home/chiouss/galaxy-ap/release-655/mt7981/openwrt/staging_dir/target-aarch64-openwrt-linux_musl/usr" --without-mbedtls --without-libidn2 --without-libssh2 --without-zlib --without-zstd --without-nghttp2 --disable-dict --enable-file --enable-ftp --disable-gopher --enable-http --disable-imap --disable-ldap --disable-ldaps --disable-pop3 --disable-rtsp --disable-smb --disable-smtp --disable-telnet --disable-tftp --enable-cookies --disable-crypto-auth --disable-libcurl-option --enable-proxy --enable-threaded-resolver --disable-tls-srp --disable-unix-sockets --enable-verbose
then make

I expected the following

a success build of curl

curl/libcurl version

7.83.1

operating system

Ubuntu 18.04/Openwrt 21.02

@bagder bagder added the build label Mar 19, 2023
@icing icing self-assigned this Mar 21, 2023
icing added a commit to icing/curl that referenced this issue Mar 23, 2023
- make configure show on HTTP3 feature that both ngtcp2 and nghttp3
  are in play
- define ENABLE_QUIC only when USE_NGTCP2 and USE_NGHTTP3 are defined
- add USE_NGHTTP3 in the ngtcp2 implementation
- refs curl#10793
@icing
Copy link
Contributor

icing commented Mar 23, 2023

Proposed #10821 to fix this issue.

@bagder bagder closed this as completed in 78f73f7 Mar 23, 2023
@chiouss
Copy link
Author

chiouss commented Mar 23, 2023

@icing thank for fixing.

But I still think the wording and order of checking ngtcp2 & nghttp3 is wrong in configure.ac:

https://github.com/curl/curl/blob/master/configure.ac#L2824

# without HTTP, ngtcp2 is no use

https://github.com/curl/curl/blob/master/configure.ac#L3078

# without ngtcp2, nghttp3 is of no use for us

It should be "without HTTP, nghttp3 is no use" and "without nghttp3, ngtcp2 is of no use for us", since nghttp3 requires ngtcp2 to work. Do I miss something?

bch pushed a commit to bch/curl that referenced this issue Jul 19, 2023
- make configure show on HTTP3 feature that both ngtcp2 and nghttp3
  are in play
- define ENABLE_QUIC only when USE_NGTCP2 and USE_NGHTTP3 are defined
- add USE_NGHTTP3 in the ngtcp2 implementation

Fixes curl#10793
Closes curl#10821
@Avamander
Copy link

@icing
I also stumbled upon this. Lack of ngtcp2 but enabling nghttp3 leaves a false impression that HTTP3 is enabled during ./configure. In actuality that does not seem to be the case when building 8.5.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

4 participants