Repository navigation
ci(macos): unlink zstd during the deps build instead of uninstalling it - #1237
Open
alandebortolo wants to merge 1 commit into
Open
alandebortolo wants to merge 1 commit into
alandebortolo wants to merge 1 commit into
Conversation
brew uninstall --ignore-dependencies zstd deletes opt/zstd, but Homebrew's own curl loads libzstd from there, so the final 'brew install zstd' cannot download anything (Library not loaded: libzstd.1.dylib). brew unlink hides the headers, libs, pkg-config and CMake files from the deps build the same way, keeps opt/zstd, and brew link puts them back.
Author
|
CI proof on my fork, build-deps-only run without a deps cache, branch head e8be5ac:
Limits: macOS slicer build in that run was still going when I wrote this; this PR only touches the deps step. |
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.
What
In
build_deps.yml, the macOS step hides Homebrew's zstd from the deps build withbrew unlink zstdand restores it withbrew link zstd, instead ofbrew uninstall --ignore-dependencies zstd+brew install zstd.Why
Homebrew's own curl loads
/opt/homebrew/opt/zstd/lib/libzstd.1.dylib.brew uninstalldeletesopt/zstd, so the finalbrew install zstdcannot download anything and the job fails withLibrary not loaded: ... libzstd.1.dylib. This hits every macOS run that has no deps cache (forks,build-deps-only, cache misses); we saw it on the macOS rerun of #1235.brew unlinkremoves the same 22 symlinks the build could pick up (include/zstd.h,zdict.h,zstd_errors.h,lib/libzstd*,lib/pkgconfig/libzstd.pc,lib/cmake/zstd, the binaries) but keepsopt/zstd, so brewed curl keeps working andbrew linkputs everything back.Tested
On a Mac with Homebrew zstd 1.5.7_1 and brewed curl 8.23.0:
brew unlink zstd: 22 symlinks removed;include/zstd.handlib/pkgconfig/libzstd.pcgone;opt/zstdstill there.curl --versionstill loads (reportszstd/1.5.7), andbrew fetch --force zstdwithHOMEBREW_FORCE_BREWED_CURL=1downloads the bottle (rc 0).brew link zstd: 22 symlinks back.Limits
build-deps-only). I will post the result here.opt/zstdby itself; nothing in the deps CMake that I know of searches there.