Repository navigation
Conversation
Go does not rebuild a cgo package when the output of pkg-config changes. Homebrew's flags for apache-arrow contain a versioned Cellar path, so a build cache restored from before a formula update links against a directory that no longer exists and every cgo binary fails with "ld: library 'arrow' not found".
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.
Rationale for this change
The "ARM64 macOS 15 Go 1.26 - CGO" job has been failing on unrelated pull requests with:
Homebrew now installs
apache-arrowas revision26.0.1_1, so the library lives underCellar/apache-arrow/26.0.1_1. The job restores a Go build cache that was created when the path was26.0.1. Go does not rebuild a cgo package when the output ofpkg-configchanges, so the cached package keeps the old-Lflag and the link fails. The cache key only depends on the Go version andgo.sum, so it does not change when the formula does.Runners on the older image still install
26.0.1, which is why the same job passes on some runs and fails on others.What changes are included in this PR?
The macOS CGO jobs run
go clean -cacheafter installing Arrow, so cgo packages are always built against the installed library. The module download cache is still restored.Are these changes tested?
I reproduced the behaviour locally with a small cgo package and a
pkg-configwrapper: after changing the-Lpath it returns and removing the old directory,go buildfails with the same linker error, and succeeds aftergo clean -cache. The workflow change itself is exercised by this PR's CI.Are there any user-facing changes?
No.