Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
bravecorvus opened this issue Apr 4, 2019 · 5 comments
Closed
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Milestone

Comments

@bravecorvus
Copy link

bravecorvus commented Apr 4, 2019

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];
@bravecorvus
Copy link
Author

bravecorvus commented Apr 4, 2019

img

@andybons andybons changed the title Recently updated Xcode command line tools and getting error. crypto/x509: recently updated Xcode command line tools results in error Apr 4, 2019
@andybons
Copy link
Member

andybons commented Apr 4, 2019

@gilgameshskytrooper can you provide Xcode and macOS versions? Thanks.

@andybons andybons added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. labels Apr 4, 2019
@andybons andybons added this to the Unplanned milestone Apr 4, 2019
@bravecorvus
Copy link
Author

bravecorvus commented Apr 4, 2019

macOS Version: 10.14.4
XCode Version: 10.2

Thank you

@andybons
Copy link
Member

andybons commented Apr 4, 2019

This is a dupe of #24437

@bravecorvus
Copy link
Author

Ahh. I see. ya, i did export CGO_ENABLED=0 and now everything works. Thanks

@golang golang locked and limited conversation to collaborators Apr 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

3 participants