Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build Error on 0.4.22 - go version issue #231

Open
NJITman opened this issue Jul 21, 2022 · 3 comments
Open

Build Error on 0.4.22 - go version issue #231

NJITman opened this issue Jul 21, 2022 · 3 comments
Labels
need/triage Needs initial labeling and prioritization

Comments

@NJITman
Copy link

NJITman commented Jul 21, 2022

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.

@NJITman NJITman added the need/triage Needs initial labeling and prioritization label Jul 21, 2022
@welcome
Copy link

welcome bot commented Jul 21, 2022

Thank you for submitting your first issue to this repository! A maintainer will be here shortly to triage and review.
In the meantime, please double-check that you have provided all the necessary information to make this process easy! Any information that can help save additional round trips is useful! We currently aim to give initial feedback within two business days. If this does not happen, feel free to leave a comment.
Please keep an eye on how this issue will be labeled, as labels give an overview of priorities, assignments and additional actions requested by the maintainers:

  • "Priority" labels will show how urgent this is for the team.
  • "Status" labels will show if this is ready to be worked on, blocked, or in progress.
  • "Need" labels will indicate if additional input or analysis is required.

Finally, remember to use https://discuss.ipfs.io if you just need general support.

@NJITman
Copy link
Author

NJITman commented Jul 21, 2022

Ended up using plugin version 0.12.1 with go version 1.17 and everything worked fine. Not sure why the plugin version 0.42.22 is referencing go version 1.12.7, but that combo definitely does not work.

@Stebalien
Copy link
Member

That's saying: if you want to use this plugin with the 0.4.22 go-ipfs build uploaded at dist.ipfs.io, you need to build with go 1.12.7. However:

  1. That's just an example. You shouldn't be using go-ipfs 0.4.22 at this point, the latest version is 0.14.0.
  2. If you wanted to build against go-ipfs 0.4.22, you'd need to use https://github.com/ipfs/go-ds-s3/tree/release/v0.4.22 (not master).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need/triage Needs initial labeling and prioritization
Projects
None yet
Development

No branches or pull requests

2 participants