-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
HTTP/3 (ngtcp2 and quiche) and alt-svc support in CMake #5359
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
Conversation
Yay, the ngtcp2 build passes in Travis CI! I just forgot to set |
Add three new CMake Find modules (using the curl license, but I grant others the right to apply the CMake BSD license instead). This CMake config is simpler than the autotools one because it assumes ngtcp2 and nghttp3 to be used together. Another difference is that this CMake config checks whether QUIC is actually supported by the TLS library (patched OpenSSL or boringssl) since this can be a common configuration mistake that could result in build errors later. Unlike autotools, CMake does not warn you that the features are experimental. The user is supposed to already know that and read the documentation. It requires a very special build environment anyway. Tested with ngtcp2+OpenSSL+nghttp3 and quiche+boringssl, both built from current git master. Use `LD_DEBUG=files src/curl |& grep need` to figure out which features (libldap-2.4, libssh2) to disable due to conflicts with boringssl.
Tested alt-svc with quiche. While at it, add missing MultiSSL reporting (not tested).
To avoid an explosion of jobs, extend the existing CMake tests with ngtcp2 and quiche support. macOS was previously moved to GitHub actions, so the non-Linux case can be dropped.
The quiche_conn_set_qlog_fd check was missing some If really needed, I could define |
I've also managed to get this to build on macOS. This does not require pkg-config unlike the autotools build:
Result:
For the record, info about the macOS environment (no custom patches, hence the qlog issue):
|
Thanks @Lekensteyn. Do you think it would be valuable to document that build method in docs/HTTP3.md too or will it just get too crowded? |
autotools leaves a mess in my source directories, obviously I am going to fix CMake support in order to test HTTP/3 changes :-)
I built nghttp3 and ngtcp2 with CMake (the latter requires ngtcp2/ngtcp2#240 - not needed for autotools) and:
The curl+quiche+boringssl build was configured with:
My local build works,
curl -v --http3 https://cloudflare.com
andcurl --alt-svc altsvc.cache -vk https://cloudflare.com
(twice) works. Now let's see whether Travis is happy.