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)
431 lines
10 KiB
Makefile
Vendored
Generated
431 lines
10 KiB
Makefile
Vendored
Generated
#***************************************************************************
|
|
# _ _ ____ _
|
|
# Project ___| | | | _ \| |
|
|
# / __| | | | |_) | |
|
|
# | (__| |_| | _ <| |___
|
|
# \___|\___/|_| \_\_____|
|
|
#
|
|
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
|
#
|
|
# This software is licensed as described in the file COPYING, which
|
|
# you should have received as part of this distribution. The terms
|
|
# are also available at https://curl.se/docs/copyright.html.
|
|
#
|
|
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
|
# copies of the Software, and permit persons to whom the Software is
|
|
# furnished to do so, under the terms of the COPYING file.
|
|
#
|
|
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
# KIND, either express or implied.
|
|
#
|
|
# SPDX-License-Identifier: curl
|
|
#
|
|
###########################################################################
|
|
# Shared between CMakeLists.txt and Makefile.am
|
|
|
|
LIB_CURLX_CFILES = \
|
|
curlx/base64.c \
|
|
curlx/basename.c \
|
|
curlx/dynbuf.c \
|
|
curlx/fopen.c \
|
|
curlx/inet_ntop.c \
|
|
curlx/inet_pton.c \
|
|
curlx/multibyte.c \
|
|
curlx/nonblock.c \
|
|
curlx/snprintf.c \
|
|
curlx/strcopy.c \
|
|
curlx/strdup.c \
|
|
curlx/strerr.c \
|
|
curlx/strparse.c \
|
|
curlx/timediff.c \
|
|
curlx/timeval.c \
|
|
curlx/version_win32.c \
|
|
curlx/wait.c \
|
|
curlx/warnless.c \
|
|
curlx/winapi.c
|
|
|
|
LIB_CURLX_HFILES = \
|
|
curlx/base64.h \
|
|
curlx/basename.h \
|
|
curlx/dynbuf.h \
|
|
curlx/fopen.h \
|
|
curlx/inet_ntop.h \
|
|
curlx/inet_pton.h \
|
|
curlx/multibyte.h \
|
|
curlx/nonblock.h \
|
|
curlx/snprintf.h \
|
|
curlx/strcopy.h \
|
|
curlx/strdup.h \
|
|
curlx/strerr.h \
|
|
curlx/strparse.h \
|
|
curlx/timediff.h \
|
|
curlx/timeval.h \
|
|
curlx/version_win32.h \
|
|
curlx/wait.h \
|
|
curlx/warnless.h \
|
|
curlx/winapi.h
|
|
|
|
LIB_VAUTH_CFILES = \
|
|
vauth/cleartext.c \
|
|
vauth/cram.c \
|
|
vauth/digest.c \
|
|
vauth/digest_sspi.c \
|
|
vauth/gsasl.c \
|
|
vauth/krb5_gssapi.c \
|
|
vauth/krb5_sspi.c \
|
|
vauth/ntlm.c \
|
|
vauth/ntlm_sspi.c \
|
|
vauth/oauth2.c \
|
|
vauth/spnego_gssapi.c \
|
|
vauth/spnego_sspi.c \
|
|
vauth/vauth.c
|
|
|
|
LIB_VAUTH_HFILES = \
|
|
vauth/digest.h \
|
|
vauth/vauth.h
|
|
|
|
LIB_VTLS_CFILES = \
|
|
vtls/apple.c \
|
|
vtls/cipher_suite.c \
|
|
vtls/gtls.c \
|
|
vtls/hostcheck.c \
|
|
vtls/keylog.c \
|
|
vtls/mbedtls.c \
|
|
vtls/openssl.c \
|
|
vtls/rustls.c \
|
|
vtls/schannel.c \
|
|
vtls/schannel_verify.c \
|
|
vtls/vtls.c \
|
|
vtls/vtls_config.c \
|
|
vtls/vtls_scache.c \
|
|
vtls/vtls_spack.c \
|
|
vtls/wolfssl.c \
|
|
vtls/x509asn1.c
|
|
|
|
LIB_VTLS_HFILES = \
|
|
vtls/apple.h \
|
|
vtls/cipher_suite.h \
|
|
vtls/gtls.h \
|
|
vtls/hostcheck.h \
|
|
vtls/keylog.h \
|
|
vtls/mbedtls.h \
|
|
vtls/openssl.h \
|
|
vtls/rustls.h \
|
|
vtls/schannel.h \
|
|
vtls/schannel_int.h \
|
|
vtls/vtls.h \
|
|
vtls/vtls_config.h \
|
|
vtls/vtls_int.h \
|
|
vtls/vtls_scache.h \
|
|
vtls/vtls_spack.h \
|
|
vtls/wolfssl.h \
|
|
vtls/x509asn1.h
|
|
|
|
LIB_VQUIC_CFILES = \
|
|
vquic/capsule.c \
|
|
vquic/cf-capsule.c \
|
|
vquic/cf-ngtcp2.c \
|
|
vquic/cf-ngtcp2-cmn.c \
|
|
vquic/cf-ngtcp2-proxy.c \
|
|
vquic/cf-quiche.c \
|
|
vquic/vquic.c \
|
|
vquic/vquic-tls.c
|
|
|
|
LIB_VQUIC_HFILES = \
|
|
vquic/capsule.h \
|
|
vquic/cf-capsule.h \
|
|
vquic/cf-ngtcp2.h \
|
|
vquic/cf-ngtcp2-cmn.h \
|
|
vquic/cf-ngtcp2-proxy.h \
|
|
vquic/cf-quiche.h \
|
|
vquic/vquic.h \
|
|
vquic/vquic_int.h \
|
|
vquic/vquic-tls.h
|
|
|
|
LIB_VSSH_CFILES = \
|
|
vssh/libssh.c \
|
|
vssh/libssh2.c \
|
|
vssh/vssh.c
|
|
|
|
LIB_VSSH_HFILES = \
|
|
vssh/vssh.h \
|
|
vssh/ssh.h
|
|
|
|
LIB_CFILES = \
|
|
altsvc.c \
|
|
amigaos.c \
|
|
asyn-ares.c \
|
|
asyn-base.c \
|
|
asyn-thrdd.c \
|
|
bufq.c \
|
|
bufref.c \
|
|
cf-dns.c \
|
|
cf-h1-proxy.c \
|
|
cf-h2-proxy.c \
|
|
cf-haproxy.c \
|
|
cf-https-connect.c \
|
|
cf-ip-happy.c \
|
|
cf-recvbuf.c \
|
|
cf-setup.c \
|
|
cf-socket.c \
|
|
cfilters.c \
|
|
conncache.c \
|
|
connect.c \
|
|
content_encoding.c \
|
|
cookie.c \
|
|
creds.c \
|
|
cshutdn.c \
|
|
curl_addrinfo.c \
|
|
curl_endian.c \
|
|
curl_fnmatch.c \
|
|
curl_fopen.c \
|
|
curl_get_line.c \
|
|
curl_gethostname.c \
|
|
curl_gssapi.c \
|
|
curl_memrchr.c \
|
|
curl_ntlm_core.c \
|
|
curl_range.c \
|
|
curl_sasl.c \
|
|
curl_sha512_256.c \
|
|
curl_share.c \
|
|
curl_sspi.c \
|
|
curl_threads.c \
|
|
curl_trc.c \
|
|
cw-out.c \
|
|
cw-pause.c \
|
|
dict.c \
|
|
dnscache.c \
|
|
doh.c \
|
|
dynhds.c \
|
|
easy.c \
|
|
easygetopt.c \
|
|
easyoptions.c \
|
|
escape.c \
|
|
fake_addrinfo.c \
|
|
file.c \
|
|
fileinfo.c \
|
|
formdata.c \
|
|
ftp.c \
|
|
ftplistparser.c \
|
|
getenv.c \
|
|
getinfo.c \
|
|
gopher.c \
|
|
hash.c \
|
|
headers.c \
|
|
hmac.c \
|
|
hostip.c \
|
|
hostip4.c \
|
|
hostip6.c \
|
|
hsts.c \
|
|
http.c \
|
|
http1.c \
|
|
http2.c \
|
|
http_aws_sigv4.c \
|
|
http_chunks.c \
|
|
http_digest.c \
|
|
http_negotiate.c \
|
|
http_ntlm.c \
|
|
http_proxy.c \
|
|
httpsrr.c \
|
|
idn.c \
|
|
if2ip.c \
|
|
imap.c \
|
|
ldap.c \
|
|
llist.c \
|
|
macos.c \
|
|
md4.c \
|
|
md5.c \
|
|
memdebug.c \
|
|
mime.c \
|
|
mprintf.c \
|
|
mqtt.c \
|
|
multi.c \
|
|
multi_ev.c \
|
|
multi_ntfy.c \
|
|
netrc.c \
|
|
openldap.c \
|
|
parsedate.c \
|
|
peer.c \
|
|
pingpong.c \
|
|
pop3.c \
|
|
progress.c \
|
|
protocol.c \
|
|
proxy.c \
|
|
psl.c \
|
|
rand.c \
|
|
ratelimit.c \
|
|
request.c \
|
|
rtsp.c \
|
|
select.c \
|
|
sendf.c \
|
|
setopt.c \
|
|
sha256.c \
|
|
slist.c \
|
|
smb.c \
|
|
smtp.c \
|
|
socketpair.c \
|
|
socks.c \
|
|
socks_gssapi.c \
|
|
socks_sspi.c \
|
|
splay.c \
|
|
strcase.c \
|
|
strequal.c \
|
|
strerror.c \
|
|
system_win32.c \
|
|
telnet.c \
|
|
tftp.c \
|
|
thrdpool.c \
|
|
thrdqueue.c \
|
|
transfer.c \
|
|
uint-bset.c \
|
|
uint-hash.c \
|
|
uint-spbset.c \
|
|
uint-table.c \
|
|
url.c \
|
|
urlapi.c \
|
|
version.c \
|
|
ws.c
|
|
|
|
LIB_HFILES = \
|
|
altsvc.h \
|
|
amigaos.h \
|
|
arpa_telnet.h \
|
|
asyn.h \
|
|
bufq.h \
|
|
bufref.h \
|
|
cf-dns.h \
|
|
cf-h1-proxy.h \
|
|
cf-h2-proxy.h \
|
|
cf-haproxy.h \
|
|
cf-https-connect.h \
|
|
cf-ip-happy.h \
|
|
cf-recvbuf.h \
|
|
cf-setup.h \
|
|
cf-socket.h \
|
|
cfilters.h \
|
|
conncache.h \
|
|
cshutdn.h \
|
|
connect.h \
|
|
content_encoding.h \
|
|
cookie.h \
|
|
creds.h \
|
|
curl_addrinfo.h \
|
|
curl_ctype.h \
|
|
curl_endian.h \
|
|
curl_fnmatch.h \
|
|
curl_fopen.h \
|
|
curl_get_line.h \
|
|
curl_gethostname.h \
|
|
curl_gssapi.h \
|
|
curl_hmac.h \
|
|
curl_ldap.h \
|
|
curl_md4.h \
|
|
curl_md5.h \
|
|
curl_memrchr.h \
|
|
curl_ntlm_core.h \
|
|
curl_printf.h \
|
|
curl_range.h \
|
|
curl_sasl.h \
|
|
curl_setup.h \
|
|
curl_sha256.h \
|
|
curl_sha512_256.h \
|
|
curl_share.h \
|
|
curl_sspi.h \
|
|
curl_threads.h \
|
|
curl_trc.h \
|
|
cw-out.h \
|
|
cw-pause.h \
|
|
dict.h \
|
|
dnscache.h \
|
|
doh.h \
|
|
dynhds.h \
|
|
easy_lock.h \
|
|
easyif.h \
|
|
easyoptions.h \
|
|
escape.h \
|
|
fake_addrinfo.h \
|
|
file.h \
|
|
fileinfo.h \
|
|
formdata.h \
|
|
ftp.h \
|
|
ftp-int.h \
|
|
ftplistparser.h \
|
|
functypes.h \
|
|
getinfo.h \
|
|
gopher.h \
|
|
hash.h \
|
|
headers.h \
|
|
hostip.h \
|
|
hsts.h \
|
|
http.h \
|
|
http1.h \
|
|
http2.h \
|
|
http_aws_sigv4.h \
|
|
http_chunks.h \
|
|
http_digest.h \
|
|
http_negotiate.h \
|
|
http_ntlm.h \
|
|
http_proxy.h \
|
|
httpsrr.h \
|
|
idn.h \
|
|
if2ip.h \
|
|
imap.h \
|
|
llist.h \
|
|
macos.h \
|
|
mime.h \
|
|
mqtt.h \
|
|
multihandle.h \
|
|
multi_ev.h \
|
|
multi_ntfy.h \
|
|
multiif.h \
|
|
netrc.h \
|
|
parsedate.h \
|
|
peer.h \
|
|
pingpong.h \
|
|
pop3.h \
|
|
progress.h \
|
|
protocol.h \
|
|
proxy.h \
|
|
psl.h \
|
|
rand.h \
|
|
ratelimit.h \
|
|
request.h \
|
|
rtsp.h \
|
|
select.h \
|
|
sendf.h \
|
|
setopt.h \
|
|
setup-os400.h \
|
|
setup-vms.h \
|
|
setup-win32.h \
|
|
sigpipe.h \
|
|
slist.h \
|
|
smb.h \
|
|
smtp.h \
|
|
sockaddr.h \
|
|
socketpair.h \
|
|
socks.h \
|
|
splay.h \
|
|
strcase.h \
|
|
strerror.h \
|
|
system_win32.h \
|
|
telnet.h \
|
|
tftp.h \
|
|
thrdpool.h \
|
|
thrdqueue.h \
|
|
transfer.h \
|
|
uint-bset.h \
|
|
uint-hash.h \
|
|
uint-spbset.h \
|
|
uint-table.h \
|
|
url.h \
|
|
urlapi-int.h \
|
|
urldata.h \
|
|
ws.h
|
|
|
|
LIB_RCFILES = libcurl.rc
|
|
|
|
CSOURCES = $(LIB_CFILES) $(LIB_VAUTH_CFILES) $(LIB_VTLS_CFILES) \
|
|
$(LIB_VQUIC_CFILES) $(LIB_VSSH_CFILES) $(LIB_CURLX_CFILES)
|
|
HHEADERS = $(LIB_HFILES) $(LIB_VAUTH_HFILES) $(LIB_VTLS_HFILES) \
|
|
$(LIB_VQUIC_HFILES) $(LIB_VSSH_HFILES) $(LIB_CURLX_HFILES)
|