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

cmd/objdump: objdump_test.go:^TestDisasmExtld requires c compiler toolchain #11969

Closed
xigh opened this issue Jul 31, 2015 · 1 comment
Closed
Milestone

Comments

@xigh
Copy link

xigh commented Jul 31, 2015

Hello,

I tried to compile go1.5beta3 on MacOS X 10.6 with preinstalled 1.4.2 version with the following command line:

CGO_ENABLED=0 GOROOT_BOOTSTRAP=/usr/local/go ./all.bash

I don't have gcc/Xcode installed. The test failed with:

ok cmd/nm 3.414s
--- FAIL: TestDisasmExtld (4.82s)
objdump_test.go:70: go build fmthello.go: exit status 2
# command-line-arguments
warning: unable to find runtime/cgo.a
/Users/xigh/Sources/gget/go/pkg/tool/darwin_amd64/link: running gcc failed: exec: "gcc": executable file not found in $PATH

FAIL
FAIL cmd/objdump 8.900s

I fixed this with by changing to:

func cgoDisabled() bool {
return os.Getenv("CGO_ENABLED") == "0"
}

func TestDisasmExtld(t *testing.T) {
if cgoDisabled() {
t.Skipf("skipping: cgo disabled")
}

@ianlancetaylor ianlancetaylor changed the title src/cmd/objdump/objdump_test.go:^TestDisasmExtld requires c compiler toolchain cmd/objdump: objdump_test.go:^TestDisasmExtld requires c compiler toolchain Jul 31, 2015
@ianlancetaylor ianlancetaylor added this to the Go1.5Maybe milestone Jul 31, 2015
@ianlancetaylor ianlancetaylor self-assigned this Jul 31, 2015
@gopherbot
Copy link

CL https://golang.org/cl/13005 mentions this issue.

@mikioh mikioh modified the milestones: Go1.5, Go1.5Maybe Jul 31, 2015
@golang golang locked and limited conversation to collaborators Aug 5, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants