Fix hyperkit driver build with Go 1.25 by setting minimum macOS SDK version #21941
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.
Go 1.25 introduced
SecTrustCopyCertificateChainincrypto/x509/internal/macos, which requires macOS 10.15+. The xcgo cross-compilation image uses an older SDK lacking this symbol, causing:Set
CGO_LDFLAGS="-mmacosx-version-min=10.15"in the hyperkit driver build to target macOS 10.15 SDK, ensuring the linker only uses compatible symbols.Changes:
out/docker-machine-driver-hyperkitMakefile target to setCGO_LDFLAGSfor both Docker and local buildsOriginal prompt
This section details on the original issue you should resolve
<issue_title>bumping golang version to v1.25.0 breaks hyperkit driver build with xcgo</issue_title>
<issue_description>when I tried to bump the go version from 1.24 to 1.25 minikube's go mod (this PR #21934)
the hyperkit driver build. failed (which uses a docker image xcgo)
here is the failed build. log
why hyperkit driver build is failing only on go 1.25.0?
Works for go mod 1.24 (on master branch)
Fails for go mod to 1.25