[MacPorts] #52041: Building go-1.4 fails on Sierra
#52041: Building go-1.4 fails on Sierra ---------------------+-------------------------------- Reporter: chris@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Keywords: | Port: ---------------------+-------------------------------- 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. -- Ticket URL: <https://trac.macports.org/ticket/52041> MacPorts <https://www.macports.org/> Ports system for OS X
#52041: go-1.4: build fails on Sierra ----------------------+------------------------- Reporter: chris@… | Owner: ciserlohn@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: sierra Port: go-1.4 | ----------------------+------------------------- Changes (by larryv@…): * owner: macports-tickets@… => ciserlohn@… * keywords: => sierra * port: => go-1.4 Comment: 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. -- Ticket URL: <https://trac.macports.org/ticket/52041#comment:1> MacPorts <https://www.macports.org/> Ports system for OS X
#52041: go-1.4: build fails on Sierra ----------------------+------------------------- Reporter: chris@… | Owner: ciserlohn@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: sierra Port: go-1.4 | ----------------------+------------------------- Comment (by chris@…): Still fails, so I attached a clean build log. -- Ticket URL: <https://trac.macports.org/ticket/52041#comment:2> MacPorts <https://www.macports.org/> Ports system for OS X
#52041: go-1.4 @1.4.3_0: build fails on Sierra ----------------------+------------------------- Reporter: chris@… | Owner: ciserlohn@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: sierra Port: go-1.4 | ----------------------+------------------------- -- Ticket URL: <https://trac.macports.org/ticket/52041#comment:3> MacPorts <https://www.macports.org/> Ports system for OS X
#52041: go-1.4 @1.4.3_0: build fails on Sierra ----------------------+------------------------- Reporter: chris@… | Owner: ciserlohn@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: sierra Port: go-1.4 | ----------------------+------------------------- Comment (by ethansherriff@…): 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`. -- Ticket URL: <https://trac.macports.org/ticket/52041#comment:6> MacPorts <https://www.macports.org/> Ports system for macOS
#52041: go-1.4 @1.4.3_0: build fails on Sierra ----------------------+------------------------- Reporter: chris@… | Owner: ciserlohn@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: sierra Port: go-1.4 | ----------------------+------------------------- Comment (by ethansherriff@…): Working for me on 10.12 Public Beta 7 (16A313a). -- Ticket URL: <https://trac.macports.org/ticket/52041#comment:7> MacPorts <https://www.macports.org/> Ports system for macOS
#52041: go-1.4 @1.4.3_0: build fails on Sierra ----------------------+------------------------- Reporter: chris@… | Owner: ciserlohn@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: sierra Port: go-1.4 | ----------------------+------------------------- Comment (by leonardo.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. -- Ticket URL: <https://trac.macports.org/ticket/52041#comment:8> MacPorts <https://www.macports.org/> Ports system for macOS
#52041: go-1.4 @1.4.3_0: build fails on Sierra ----------------------+------------------------- Reporter: chris@… | Owner: ciserlohn@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: sierra Port: go-1.4 | ----------------------+------------------------- Comment (by leonardo.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. -- Ticket URL: <https://trac.macports.org/ticket/52041#comment:9> MacPorts <https://www.macports.org/> Ports system for macOS
#52041: go-1.4 @1.4.3_0: build fails on Sierra ----------------------+------------------------- Reporter: chris@… | Owner: ciserlohn@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: sierra Port: go-1.4 | ----------------------+------------------------- Comment (by leonardo.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 boostrap 1.7 and deletes it aftwerwards.) I tried the other patch and it works for me on macOS Sierra GM + XCode 8 GM. -- Ticket URL: <https://trac.macports.org/ticket/52041#comment:10> MacPorts <https://www.macports.org/> Ports system for macOS
#52041: go-1.4 @1.4.3_0: build fails on Sierra ----------------------+----------------------------- Reporter: chris@… | Owner: ciserlohn@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: sierra haspatch Port: go-1.4 | ----------------------+----------------------------- Changes (by ryandesign@…): * cc: ryandesign@… (added) * keywords: sierra => sierra haspatch Comment: 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. -- Ticket URL: <https://trac.macports.org/ticket/52041#comment:11> MacPorts <https://www.macports.org/> Ports system for macOS
#52041: go-1.4 @1.4.3_0: build fails on Sierra ----------------------+----------------------------- Reporter: chris@… | Owner: ciserlohn@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: sierra haspatch Port: go-1.4 | ----------------------+----------------------------- Comment (by ethansherriff@…): 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. -- Ticket URL: <https://trac.macports.org/ticket/52041#comment:12> MacPorts <https://www.macports.org/> Ports system for macOS
#52041: go-1.4 @1.4.3_0: build fails on Sierra ----------------------+----------------------------- Reporter: chris@… | Owner: ciserlohn@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: sierra haspatch Port: go-1.4 | ----------------------+----------------------------- Comment (by ethansherriff@…): 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? -- Ticket URL: <https://trac.macports.org/ticket/52041#comment:13> MacPorts <https://www.macports.org/> Ports system for macOS
#52041: go-1.4 @1.4.3_0: build fails on Sierra ----------------------+----------------------------- Reporter: chris@… | Owner: ciserlohn@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: sierra haspatch Port: go-1.4 | ----------------------+----------------------------- Comment (by ethansherriff@…): Sorry, I added the patch with the wrong name. Please see the attachment "sierra-clock_gettime copy.patch". -- Ticket URL: <https://trac.macports.org/ticket/52041#comment:14> MacPorts <https://www.macports.org/> Ports system for macOS
#52041: go-1.4 @1.4.3_0: build fails on Sierra ----------------------+----------------------------- Reporter: chris@… | Owner: ciserlohn@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: sierra haspatch Port: go-1.4 | ----------------------+----------------------------- Comment (by ryandesign@…): Replying to [comment:13 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). -- Ticket URL: <https://trac.macports.org/ticket/52041#comment:15> MacPorts <https://www.macports.org/> Ports system for macOS
#52041: go-1.4 @1.4.3_0: build fails on Sierra ----------------------+----------------------------- Reporter: chris@… | Owner: ciserlohn@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: sierra haspatch Port: go-1.4 | ----------------------+----------------------------- Comment (by carlos.abalde@…): Cc Me! -- Ticket URL: <https://trac.macports.org/ticket/52041#comment:20> MacPorts <https://www.macports.org/> Ports system for macOS
#52041: go-1.4 @1.4.3_0: build fails on Sierra ----------------------+----------------------------- Reporter: chris@… | Owner: ciserlohn@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: sierra haspatch Port: go-1.4 | ----------------------+----------------------------- Changes (by larryv@…): * cc: carlos.abalde@… (added) Comment: You have to actually click the “CcMe!” button near the top of the ticket. -- Ticket URL: <https://trac.macports.org/ticket/52041#comment:21> MacPorts <https://www.macports.org/> Ports system for macOS
#52041: go-1.4 @1.4.3_0: build fails on Sierra ----------------------+----------------------------- Reporter: chris@… | Owner: ciserlohn@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: sierra haspatch Port: go-1.4 | ----------------------+----------------------------- Comment (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`. -- Ticket URL: <https://trac.macports.org/ticket/52041#comment:25> MacPorts <https://www.macports.org/> Ports system for macOS
#52041: go-1.4 @1.4.3_0: build fails on Sierra ----------------------+----------------------------- Reporter: chris@… | Owner: ciserlohn@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: sierra haspatch Port: go-1.4 | ----------------------+----------------------------- Comment (by ethansherriff@…): Replying to [comment:15 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. -- Ticket URL: <https://trac.macports.org/ticket/52041#comment:26> MacPorts <https://www.macports.org/> Ports system for macOS
#52041: go-1.4 @1.4.3_0: build fails on Sierra ----------------------+----------------------------- Reporter: chris@… | Owner: ciserlohn@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: sierra haspatch Port: go-1.4 | ----------------------+----------------------------- Comment (by sean@…): 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). -- Ticket URL: <https://trac.macports.org/ticket/52041#comment:27> MacPorts <https://www.macports.org/> Ports system for macOS
#52041: go-1.4 @1.4.3_0: build fails on Sierra ----------------------+----------------------------- Reporter: chris@… | Owner: ciserlohn@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: sierra haspatch Port: go-1.4 | ----------------------+----------------------------- Comment (by ryandesign@…): Replying to [comment:26 ethansherriff@…]:
Replying to [comment:15 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.
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 removes `go-1.4`, `go-1.4` would be (unnecessarily) reinstalled if the `go` 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. -- Ticket URL: <https://trac.macports.org/ticket/52041#comment:28> MacPorts <https://www.macports.org/> Ports system for macOS
#52041: go-1.4 @1.4.3_0: fatal error: MSpanList_Insert ----------------------+----------------------------- Reporter: chris@… | Owner: ciserlohn@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: fixed | Keywords: sierra haspatch Port: go-1.4 | ----------------------+----------------------------- Changes (by ryandesign@…): * status: new => closed * resolution: => fixed Comment: Replying to [comment:28 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. -- Ticket URL: <https://trac.macports.org/ticket/52041#comment:30> MacPorts <https://www.macports.org/> Ports system for macOS
#52041: go-1.4 @1.4.3_0: fatal error: MSpanList_Insert ----------------------+----------------------------- Reporter: chris@… | Owner: ciserlohn@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: fixed | Keywords: sierra haspatch Port: go-1.4 | ----------------------+----------------------------- Comment (by ciserlohn@…): Replying to [comment:28 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. -- Ticket URL: <https://trac.macports.org/ticket/52041#comment:31> MacPorts <https://www.macports.org/> Ports system for macOS
participants (1)
-
MacPorts