-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Closed
Labels
compiler/runtimeIssues related to the Go compiler and/or runtime.Issues related to the Go compiler and/or runtime.
Description
Go version
go version go1.25.1 darwin/arm64
Output of go env
in your module/workspace:
AR='ar'
CC='clang'
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_ENABLED='1'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
CXX='clang++'
GCCGO='gccgo'
GO111MODULE=''
GOARCH='arm64'
GOARM64='v8.0'
GOAUTH='netrc'
GOBIN=''
GOCACHE='~/Library/Caches/go-build'
GOCACHEPROG=''
GODEBUG=''
GOENV='~/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFIPS140='off'
GOFLAGS=''
GOGCCFLAGS='-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/44/kgj_lzr94flftw6mqr8b84200000gn/T/go-build2035845761=/tmp/go-build -gno-record-gcc-switches -fno-common'
GOHOSTARCH='arm64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMOD='/dev/null'
GOMODCACHE='~/go/pkg/mod'
GOOS='darwin'
GOPATH='~/go'
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/usr/local/go'
GOSUMDB='sum.golang.org'
GOTELEMETRY='local'
GOTELEMETRYDIR='~/Library/Application Support/go/telemetry'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/usr/local/go/pkg/tool/darwin_arm64'
GOVCS=''
GOVERSION='go1.25.1'
GOWORK=''
PKG_CONFIG='pkg-config'
What did you do?
I tried to build a project that had some package that required cgo. However because of the new MacOS 26 it tried to find the platform SDK at /Library/Developer/CommandLineTools/SDKs/MacOSX26.sdk
which doesn't exist.
Updating using either Xcode
or softwareupdate
doesn't result in SDK version 26 being downloaded.
What did you see happen?
The following error:
runtime/cgo
# runtime/cgo
clang: error: no such sysroot directory: '/Library/Developer/CommandLineTools/SDKs/MacOSX26.sdk' [-Werror,-Wmissing-sysroot]
What did you expect to see?
I expect cgo to find the correct runtime (which I believe is still MacOSX15.sdk
for this version of MacOS.)
As a workaround you can run the following to create symlink to SDK version 15.
sudo ln -s /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk /Library/Developer/CommandLineTools/SDKs/MacOSX26.sdk
Metadata
Metadata
Assignees
Labels
compiler/runtimeIssues related to the Go compiler and/or runtime.Issues related to the Go compiler and/or runtime.