Skip to content

ci: add zlib1g-dev to upstream-sync CI dependencies - #71

Open
xnetsc with Copilot wants to merge 12 commits into
mainfrom
copilot/fix-main-branch-conflicts
Open

ci: add zlib1g-dev to upstream-sync CI dependencies#71
xnetsc with Copilot wants to merge 12 commits into
mainfrom
copilot/fix-main-branch-conflicts

Conversation

Copilot AI commented Mar 17, 2026

Copy link
Copy Markdown
Contributor

PR #69 was erroneously merged into main instead of upstream-sync. Main has been reverted (c7904ec6). This PR carries forward the one applicable fix to upstream-sync.

  • Add zlib1g-dev to Linux CI deps — libcurl links against both OpenSSL and zlib, but ci.yml only installed libssl-dev
-          sudo apt-get install -y libssl-dev
+          sudo apt-get install -y libssl-dev zlib1g-dev

⚠️ Base branch must be changed from mainupstream-sync before merge. The branch content diffs cleanly against upstream-sync (1 file, 1 line) but cannot be force-pushed to rebase via automated tooling. The stale revert-pr69-on-main remote branch can be deleted.


📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.


Open with Devin

xnetsc added 8 commits March 15, 2026 16:10
- 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.
Copilot AI self-assigned this Mar 17, 2026
Copilot AI added 2 commits March 17, 2026 04:51
…-ci-error"

This reverts commit bfd28a3, reversing
changes made to 2966695.
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
Copilot AI requested a review from xnetsc March 17, 2026 04:54
@xnetsc
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants