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: sort _cgo_gotypes.go output #3707

Closed
sethwklein opened this issue Jun 6, 2012 · 6 comments
Closed

cmd/go: sort _cgo_gotypes.go output #3707

sethwklein opened this issue Jun 6, 2012 · 6 comments

Comments

@sethwklein
Copy link

What steps will reproduce the problem?

Use "go build" to repeatedly try to build http://play.golang.org/p/MZRbtdYCyh

This requires ncurses.

To see the problem, you MUST run it MULTIPLE times.


What is the expected output?

It either always build or always fails.


What do you see instead?

Sometimes it builds. Sometimes it fails with error "invalid receiver type
*Window".


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

6g and 8g.


Which operating system are you using?

Linux (Gentoo) 32 bit and 64.


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

go version go1
and
go version weekly.2012-03-27 +b86e13a16723


Please provide any additional information below.

Reports from IRC include:

zeebo was unable to reproduce on OS X.

mkb218 reported that sometimes it succeeded without creating the .a.


I (the reporter of this issue) noticed differences in the order of items in
/tmp/go-build*/command-line-arguments/_obj/_cgo_gotypes.go between builds that worked
and those that failed.
@rsc
Copy link
Contributor

rsc commented Jun 6, 2012

Comment 1:

We should make go or cgo list the files in sorted order. At least then
it will be deterministic.

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

Status changed to Accepted.

@rsc
Copy link
Contributor

rsc commented Jun 6, 2012

Comment 2:

Labels changed: added priority-go1.0.2, removed priority-go1.0.1.

@rsc
Copy link
Contributor

rsc commented Jun 6, 2012

Comment 3:

issue #3709 has the compiler bug.

@rsc
Copy link
Contributor

rsc commented Jun 7, 2012

Comment 4:

Labels changed: added priority-soon, go1.0.2, removed priority-go1.0.2.

@rsc
Copy link
Contributor

rsc commented Jun 7, 2012

Comment 5:

Ah, it's the file text that needs sorting.

@rsc
Copy link
Contributor

rsc commented Jun 7, 2012

Comment 6:

This issue was closed by revision f51390b.

Status changed to Fixed.

@rsc rsc added this to the Go1.0.2 milestone Apr 14, 2015
@rsc rsc removed the go1.0.2 label Apr 14, 2015
rsc added a commit that referenced this issue May 11, 2015
««« backport 319a9f3330d0
cmd/cgo: make Go code order deterministic

The type declarations were being generated using
a range over a map, which meant that successive
runs produced different orders. This will make sure
successive runs produce the same files.

Fixes #3707.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/6300062

»»»
@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

3 participants