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/cgo: inconsistent definitions for C.SOME_ENUM #4054

Closed
alberts opened this issue Sep 7, 2012 · 7 comments
Closed

cmd/cgo: inconsistent definitions for C.SOME_ENUM #4054

alberts opened this issue Sep 7, 2012 · 7 comments
Milestone

Comments

@alberts
Copy link
Contributor

alberts commented Sep 7, 2012

What steps will reproduce the problem?

Note that you have to run the build repeatedly to be guaranteed to see the problem.

$ go build .
# foo
inconsistent definitions for C.A
$ go build .
# foo
inconsistent definitions for C.A
$ go build .
# foo
inconsistent definitions for C.A
$ go build .
# foo
inconsistent definitions for C.A
$ go build .
# foo
inconsistent definitions for C.A
$ go build .
# foo
inconsistent definitions for C.A
$ go build .
$ go build .
$ go build .
# foo
inconsistent definitions for C.A

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

6g

Which operating system are you using?

linux

Which version are you using?  (run 'go version')

e4b20018f797

Please provide any additional information below.

gcc (GCC) 4.6.3 20120306 (Red Hat 4.6.3-2)

GNU ld version 2.21.53.0.1-6.fc16 20110716

Attachments:

  1. a.go (81 bytes)
  2. b.go (88 bytes)
  3. foo.h (91 bytes)
@rsc
Copy link
Contributor

rsc commented Sep 12, 2012

Comment 1:

Labels changed: added priority-later, removed priority-triage.

Status changed to Accepted.

@rsc
Copy link
Contributor

rsc commented Sep 12, 2012

Comment 2:

Labels changed: added go1.1.

@alberts
Copy link
Contributor Author

alberts commented Sep 13, 2012

Comment 3:

There's a CL for this already:
http://golang.org/cl/6501101/
It was working until recently, so you might want to check that you don't pick up the
breaking change for Go 1.0.3:
http://code.google.com/p/go/source/detail?r=41976e2fec9b17cc01cb94ea62ab3af18bfbcae6
workaround is to make one file with stuff like:
const (
A = C.A
B = C.B
)

@rsc
Copy link
Contributor

rsc commented Sep 13, 2012

Comment 4:

I have checked the go103 list (CL 6499087) and 41976e2fec9b is not on it.
Russ

@niemeyer
Copy link
Contributor

Comment 5:

Issue #4095 has been merged into this issue.

@4a6f656c
Copy link
Contributor

Comment 6:

Owner changed to @4a6f656c.

@4a6f656c
Copy link
Contributor

Comment 7:

This issue was closed by revision 9536480.

Status changed to Fixed.

@rsc rsc added this to the Go1.1 milestone Apr 14, 2015
@rsc rsc removed the go1.1 label Apr 14, 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