mirror of
https://github.com/open-goal/jak-project
synced 2026-08-20 14:24:45 -04:00
5d5e35fb9b
## Problem Windows builds break with a current local toolchain (Scoop LLVM 22.1.8, CMake 4.4.0, VS 2026), in two independent ways: 1. The build stops at curl's deliberate guard: `#error "no non-blocking method was found/used/set"` in `third-party/curl/lib/nonblock.c`. 2. From the second configure onward, `cmake --build` re-runs CMake in an endless loop (observed 42 consecutive reconfigure cycles in a single build). Likely the same mechanism behind the "endlessly building" VS 2026 note in `docs/setup/dev/vs.md`. ## Root cause 1. `third-party/curl/CMake/CurlTests.c` passes `int *` to `ioctlsocket()`, whose third parameter is `u_long *`. Clang 22 promotes `-Wincompatible-pointer-types` to a hard error in C, so the `HAVE_IOCTLSOCKET_FIONBIO` try_compile silently fails and `curl_config.h` never defines it. Upstream CI does not see this because the windows-2022 runner image ships an older LLVM. GCC 14 promotes the same warning to a hard error, which is very likely the `CurlTests.c.obj` failure reported from MSYS2 in open-goal/jak-project#3551. Upstream curl hit the identical problem with GCC 14 and fixed the probe in curl 8.8.0 (curl/curl#13578). 2. The root CMakeLists copies the build tree's `compile_commands.json` into `<src>/build/` for clangd using `configure_file()`, which registers its input as a configure dependency. CMake rewrites `compile_commands.json` late in every generation, after `CTestTestfile.cmake` and `cmake_install.cmake` (outputs of the same Ninja regen rule), so once the dependency is registered the rule is deterministically dirty and every `ninja` invocation re-runs CMake. A pristine first configure is safe (the file does not exist yet, so the `if(EXISTS ...)` guard skips the copy), which is why the loop looks machine- or IDE-specific. ## Fix 1. Per review, re-vendor `third-party/curl` at the `curl-8_21_0` tag (previously `curl-8_3_0`), which carries the upstream probe fix plus two years of upstream development; `vendor.yaml` updated to match. Adjustments the version jump forced: - curl 8.15 removed the native macOS Secure Transport backend (`CURL_USE_SECTRANSP`), so macOS now builds curl against OpenSSL like Linux. The two macOS workflows install Homebrew `openssl@3` and export `OPENSSL_ROOT_DIR` (keg-only), and the macOS setup docs gained the same two lines. - `CURL_BROTLI` / `CURL_ZSTD` switched to AUTO-detection in curl 8.10; pinned OFF to keep the previous no-compression behavior and avoid silently linking whatever the CI images happen to have. - curl's new top-level `BUILD_EXAMPLES` cache option (default ON) leaked into discord-rpc's identically named option and broke configure at a nonexistent `examples/send-presence` directory; pinned OFF ahead of the third-party subdirectories. The diff is dominated by the mechanical tag-tree swap under `third-party/curl` (linguist-vendored, collapsed in review). The hand-written changes are `CMakeLists.txt`, the two macOS workflows, `docs/setup/system/macos.md`, and `vendor.yaml`. 2. Swap `configure_file()` for `file(COPY ...)`: the same clangd copy with no configure dependency registered. (`file(COPY_FILE ... ONLY_IF_DIFFERENT)` would be cleaner still but requires CMake 3.21, above the declared `cmake_minimum_required(VERSION 3.10)`.) ## Test plan - [x] Fresh `cmake --preset Release-windows-clang` (LLVM 22, no cache seeding) completes and logs `Enabled SSL backends: Schannel`; the FIONBIO probe passes without the previous `#error` - [x] Full Windows Release build from scratch in the branch worktree (all 1422 targets) - [x] goalc-test suite: 1509 passed, 0 failed - [x] Second consecutive configure with `compile_commands.json` present: the regen rule in `build.ninja` has no `compile_commands.json` input; `<src>/build/compile_commands.json` is still refreshed for clangd - [x] Repeated `ninja` invocations after a full build no longer re-run CMake - [x] macOS Intel and ARM CI green (first exercise of the OpenSSL backend switch) --- I work off a self-hosted forge, so this GitHub account is quiet; the configure logs and ninja dirty-node traces from the investigation are available if anyone wants the raw data. (AI-assisted)
189 lines
5.4 KiB
XML
Vendored
Generated
189 lines
5.4 KiB
XML
Vendored
Generated
<?xml version="1.0" encoding="US-ASCII"?>
|
|
<testcase>
|
|
# perl:
|
|
#for(1 .. 200) {
|
|
#}
|
|
<info>
|
|
<keywords>
|
|
HTTP
|
|
cookies
|
|
--resolve
|
|
</keywords>
|
|
</info>
|
|
|
|
# Server-side
|
|
<reply>
|
|
<data>
|
|
HTTP/1.1 200 OK
|
|
Date: Tue, 09 Nov 2010 14:49:00 GMT
|
|
Server: test-server/fake
|
|
Content-Length: 6
|
|
Set-Cookie: cookie-1=yes;
|
|
Set-Cookie: cookie-2=yes;
|
|
Set-Cookie: cookie-3=yes;
|
|
Set-Cookie: cookie-4=yes;
|
|
Set-Cookie: cookie-5=yes;
|
|
Set-Cookie: cookie-6=yes;
|
|
Set-Cookie: cookie-7=yes;
|
|
Set-Cookie: cookie-8=yes;
|
|
Set-Cookie: cookie-9=yes;
|
|
Set-Cookie: cookie-10=yes;
|
|
Set-Cookie: cookie-11=yes;
|
|
Set-Cookie: cookie-12=yes;
|
|
Set-Cookie: cookie-13=yes;
|
|
Set-Cookie: cookie-14=yes;
|
|
Set-Cookie: cookie-15=yes;
|
|
Set-Cookie: cookie-16=yes;
|
|
Set-Cookie: cookie-17=yes;
|
|
Set-Cookie: cookie-18=yes;
|
|
Set-Cookie: cookie-19=yes;
|
|
Set-Cookie: cookie-20=yes;
|
|
Set-Cookie: cookie-21=yes;
|
|
Set-Cookie: cookie-22=yes;
|
|
Set-Cookie: cookie-23=yes;
|
|
Set-Cookie: cookie-24=yes;
|
|
Set-Cookie: cookie-25=yes;
|
|
Set-Cookie: cookie-26=yes;
|
|
Set-Cookie: cookie-27=yes;
|
|
Set-Cookie: cookie-28=yes;
|
|
Set-Cookie: cookie-29=yes;
|
|
Set-Cookie: cookie-30=yes;
|
|
Set-Cookie: cookie-31=yes;
|
|
Set-Cookie: cookie-32=yes;
|
|
Set-Cookie: cookie-33=yes;
|
|
Set-Cookie: cookie-34=yes;
|
|
Set-Cookie: cookie-35=yes;
|
|
Set-Cookie: cookie-36=yes;
|
|
Set-Cookie: cookie-37=yes;
|
|
Set-Cookie: cookie-38=yes;
|
|
Set-Cookie: cookie-39=yes;
|
|
Set-Cookie: cookie-40=yes;
|
|
Set-Cookie: cookie-41=yes;
|
|
Set-Cookie: cookie-42=yes;
|
|
Set-Cookie: cookie-43=yes;
|
|
Set-Cookie: cookie-44=yes;
|
|
Set-Cookie: cookie-45=yes;
|
|
Set-Cookie: cookie-46=yes;
|
|
Set-Cookie: cookie-47=yes;
|
|
Set-Cookie: cookie-48=yes;
|
|
Set-Cookie: cookie-49=yes;
|
|
Set-Cookie: cookie-50=yes;
|
|
Set-Cookie: cookie-51=yes;
|
|
Set-Cookie: cookie-52=yes;
|
|
Set-Cookie: cookie-53=yes;
|
|
Set-Cookie: cookie-54=yes;
|
|
Set-Cookie: cookie-55=yes;
|
|
Set-Cookie: cookie-56=yes;
|
|
Set-Cookie: cookie-57=yes;
|
|
Set-Cookie: cookie-58=yes;
|
|
Set-Cookie: cookie-59=yes;
|
|
Set-Cookie: cookie-60=yes;
|
|
Set-Cookie: cookie-61=yes;
|
|
Set-Cookie: cookie-62=yes;
|
|
Set-Cookie: cookie-63=yes;
|
|
Set-Cookie: cookie-64=yes;
|
|
Set-Cookie: cookie-65=yes;
|
|
Set-Cookie: cookie-66=yes;
|
|
Set-Cookie: cookie-67=yes;
|
|
Set-Cookie: cookie-68=yes;
|
|
Set-Cookie: cookie-69=yes;
|
|
Set-Cookie: cookie-70=yes;
|
|
Set-Cookie: cookie-71=yes;
|
|
Set-Cookie: cookie-72=yes;
|
|
Set-Cookie: cookie-73=yes;
|
|
Set-Cookie: cookie-74=yes;
|
|
Set-Cookie: cookie-75=yes;
|
|
Set-Cookie: cookie-76=yes;
|
|
Set-Cookie: cookie-77=yes;
|
|
Set-Cookie: cookie-78=yes;
|
|
Set-Cookie: cookie-79=yes;
|
|
Set-Cookie: cookie-80=yes;
|
|
|
|
-foo-
|
|
</data>
|
|
</reply>
|
|
|
|
# Client-side
|
|
<client>
|
|
<server>
|
|
http
|
|
</server>
|
|
<name>
|
|
Many Set-Cookie response headers
|
|
</name>
|
|
<command>
|
|
http://attack.invalid:%HTTPPORT/a/b/%TESTNUMBER -c %LOGDIR/cookie%TESTNUMBER --resolve attack.invalid:%HTTPPORT:%HOSTIP
|
|
</command>
|
|
<features>
|
|
cookies
|
|
</features>
|
|
</client>
|
|
|
|
# Verify data after the test has been "shot"
|
|
<verify>
|
|
<protocol crlf="headers">
|
|
GET /a/b/%TESTNUMBER HTTP/1.1
|
|
Host: attack.invalid:%HTTPPORT
|
|
User-Agent: curl/%VERSION
|
|
Accept: */*
|
|
|
|
</protocol>
|
|
<file name="%LOGDIR/cookie%TESTNUMBER" mode="text">
|
|
# Netscape HTTP Cookie File
|
|
# https://curl.se/docs/http-cookies.html
|
|
# This file was generated by libcurl! Edit at your own risk.
|
|
|
|
attack.invalid FALSE /a/b FALSE 0 cookie-50 yes
|
|
attack.invalid FALSE /a/b FALSE 0 cookie-49 yes
|
|
attack.invalid FALSE /a/b FALSE 0 cookie-48 yes
|
|
attack.invalid FALSE /a/b FALSE 0 cookie-47 yes
|
|
attack.invalid FALSE /a/b FALSE 0 cookie-46 yes
|
|
attack.invalid FALSE /a/b FALSE 0 cookie-45 yes
|
|
attack.invalid FALSE /a/b FALSE 0 cookie-44 yes
|
|
attack.invalid FALSE /a/b FALSE 0 cookie-43 yes
|
|
attack.invalid FALSE /a/b FALSE 0 cookie-42 yes
|
|
attack.invalid FALSE /a/b FALSE 0 cookie-41 yes
|
|
attack.invalid FALSE /a/b FALSE 0 cookie-40 yes
|
|
attack.invalid FALSE /a/b FALSE 0 cookie-39 yes
|
|
attack.invalid FALSE /a/b FALSE 0 cookie-38 yes
|
|
attack.invalid FALSE /a/b FALSE 0 cookie-37 yes
|
|
attack.invalid FALSE /a/b FALSE 0 cookie-36 yes
|
|
attack.invalid FALSE /a/b FALSE 0 cookie-35 yes
|
|
attack.invalid FALSE /a/b FALSE 0 cookie-34 yes
|
|
attack.invalid FALSE /a/b FALSE 0 cookie-33 yes
|
|
attack.invalid FALSE /a/b FALSE 0 cookie-32 yes
|
|
attack.invalid FALSE /a/b FALSE 0 cookie-31 yes
|
|
attack.invalid FALSE /a/b FALSE 0 cookie-30 yes
|
|
attack.invalid FALSE /a/b FALSE 0 cookie-29 yes
|
|
attack.invalid FALSE /a/b FALSE 0 cookie-28 yes
|
|
attack.invalid FALSE /a/b FALSE 0 cookie-27 yes
|
|
attack.invalid FALSE /a/b FALSE 0 cookie-26 yes
|
|
attack.invalid FALSE /a/b FALSE 0 cookie-25 yes
|
|
attack.invalid FALSE /a/b FALSE 0 cookie-24 yes
|
|
attack.invalid FALSE /a/b FALSE 0 cookie-23 yes
|
|
attack.invalid FALSE /a/b FALSE 0 cookie-22 yes
|
|
attack.invalid FALSE /a/b FALSE 0 cookie-21 yes
|
|
attack.invalid FALSE /a/b FALSE 0 cookie-20 yes
|
|
attack.invalid FALSE /a/b FALSE 0 cookie-19 yes
|
|
attack.invalid FALSE /a/b FALSE 0 cookie-18 yes
|
|
attack.invalid FALSE /a/b FALSE 0 cookie-17 yes
|
|
attack.invalid FALSE /a/b FALSE 0 cookie-16 yes
|
|
attack.invalid FALSE /a/b FALSE 0 cookie-15 yes
|
|
attack.invalid FALSE /a/b FALSE 0 cookie-14 yes
|
|
attack.invalid FALSE /a/b FALSE 0 cookie-13 yes
|
|
attack.invalid FALSE /a/b FALSE 0 cookie-12 yes
|
|
attack.invalid FALSE /a/b FALSE 0 cookie-11 yes
|
|
attack.invalid FALSE /a/b FALSE 0 cookie-10 yes
|
|
attack.invalid FALSE /a/b FALSE 0 cookie-9 yes
|
|
attack.invalid FALSE /a/b FALSE 0 cookie-8 yes
|
|
attack.invalid FALSE /a/b FALSE 0 cookie-7 yes
|
|
attack.invalid FALSE /a/b FALSE 0 cookie-6 yes
|
|
attack.invalid FALSE /a/b FALSE 0 cookie-5 yes
|
|
attack.invalid FALSE /a/b FALSE 0 cookie-4 yes
|
|
attack.invalid FALSE /a/b FALSE 0 cookie-3 yes
|
|
attack.invalid FALSE /a/b FALSE 0 cookie-2 yes
|
|
attack.invalid FALSE /a/b FALSE 0 cookie-1 yes
|
|
</file>
|
|
</verify>
|
|
</testcase>
|