Open
ci: add zlib1g-dev to upstream-sync CI dependencies#71
Conversation
- Add stdin_behavior = .Close to curlStream and curlStreamAnthropic to fix blocking - Add auto-creation of temp directory if it doesn't exist on Windows - Ensures data is written to temp file before curl runs (--data-binary @file)
- Add platform-specific install directories (install-macos-arm64, etc.) - Implement auto-detection of pre-built libcurl in vendor/curl/install-* - Build libcurl from source using autotools if not pre-built - Fix missing setNetBackend/getNetBackend in http_util.zig - vendor/curl: add curl-8.12.1 source with pre-built static library Now 'zig build' automatically handles libcurl without manual setup.
In Zig 0.15, openDir requires explicit .iterate = true option to allow directory iteration. Without this, calling iter.next() causes EBADF error in lseek_SET, leading to unreachable panic.
- Add isWindowsTarget() and ensureLibcurlBuiltWindows() to skip libcurl source build on Windows - Modify build() to use dynamic linking on Windows instead of static linking - Fix isLibcurlBuilt() error handling bug - Fix macOS build by adding --disable-ldap --disable-ldaps --without-libpsl --with-secure-transport to configure options
- Use --with-openssl instead of --with-secure-transport on Linux - Link ssl and crypto libraries on Linux instead of macOS frameworks - Fixes TLS not detected error on Linux systems
Install libssl-dev before building on Linux to support OpenSSL-based TLS in libcurl. This fixes the 'TLS not detected' configure error.
When cross-compiling from macOS to Linux musl target, the build system was incorrectly using builtin.os.tag (host OS) instead of target.result.os_tag (target OS) to determine which TLS libraries to link. This caused the build to fail with: error: unable to find dynamic system library 'z' error: unable to find dynamic system library 'ssl' error: unable to find dynamic system library 'crypto' Fixed by changing the link logic in build.zig to use target.result.os_tag for all three linking locations (exe, lib_tests, exe_tests).
This commit addresses two issues when cross-compiling from macOS/Linux to musl-based Linux targets: 1. build.zig: Use target OS tag instead of host OS tag for TLS library linking. This fixes the incorrect framework/library selection when cross-compiling. 2. build.zig: Only add vendor library path for non-musl targets. For musl targets, we skip adding the vendor library path to prevent Zig from looking for .so files that don't exist for the musl target. 3. .github/workflows/release.yml: Install zlib1g-dev in addition to libssl-dev, and delete pre-existing vendor curl installs for musl targets to force rebuild from source.
Conflicts resolved in release.yml, http_util.zig, gemini.zig, and sse.zig by accepting upstream-sync's native libcurl implementation over the subprocess-based curl approach that was in main.
Copilot
AI
changed the title
[WIP] Fix main branch by restoring from upstream-sync
Revert erroneous PR #69 merge on main and properly merge upstream-sync
Mar 17, 2026
xnetsc
marked this pull request as ready for review
March 17, 2026 05:18
…dev CI fix from PR #69 Co-authored-by: mccoysc <18025276+mccoysc@users.noreply.github.com>
Copilot
AI
changed the title
Revert erroneous PR #69 merge on main and properly merge upstream-sync
ci: add zlib1g-dev to upstream-sync CI dependencies
Mar 17, 2026
xnetsc
approved these changes
Mar 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR #69 was erroneously merged into
maininstead ofupstream-sync. Main has been reverted (c7904ec6). This PR carries forward the one applicable fix toupstream-sync.zlib1g-devto Linux CI deps — libcurl links against both OpenSSL and zlib, butci.ymlonly installedlibssl-devmain→upstream-syncbefore merge. The branch content diffs cleanly againstupstream-sync(1 file, 1 line) but cannot be force-pushed to rebase via automated tooling. The stalerevert-pr69-on-mainremote branch can be deleted.📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.