Yq: build on linux fails with 'undefined: sort.SliceStable'

Created on 18 Jan 2018  路  2Comments  路  Source: mikefarah/yq

user@host:~$ cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.3 LTS"

user@host:~$ sudo aptitude install -y golang-go
  ...

user@host:~$ go version
go version go1.6.2 linux/amd64

user@host:~$ GOPATH=~/go go get github.com/mikefarah/yq
# github.com/mikefarah/yq
go/src/github.com/mikefarah/yq/data_navigator.go:199: undefined: sort.SliceStable

Most helpful comment

The root cause is the version of Go. sort.SliceStable was not added until Go v1.8 (https://golang.org/doc/go1.8#sort_slice)

All 2 comments

Hmm looks like it didn't install the dependencies :/

Can you try the following:

./scripts/devtools.sh
make local vendor
make local build

I think this needs to be streamlined a little

The root cause is the version of Go. sort.SliceStable was not added until Go v1.8 (https://golang.org/doc/go1.8#sort_slice)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tadayosi picture tadayosi  路  6Comments

tamalsaha picture tamalsaha  路  5Comments

yfried picture yfried  路  3Comments

il1yaz picture il1yaz  路  3Comments

infa-ddeore picture infa-ddeore  路  5Comments