Opened 5 years ago

Closed 5 years ago

#52227 closed update (fixed)

go: update to 1.7.1

Reported by: lbschenkel (Leonardo Brondani Schenkel) Owned by: ci42
Priority: Normal Milestone:
Component: ports Version: 2.3.4
Keywords: haspatch Cc:
Port: go


There is a new upstream version of Go available (1.7.1).

The attached Portfile patch uses the same version to self-bootstrap instead of Go 1.4. Bootstrapping using 1.4 is the official way used by upstream because they want to prevent the Go toolchain from using any new features introduced after 1.4, however that is less important for downstream users.

Self-bootstrapping Go 1.7 has the additional advantage of allowing Go to be buildable in macOS 10.12 (Sierra). This version introduced a change of gettimeofday(2) which broke Go, causing it not to build. This was fixed in Go 1.7 but it was not backported to an official release of 1.4 yet.

Self-bootstrapping was also the solution used by Homebrew to make Go buildable on Sierra.

Attachments (1)

Portfile-1.7.1.patch (773 bytes) - added by lbschenkel (Leonardo Brondani Schenkel) 5 years ago.
Upgrade to 1.7.1

Download all attachments as: .zip

Change History (6)

comment:1 Changed 5 years ago by lbschenkel (Leonardo Brondani Schenkel)

I noticed I made a mistake; it only worked on my environment because I previously had go 1.7 installed (from before the upgrade to Sierra). My Portfile does not work in a clean environment. I will work on a solution and update the patch afterwards.

Changed 5 years ago by lbschenkel (Leonardo Brondani Schenkel)

Attachment: Portfile-1.7.1.patch added

Upgrade to 1.7.1

comment:2 Changed 5 years ago by lbschenkel (Leonardo Brondani Schenkel)

Please disregard the self-bootstrap. I misunderstood how Go bootstrapping works and I thought it was capable of self-bootstraping, however only Go 1.4 can do that. (Homebrew downloads a pre-built binary of 1.7 to bootstrap 1.7, that is what threw me off.)

I have updated the patch only to update the version and keep Go 1.4 for bootstrapping. Note that currently it won't build on macOS 10.12 (Sierra) unless Go 1.4 is updated to account for the change of timeofday(2). The patch proposed on #52041 works for me.

Last edited 5 years ago by ryandesign (Ryan Schmidt) (previous) (diff)

comment:3 Changed 5 years ago by ryandesign (Ryan Schmidt)

Cc: ciserlohn@… removed
Keywords: haspatch added
Owner: changed from macports-tickets@… to ciserlohn@…
Summary: go @1.7 upgrade to upstream 1.7.1 and self-bootstrapgo: update to 1.7.1

Regardless of whether go can self-bootstrap, a MacPorts port cannot depend on itself; MacPorts cannot accommodate such circular dependencies.

comment:4 Changed 5 years ago by lbschenkel (Leonardo Brondani Schenkel)

Completely understood; it was just a temporary confusion of my part.

comment:5 Changed 5 years ago by ryandesign (Ryan Schmidt)

Resolution: fixed
Status: newclosed

Christoph updated go to 1.7.1 in r153179.

Note: See TracTickets for help on using tickets.