Skip to content

Build Error on 0.4.22 - go version issue #231

@NJITman

Description

@NJITman

According to docs, the go version needed for build 0.4.22 is go 1.12.7.

Go Version

go version go1.12.7 linux/amd64
git sha of code: 4e981576b71665f2a9ba71fbf479204802a03a37
Linux raft 5.2.8.a-1-hardened #1 SMP PREEMPT Fri Aug 9 20:17:59 CEST 2019 x86_64 GNU/Linux
built on Tue 13 Aug 2019 07:12:44 AM PDT

Installed go 1.12.7 and verified operation. Using the following steps to install and build go-ipfs.

export GO111MODULE=on
git clone https://github.com/ipfs/go-ipfs
cd go-ipfs
go get github.com/ipfs/go-ds-s3/plugin@latest
echo "s3ds github.com/ipfs/go-ds-s3/plugin 0" >> plugin/loader/preload_list
make build
go mod tidy
make build
make install

During go get step, I get about 10 errors like the following, each with different go version requirements. So, it looks like 1.12.7 is too low a version for several of the modules.

# github.com/hashicorp/go-multierror
/root/go/pkg/mod/github.com/hashicorp/[email protected]/multierror.go:115:9: undefined: errors.As
/root/go/pkg/mod/github.com/hashicorp/[email protected]/multierror.go:120:9: undefined: errors.Is
note: module requires Go 1.13

or

go build crypto/ed25519: no Go files in 
# github.com/decred/dcrd/dcrec/secp256k1/v4
/root/go/pkg/mod/github.com/decred/dcrd/dcrec/secp256k1/[email protected]/loadprecomputed.go:53:22: undefined: io.ReadAll
note: module requires Go 1.16

When I run make build, I get the following error (the failing module is one of the ones above):

build github.com/ipfs/kubo/cmd/ipfs: cannot load crypto/ed25519: cannot find module providing package crypto/ed25519
go version go1.12.7 linux/amd64
bin/check_go_version 1.17
fatal: go version '1.12.7' should be at least '1.17'
=> Please take a look at https://golang.org/doc/install to install or upgrade go.
make: *** [mk/golang.mk:80: check_go_version] Error 1

I tried a completely new install using go 1.18.4 and although that removed all of the go get errors for version mismatch, it failed during make build with Error 2. I would have to setup that install again to provide additional error details.

This is all being done on a EC2 instance running Ubuntu 20.04.

Metadata

Metadata

Assignees

No one assigned

    Labels

    need/triageNeeds initial labeling and prioritization

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions