Skip to content

Fix dyld libzstd error in distributed macOS binaries#102

Merged
jucasoliveira merged 1 commit into
masterfrom
claude/friendly-blackwell
Apr 16, 2026
Merged

Fix dyld libzstd error in distributed macOS binaries#102
jucasoliveira merged 1 commit into
masterfrom
claude/friendly-blackwell

Conversation

@jucasoliveira
Copy link
Copy Markdown
Contributor

@jucasoliveira jucasoliveira commented Apr 16, 2026

Summary

  • Users installing oitec on macOS without Homebrew's zstd hit a dyld: Library not loaded: libzstd.1.dylib error at runtime
  • Root cause: release builds dynamically linked against Homebrew's libzstd.1.dylib, creating a runtime dependency that isn't present on end-user machines
  • Fix: remove .dylib files before building on both macOS targets (aarch64 and x86_64), forcing the linker to use libzstd.a (static archive) instead

Changes

  • aarch64-apple-darwin: Added dedicated build step that removes libzstd*.dylib before build, sets LIBRARY_PATH and MACOSX_DEPLOYMENT_TARGET
  • x86_64-apple-darwin: Same .dylib removal; also removed explicit -lzstd linker flag (redundant with LIBRARY_PATH)

Test plan

  • Trigger a release build and verify otool -L on the resulting macOS binaries shows no reference to libzstd.1.dylib
  • Install the built binary on a machine without Homebrew zstd and confirm it launches without dyld errors

🤖 Generated with Claude Code

Users installing oitec on machines without Homebrew's zstd hit a dyld
error because the binary had a dynamic dependency on libzstd.1.dylib.
Fix by removing the .dylib files before building on both macOS targets,
forcing the linker to use the static archive (libzstd.a) instead.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@jucasoliveira jucasoliveira self-assigned this Apr 16, 2026
@jucasoliveira jucasoliveira added bug Something isn't working ai-generated labels Apr 16, 2026
@jucasoliveira jucasoliveira merged commit f5917d8 into master Apr 16, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-generated bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Oitec binary error on running unroll.

1 participant