Build Error on 0.4.22 - go version issue
- Dominant language
- Go
- Stars
- 273
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
According to docs, the go version needed for build 0.4.22 is go 1.12.7.
[Go Version](https://dist.ipfs.io/go-ipfs/v0.4.22/build-info)
```
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.
```bash
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/go-multierror@v1.1.1/multierror.go:115:9: undefined: errors.As
/root/go/pkg/mod/github.com/hashicorp/go-multierror@v1.1.1/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/v4@v4.0.1/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.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the Go 1.12.7 build from the listed commands, then inspect bin/check_go_version and mk/golang.mk. Compare the documented Go 1.12.7 requirement with the module errors and the check requiring 1.17. Done means the supported Go version and dependency constraints produce a successful build, or the mismatch is documented with a reproducible failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 28/100