Skip to content

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

Closed
@bravecorvus

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

bravecorvus

bravecorvus commented on Apr 4, 2019

@bravecorvus
Author

img

changed the title [-]Recently updated Xcode command line tools and getting error.[/-] [+]crypto/x509: recently updated Xcode command line tools results in error[/+] on Apr 4, 2019
andybons

andybons commented on Apr 4, 2019

@andybons
Member

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

added
NeedsInvestigationSomeone 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.
on Apr 4, 2019
added this to the Unplanned milestone on Apr 4, 2019
bravecorvus

bravecorvus commented on Apr 4, 2019

@bravecorvus
Author

macOS Version: 10.14.4
XCode Version: 10.2

Thank you

andybons

andybons commented on Apr 4, 2019

@andybons
Member

This is a dupe of #24437

bravecorvus

bravecorvus commented on Apr 4, 2019

@bravecorvus
Author

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

locked and limited conversation to collaborators on Apr 3, 2020
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

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @andybons@bravecorvus@gopherbot

        Issue actions

          crypto/x509: recently updated Xcode command line tools results in error · Issue #31250 · golang/go