Skip to content

crypto/x509: recently updated Xcode command line tools results in error #31250

Description

@bravecorvus

What version of Go are you using (go version)?

$ go version
go version go1.12.1 darwin/amd64 (via homebrew)

Does this issue reproduce with the latest release?

yes

What operating system and processor architecture are you using (go env)?

macOS 10.14.4

go env Output
$ go env
```
GOARCH="amd64"
GOBIN="/Users/andrew/go/bin"
GOCACHE="/Users/andrew/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/andrew/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/Cellar/go/1.12.1/libexec"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.12.1/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="/usr/local/bin/gcc-8"
CXX="/usr/local/bin/g++-8"
CGO_ENABLED="1"
GOMOD="/Users/andrew/Desktop/testgo/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/var/folders/2c/dff53p2915j5qx4w2vh4y47c0000gn/T/go-build680417015=/tmp/go-build -gno-record-gcc-switches -fno-common"
```

What did you do?

Switched work laptops, updated to macOS 10.14.4, installed Xcode Command Line Tools via xcode-select --install

Running a simple Hello World print out program seems to work. But doing anything else (including go get package.com/package or go build), yields errors referencing root_cgo_darwin.go.

What did you expect to see?

Nothing in particular, but standard stuff.

What did you see instead?

# crypto/x509
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Security.framework/Headers/AuthSession.h:32,
                 from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Security.framework/Headers/Security.h:42,
                 from /usr/local/Cellar/go/1.12.1/libexec/src/crypto/x509/root_cgo_darwin.go:17:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Security.framework/Headers/Authorization.h:193:7: error: variably modified 'bytes' at file scope
  char bytes[kAuthorizationExternalFormLength];

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.WaitingForInfoIssue is not actionable because of missing required information, which needs to be provided.

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions