sharingio/environment

Go is broken

Closed this issue · 2 comments

When trying to run go run or go build, the following messages are appearing in Environment

go: downloading k8s.io/kube-aggregator v0.23.1
# sort
/usr/local/go/src/sort/zsortfunc.go:10:6: insertionSort_func redeclared in this block
        /usr/local/go/src/sort/zfuncversion.go:10:6: other declaration of insertionSort_func
/usr/local/go/src/sort/zsortfunc.go:20:6: siftDown_func redeclared in this block
        /usr/local/go/src/sort/zfuncversion.go:19:6: other declaration of siftDown_func
/usr/local/go/src/sort/zsortfunc.go:38:6: heapSort_func redeclared in this block
        /usr/local/go/src/sort/zfuncversion.go:38:6: other declaration of heapSort_func
/usr/local/go/src/sort/zsortfunc.go:329:6: swapRange_func redeclared in this block
        /usr/local/go/src/sort/zfuncversion.go:65:6: other declaration of swapRange_func
/usr/local/go/src/sort/zsortfunc.go:335:6: stable_func redeclared in this block
        /usr/local/go/src/sort/zfuncversion.go:163:6: other declaration of stable_func
/usr/local/go/src/sort/zsortfunc.go:378:6: symMerge_func redeclared in this block
        /usr/local/go/src/sort/zfuncversion.go:187:6: other declaration of symMerge_func
/usr/local/go/src/sort/zsortfunc.go:464:6: rotate_func redeclared in this block
        /usr/local/go/src/sort/zfuncversion.go:252:6: other declaration of rotate_func

There appears to have been some issue with the installation of Go.

Force reinstalling it appears to have fixed it

sudo rm -rf /usr/local/go/
. /usr/lib/sharingio/environment/helper.sh
curl -L https://dl.google.com/go/go1.19.1.linux-${ARCH_TYPE_2}.tar.gz     | tar --directory /usr/local --extract --ungzip

The breakage was caused by installing Go on top of a current installation
https://github.com/sharingio/coder/blob/8850ed7/.sharing.io/init#L5