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/cover: 'GoCover_0 redeclared in this block' error with SWIG example #9212

Closed
michael-schaller opened this issue Dec 5, 2014 · 3 comments
Milestone

Comments

@michael-schaller
Copy link
Contributor

What does 'go version' print?
Tested under these versions:
go version go1.3.3 linux/amd64
go version go1.4rc2 linux/amd64


What steps reproduce the problem?
Run 'go test -coverprofile=coverage.out' for this example:
https://gist.github.com/michael-schaller/94a2ee39bde248c83742


What happened?
$ go test -coverprofile=coverage.out
# example
./example_test.go:8: undefined: NewExample
./example_test.go:9: undefined: DeleteExample
/tmp/go-build051079047/example/_test/_obj_test/example.go:12: GoCover_0 redeclared in
this block
    previous declaration at $WORK/example/_test/_obj_test/example.go:12
FAIL    example [build failed]


What should have happened instead?
Clean build as with 'go test -v' + coverage analysis.
Here is the 'go test -v' output:
$ go test -v
=== RUN TestExample
--- PASS: TestExample (0.00s)
PASS
ok      example 0.002s
@michael-schaller
Copy link
Contributor Author

Comment 1:

SWIG version: 3.0.2

@ianlancetaylor
Copy link
Contributor

Comment 2:

Labels changed: added repo-tools, release-none.

@bradfitz bradfitz removed the new label Dec 18, 2014
@mikioh mikioh changed the title go.tools/cmd/cover: 'GoCover_0 redeclared in this block' error with SWIG example cmd/cover: 'GoCover_0 redeclared in this block' error with SWIG example Jan 4, 2015
@rsc rsc added this to the Unplanned milestone Apr 10, 2015
@rsc rsc removed the release-none label Apr 10, 2015
@rsc rsc changed the title cmd/cover: 'GoCover_0 redeclared in this block' error with SWIG example x/tools/cmd/cover: 'GoCover_0 redeclared in this block' error with SWIG example Apr 14, 2015
@rsc rsc modified the milestones: Unreleased, Unplanned Apr 14, 2015
@rsc rsc removed the repo-tools label Apr 14, 2015
@rsc rsc modified the milestones: Unreleased, Go1.10 Nov 10, 2017
@rsc rsc changed the title x/tools/cmd/cover: 'GoCover_0 redeclared in this block' error with SWIG example cmd/cover: 'GoCover_0 redeclared in this block' error with SWIG example Nov 10, 2017
@gopherbot
Copy link

Change https://golang.org/cl/77155 mentions this issue: cmd/go: run cover before cgo

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