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

wolfssl: add quic/ngtcp2 detection in cmake, and fix builds #10739

Closed
wants to merge 3 commits into from

Conversation

vszakats
Copy link
Member

@vszakats vszakats commented Mar 10, 2023

  • Implement QUIC/ngtcp2 detection in CMake with wolfSSL.

    Because wolfSSL uses zlib if available, move compression detection before TLS detection.
    (OpenSSL might also need this in the future.)

  • wolfSSL 5.5.0 started using C99 types in its quic.h header, but it doesn't #include the necessary C99 header itself, breaking builds (unless another dependency pulled it by chance.) Add local workaround for it. For this to work with all build tools, we had to fix our header detection first. PR: build: fix stdint/inttypes detection with non-autotools #10745

    Ref: curl/curl-for-win@6ad5f6e

Closes #10739

@vszakats vszakats added TLS cmake HTTP/3 h3 or quic related labels Mar 10, 2023
@vszakats vszakats changed the title cmake: add quic/ngtcp2 detection for wolfssl cmake: add quic/ngtcp2 detection for wolfSSL Mar 10, 2023
vszakats added a commit to vszakats/curl that referenced this pull request Mar 10, 2023
Move compression detection before TLS detection. wolfSSL
uses zlib if available. (OpenSSL might also depend on
zlib/zstd/brotli in a future release.)

Closes curl#10739
@vszakats vszakats force-pushed the cmake-wolfssl-quic-detection branch from 72d1e46 to 25a8512 Compare March 10, 2023 21:13
vszakats added a commit to vszakats/curl that referenced this pull request Mar 10, 2023
Move compression detection before TLS detection. wolfSSL
uses zlib if available. (OpenSSL might also depend on
zlib/zstd/brotli in a future release.)

Closes curl#10739
@vszakats vszakats force-pushed the cmake-wolfssl-quic-detection branch from 25a8512 to c6d8cb7 Compare March 10, 2023 21:14
vszakats added a commit to curl/curl-for-win that referenced this pull request Mar 11, 2023
It can be enabled here with CMake builds, once upstream merges.

Ref: curl/curl#10739
@vszakats vszakats changed the title cmake: add quic/ngtcp2 detection for wolfSSL wolfssl: add quic/ngtcp2 detection in cmake and fix quic builds Mar 12, 2023
@vszakats vszakats added the build label Mar 12, 2023
@vszakats vszakats changed the title wolfssl: add quic/ngtcp2 detection in cmake and fix quic builds wolfssl: add quic/ngtcp2 detection in cmake and fix builds Mar 12, 2023
@vszakats vszakats changed the title wolfssl: add quic/ngtcp2 detection in cmake and fix builds wolfssl: add quic/ngtcp2 detection in cmake, and fix builds Mar 12, 2023
vszakats added a commit that referenced this pull request Mar 13, 2023
Fix `stdint.h` and `inttypes.h` detection with non-autotools builds on
Windows. (autotools already auto-detected them accurately.)

`lib/config-win32.h` builds (e.g. `Makefile.mk`):
- set `HAVE_STDINT_H` where supported.
- set `HAVE_INTTYPES_H` for MinGW.

CMake:
- auto-detect them on Windows. (They were both force-disabled.)
- delete unused `CURL_PULL_STDINT_H`.
- delete unused `CURL_PULL_INTTYPES_H`.
- stop detecting `HAVE_STDINT_H` twice.
  Present since the initial CMake commit: 4c5307b

curl doesn't use these C99 headers, we need them now to workaround
broken wolfSSL builds. Ref: #10739

Once that clears up, we can delete these detections and macros (unless
we want to keep them for future us.)

Reviewed-by: Daniel Stenberg
Closes #10745
Move compression detection before TLS detection. wolfSSL
uses zlib if available. (OpenSSL might also depend on
zlib/zstd/brotli in a future release.)

Closes curl#10739
@vszakats vszakats force-pushed the cmake-wolfssl-quic-detection branch from e3c0b62 to 102642a Compare March 13, 2023 10:50
@bagder
Copy link
Member

bagder commented Mar 14, 2023

very green ✔️ !

@vszakats vszakats closed this in ebef55a Mar 14, 2023
@vszakats vszakats deleted the cmake-wolfssl-quic-detection branch March 14, 2023 11:59
vszakats added a commit to curl/curl-for-win that referenced this pull request Mar 14, 2023
vszakats added a commit to curl/curl-for-win that referenced this pull request Mar 14, 2023
bch pushed a commit to bch/curl that referenced this pull request Jul 19, 2023
Fix `stdint.h` and `inttypes.h` detection with non-autotools builds on
Windows. (autotools already auto-detected them accurately.)

`lib/config-win32.h` builds (e.g. `Makefile.mk`):
- set `HAVE_STDINT_H` where supported.
- set `HAVE_INTTYPES_H` for MinGW.

CMake:
- auto-detect them on Windows. (They were both force-disabled.)
- delete unused `CURL_PULL_STDINT_H`.
- delete unused `CURL_PULL_INTTYPES_H`.
- stop detecting `HAVE_STDINT_H` twice.
  Present since the initial CMake commit: 4c5307b

curl doesn't use these C99 headers, we need them now to workaround
broken wolfSSL builds. Ref: curl#10739

Once that clears up, we can delete these detections and macros (unless
we want to keep them for future us.)

Reviewed-by: Daniel Stenberg
Closes curl#10745
bch pushed a commit to bch/curl that referenced this pull request Jul 19, 2023
- add QUIC/ngtcp2 detection in CMake with wolfSSL.

  Because wolfSSL uses zlib if available, move compression detection
  before TLS detection. (OpenSSL might also need this in the future.)

- wolfSSL 5.5.0 started using C99 types in its `quic.h` header, but it
  doesn't #include the necessary C99 header itself, breaking builds
  (unless another dependency pulled it by chance.) Add local workaround
  for it. For this to work with all build tools, we had to fix our
  header detection first. Ref: curl#10745

  Ref: curl/curl-for-win@6ad5f6e

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

Successfully merging this pull request may close these issues.

None yet

2 participants