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/go: go test -i flag doesn't understand cgo packages #2936

Closed
cookieo9 opened this issue Feb 9, 2012 · 6 comments
Closed

cmd/go: go test -i flag doesn't understand cgo packages #2936

cookieo9 opened this issue Feb 9, 2012 · 6 comments
Milestone

Comments

@cookieo9
Copy link
Contributor

cookieo9 commented Feb 9, 2012

When trying to compile the dependencies of a package needed for testing it (go test -i),
the go tool chokes on the import "C" line.

NOTE: As a work-around, if the user creates an do-nothing package "C" in a
GOPATH or GOROOT directory, then the go tool will proceed to build the dependencies.

What steps will reproduce the problem?
1. Make a package / command that uses cgo
2. go test -i

What is the expected output?
No output to console, but $GOPATH/pkg/ should have dependent packages installed into it.

What do you see instead?
can't load package: C: package could not be found locally

Which compiler are you using (5g, 6g, 8g, gccgo)?
8g

Which operating system are you using?
darwin/x86 (Mac OS X 10.6.8)

Which revision are you using?  (hg identify)
b9ae3df7a5e7 tip

Please provide any additional information below.
Attached is a simple test-case command foo with a dependency on a foo/bar sub-package.

Attachments:

  1. foo.zip (794 bytes)
@robpike
Copy link
Contributor

robpike commented Feb 11, 2012

Comment 1:

Labels changed: added priority-go1, go1-must, removed priority-triage.

Owner changed to builder@golang.org.

Status changed to Accepted.

@rsc
Copy link
Contributor

rsc commented Feb 14, 2012

Comment 3:

This issue was closed by revision 9f33317.

Status changed to Fixed.

@minux
Copy link
Member

minux commented Feb 15, 2012

Comment 4:

I think the above fix doesn't consider the case where runtime/cgo itself is out-of-date.

@rsc
Copy link
Contributor

rsc commented Feb 15, 2012

Comment 5:

That may be true; want to send a CL?

@minux
Copy link
Member

minux commented Feb 15, 2012

Comment 6:

http://golang.org/cl/5674048/

@rsc
Copy link
Contributor

rsc commented Feb 15, 2012

Comment 7:

This issue was closed by revision 9c1f54c.

@rsc rsc added this to the Go1 milestone Apr 10, 2015
@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
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

5 participants