Opened 4 years ago

Closed 4 years ago

#60133 closed defect (fixed)

go @1.14: SIGILL: illegal instruction

Reported by: dbl001 (dbl) Owned by: ci42
Priority: Normal Milestone:
Component: ports Version: 2.6.2
Keywords: elcapitan Cc: herbygillot (Herby Gillot)
Port: go

Description

OS X 10.11.6

go_bootstrap install -gcflags=all= -ldflags=all= -i cmd/asm cmd/cgo cmd/compile cmd/link: exit status 2

Attachments (2)

main.log (62.3 KB) - added by dbl001 (dbl) 4 years ago.
main.2.log (37.3 KB) - added by andersm (Anders Montonen) 4 years ago.

Download all attachments as: .zip

Change History (13)

Changed 4 years ago by dbl001 (dbl)

Attachment: main.log added

comment:1 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: herbygillot added
Keywords: elcapitan added; Go removed
Owner: set to ci42
Port: go added; go-1.14_0 removed
Status: newassigned
Summary: Error Building Go: go-1.14_0go @1.14: SIGILL: illegal instruction

comment:2 Changed 4 years ago by andersm (Anders Montonen)

Ran into the same issue on macOS 10.14.6.

Changed 4 years ago by andersm (Anders Montonen)

Attachment: main.2.log added

comment:3 Changed 4 years ago by andersm (Anders Montonen)

This is probably this issue: https://github.com/golang/go/issues/37459. Go 1.14 introduced a dependency on the AVX instruction set, which breaks running on older hardware. The issue is set to be fixed in Go 1.14.1 (https://github.com/golang/go/issues/37478).

comment:4 Changed 4 years ago by kencu (Ken)

I don't know when the update to 1.14.1 is supposed to come along, so here you go <https://github.com/macports/macports-ports/pull/6470> if you want the patch now.

Fixes build for me, as expected.

comment:5 Changed 4 years ago by dbl001 (dbl)

I am ok waiting for Go 1.14.1, but, for some reason, ‘uninstall’ does not remove the Go port. E.g. - $ port list go go @1.14 lang/go

How do I uninstall lang/go 1.14?

Alternatively, do you have instructions on how to apply the patch? E.g. Is this procedure?

https://trac.macports.org/wiki/howto/PatchLocal

comment:6 Changed 4 years ago by dbl001 (dbl)

(ai) MacBook-Pro:~ davidlaxer$ port list go
go                             @1.14           lang/go
(ai) MacBook-Pro:~ davidlaxer$ sudo port clean go
Password:
--->  Cleaning go
(ai) MacBook-Pro:~ davidlaxer$ sudo port list go
go                             @1.14           lang/go
(ai) MacBook-Pro:~ davidlaxer$ sudo port uninstall go
(ai) MacBook-Pro:~ davidlaxer$ sudo port clean --dist go
--->  Cleaning go
(ai) MacBook-Pro:~ davidlaxer$ sudo port list go
go                             @1.14           lang/go
(ai) MacBook-Pro:~ davidlaxer$ 

comment:7 Changed 4 years ago by kencu (Ken)

try

port -v installed go

and see what that gives you.

I get this, at the moment, on 10.6.8:

$ port -v installed go
The following ports are currently installed:
  go @1.5.1_0 platform='darwin 10' archs='x86_64' date='2020-02-27T18:00:07-0800'
  go @1.6.3_0 platform='darwin 10' archs='x86_64' date='2020-02-27T19:35:39-0800'
  go @1.7.4_0 platform='darwin 10' archs='x86_64' date='2020-02-27T20:26:16-0800'
  go @1.8.3_0 platform='darwin 10' archs='x86_64' date='2020-02-27T20:31:15-0800'
  go @1.9.4_0 platform='darwin 10' archs='x86_64' date='2020-02-27T20:35:41-0800'
  go @1.10.3_0 platform='darwin 10' archs='x86_64' date='2020-02-27T20:40:50-0800'
  go @1.11.5_0 (active) platform='darwin 10' archs='x86_64' date='2020-02-27T20:46:05-0800'
Last edited 4 years ago by kencu (Ken) (previous) (diff)

comment:8 Changed 4 years ago by dbl001 (dbl)

$ port -v installed go
None of the specified ports are installed.

comment:9 Changed 4 years ago by kencu (Ken)

yeah -- so you don't have any go installed.

port list

is not doing what you thought it was doing :>

Re: applying the patch -- have you ever patched anything? It's not too hard.

From a github PR you can do this:

wget https://patch-diff.githubusercontent.com/raw/macports/macports-ports/pull/6470.patch

and then patch -p1 < 6470.patch from the top of the ports tree.

hopefully some of what I just said makes sense to you. Otherwise ci42 could hit the "commit" button on the PR if he wants to ...

Last edited 4 years ago by kencu (Ken) (previous) (diff)

comment:10 Changed 4 years ago by dbl001 (dbl)

The patch worked.

$ go version
go version go1.14 darwin/amd64

I'm curious ... after I uninstalled go 1.4 and all prior versions of the go port, then ran 'sudo port selfupdate' the, 'sudo port upgrade outdated' why did it start building the go port agin?

comment:11 Changed 4 years ago by kencu (Ken)

Resolution: fixed
Status: assignedclosed

In ecbbc972ebf42e88aeeb1c69cd2f37bfc622b0c9/macports-ports (master):

go: backport upstream fix for AVX

closes: #60133

Note: See TracTickets for help on using tickets.