#52041 closed defect (fixed)
go-1.4 @1.4.3_0: fatal error: MSpanList_Insert
Reported by: | kode54 (Christopher Snowhill) | Owned by: | ci42 |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.3.4 |
Keywords: | sierra haspatch | Cc: | mkae (Marko Käning), e-t-h-a-n, ryandesign (Ryan Carsten Schmidt), breiter (Brian Reiter), elventear (Pepe Barbe), eric@…, macports@…, ethan@…, andre.david@…, martijnverburg@… |
Port: | go-1.4 |
Description
Attempting to build go-1.4 fails during the testing phase, both with the current release build of Xcode, and with Xcode 8 beta 6.
Attachments (6)
Change History (37)
Changed 8 years ago by kode54 (Christopher Snowhill)
comment:1 Changed 8 years ago by larryv (Lawrence Velázquez)
Keywords: | sierra added |
---|---|
Owner: | changed from macports-tickets@… to ciserlohn@… |
Port: | go-1.4 added |
Summary: | Building go-1.4 fails on Sierra → go-1.4: build fails on Sierra |
That log isn’t clean. Could you run sudo port clean go-1.4
and try installing again, and attach the new log if it fails.
Changed 8 years ago by kode54 (Christopher Snowhill)
Attachment: | main.2.log added |
---|
Clean log of go-1.4
comment:2 Changed 8 years ago by kode54 (Christopher Snowhill)
Still fails, so I attached a clean build log.
comment:3 Changed 8 years ago by larryv (Lawrence Velázquez)
Summary: | go-1.4: build fails on Sierra → go-1.4 @1.4.3_0: build fails on Sierra |
---|
comment:6 Changed 8 years ago by e-t-h-a-n
Okay, so since 10.12, there's now clock_gettime
in the C Standard Library, which broke Go. A commit was made to their master branch (https://github.com/golang/go/commit/2da5633eb9091608047881953f75b489a3134cdc) in response to this issue (https://github.com/golang/go/issues/16570). I have backported the fix to go-1.4.3 and created sierra-clock_gettime.patch
.
Changed 8 years ago by e-t-h-a-n
Attachment: | Portfile.diff added |
---|
Patch the Portfile to use the patch.
Changed 8 years ago by e-t-h-a-n
Attachment: | sierra-clock_gettime.patch added |
---|
Patch for go-1.4.3 on Sierra
comment:8 Changed 8 years ago by lbschenkel (Leonardo Brondani Schenkel)
I fixed it in my local environment in a different way: I upgraded Go to 1.7.1 and bootstrapped it with itself (although that works with 1.7.0 was well). Go 1.4 is officially used by upstream to bootstrap Go since they want to prevent newer versions depending on Go features introduced after 1.4, however that is less important for downstream users — and this has the advantage of not requiring download/building Go 1.4 which results in faster builds. This was the same approach taken by Homebrew as well, since the fix for a change of gettimeofday(2) introduced in OS X 10.12 is not backported to 1.4 yet. I have attached my updated Portfile.
Changed 8 years ago by lbschenkel (Leonardo Brondani Schenkel)
Attachment: | Portfile-1.7.1.patch added |
---|
go 1.7.1 with self-bootstrap
comment:9 Changed 8 years ago by lbschenkel (Leonardo Brondani Schenkel)
Disregard my patch from now; it works if you had Go 1.7 previously built (I had it from before the Sierra upgrade) however it does not work in a clean environment. Once I make it self-bootstrap I will update the patch.
comment:10 Changed 8 years ago by lbschenkel (Leonardo Brondani Schenkel)
Please disregard Portfile-1.7.1.patch. I misunderstood how Go bootstrapping mechanism works and I assumed it could self-bootstrap but it can't — you need 1.4 (Homebrew downloads a pre-built binary to bootstrap 1.7 and deletes it aftwerwards.)
I tried the other patch and it works for me on macOS Sierra GM + XCode 8 GM.
comment:11 Changed 8 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | ryandesign@… added |
---|---|
Keywords: | haspatch added |
It looks like your proposed patch includes all of the changes from https://github.com/golang/go/commit/2da5633eb9091608047881953f75b489a3134cdc and also includes the sys_darwin_386.s changes from https://github.com/golang/go/commit/fad2bbdc6a686a20174d2e73cf78f1659722bb39 but not the sys_darwin_amd64.s changes. Don't we need the sys_darwin_amd64.s changes as well?
Your portfile patch is not correct because >=
is used to compare numbers but 16.0.0
is a string. We want to apply the patch unconditionally anyway.
comment:12 Changed 8 years ago by e-t-h-a-n
The change's I made for sys_darwin_386.s were purely to make the systime and inreg routine match those upstream. I didn't see inreg in GitHub's changelog for sys_darwin_amd64.s for 2da5633 and missed those out. Thank you for pointing that out, I will update the (portfile) patch shortly.
comment:13 follow-up: 15 Changed 8 years ago by e-t-h-a-n
Also, if any Portfile wizards are reading this (unlike me, :P) could we have go build itself against go-1.4 (the last version that can be built with a C compiler) if there isn't a go already installed?
Changed 8 years ago by e-t-h-a-n
Attachment: | sierra-clock_gettime copy.patch added |
---|
comment:14 Changed 8 years ago by e-t-h-a-n
Sorry, I added the patch with the wrong name. Please see the attachment "sierra-clock_gettime copy.patch".
comment:15 follow-up: 26 Changed 8 years ago by ryandesign (Ryan Carsten Schmidt)
Replying to ethansherriff@…:
could we have go build itself against go-1.4 (the last version that can be built with a C compiler) if there isn't a go already installed?
Doesn't it already do that? It has a runtime dependency on go-1.4, so if go-1.4 is not yet installed, it will be installed first. (Granted, it should be a library dependency, not a runtime dependency, since it is also needed at build time, not just at runtime).
comment:21 Changed 8 years ago by larryv (Lawrence Velázquez)
Cc: | carlos.abalde@… added |
---|
You have to actually click the “CcMe!” button near the top of the ticket.
comment:25 Changed 8 years ago by andre.david@…
Please note that this is blocking docker-machine
and docker
that both depend on go
that, in turn, depends on go-1.4
.
comment:26 follow-up: 28 Changed 8 years ago by e-t-h-a-n
Replying to ryandesign@…:
Doesn't it already do that? It has a runtime dependency on go-1.4, so if go-1.4 is not yet installed, it will be installed first. (Granted, it should be a library dependency, not a runtime dependency, since it is also needed at build time, not just at runtime).
go
(from versions 1.5 upwards) only depends on go-1.4
if being built from source, and this is only a build time dependancy. What I meant to say was that, if someone installs go
and removes go-1.4
, go-1.4
would be (unnecessarily) reinstalled if the go
port needed to be upgraded.
Either way, this is beyond the scope of this ticket and my patch is working, so I'd be very grateful you would check (and hopefully) approve it.
comment:27 Changed 8 years ago by seanfarley (Sean Farley)
I just installed Sierra and can confirm these patches more-or-less fix things. Ryan, I think go-1.4 is just needed for bootstrapping go 1.7. If I don't hear any objections, I can clean up the patches and push them (I left go-1.4 as a build dep).
comment:28 follow-ups: 30 31 Changed 8 years ago by ryandesign (Ryan Carsten Schmidt)
Replying to ethansherriff@…:
Replying to ryandesign@…:
Doesn't it already do that? It has a runtime dependency on go-1.4, so if go-1.4 is not yet installed, it will be installed first. (Granted, it should be a library dependency, not a runtime dependency, since it is also needed at build time, not just at runtime).
go
(from versions 1.5 upwards) only depends ongo-1.4
if being built from source, and this is only a build time dependancy.
Christoph, do you remember why, in closing #48940, you made go-1.4 a runtime dependency, rather than build-time dependency as had been proposed in attachment:ticket:48940:Portfile-go.diff?
What I meant to say was that, if someone installs
go
and removesgo-1.4
,go-1.4
would be (unnecessarily) reinstalled if thego
port needed to be upgraded.
In the go port's current state, a user who tries to uninstall go-1.4 cannot do so:
$ sudo port uninstall go-1.4 ---> Unable to uninstall go-1.4 @1.4.3_0, the following ports depend on it: ---> go @1.7_0 Error: Failed to uninstall go-1.4: Please uninstall the ports that depend on go-1.4 first. Error: See /opt/local/var/macports/logs/_opt_local_var_macports_registry_portfiles_go-1.4-1.4.3_0_86ab4a8314cc0f60fb001e57c331230040cdff8c6728f9b181bb077d6f3a1fbd-2906/go-1.4/main.log for details. Warning: Failed to execute portfile from registry for go-1.4 @1.4.3_0 ---> Unable to uninstall go-1.4 @1.4.3_0, the following ports depend on it: ---> go @1.7_0 Error: port uninstall failed: Please uninstall the ports that depend on go-1.4 first.
Once we change it from a runtime to a build-time dependency, that should become possible. MacPorts should not reinstall go-1.4 unless you are building from source; if you instead receive a binary from our build server, you don't need build dependencies.
If you are suggesting that we should only build go using go-1.4 if go is not installed, and should build go with go if go is already installed, then we don't want to do that, because that would be contrary to the goal of ReproducibleBuilds.
comment:30 Changed 8 years ago by ryandesign (Ryan Carsten Schmidt)
Resolution: | → fixed |
---|---|
Status: | new → closed |
Summary: | go-1.4 @1.4.3_0: build fails on Sierra → go-1.4 @1.4.3_0: fatal error: MSpanList_Insert |
Replying to ryandesign@…:
Christoph, do you remember why, in closing #48940 via r140801, you made go-1.4 a runtime dependency, rather than build-time dependency as had been proposed in attachment:ticket:48940:Portfile-go.diff?
Christoph changed it to a build dependency in r153179 and fixed the build failure of go-1.4 on Sierra in r153178.
comment:31 Changed 8 years ago by ci42
Replying to ryandesign@…:
Christoph, do you remember why, in closing #48940 via r140801, you made go-1.4 a runtime dependency, rather than build-time dependency as had been proposed in attachment:ticket:48940:Portfile-go.diff?
I can't remember. I think I just made a mistake.
go-1.4 build log