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

Unable to build powergate CLI #882

Closed
chaitanyaprem opened this issue May 12, 2022 · 8 comments
Closed

Unable to build powergate CLI #882

chaitanyaprem opened this issue May 12, 2022 · 8 comments

Comments

@chaitanyaprem
Copy link

chaitanyaprem commented May 12, 2022

Followed the steps mentioned in https://docs.textile.io/powergate/ to clone and build Powergate CLI.
I am facing following errors and unable to proceed.

My environment is M1 macbook Pro with golang version go version go1.18 darwin/amd64

On running make install-pow following error is displayed.

go: downloading github.com/marten-seemann/qtls-go1-17 v0.1.0-rc.1
go: downloading github.com/matttproud/golang_protobuf_extensions v1.0.1
# github.com/lucas-clemente/quic-go/internal/qtls
../../../go/pkg/mod/github.com/lucas-clemente/quic-go@v0.21.2/internal/qtls/go118.go:5:13: cannot use "quic-go doesn't build on Go 1.18 yet." (untyped string constant) as int value in variable declaration
make: *** [install-pow] Error 2

Thought i found a workaround mentioned here ipfs/kubo#8819 .
Tried to proceed with it but I am running into the below error. Looks like go-ipfs version used is 0.8 which is very old and using some flags which have been removed in later dependency (quic-go).

CGO_ENABLED=0 go install -ldflags="-X github.com/textileio/powergate/v2/buildinfo.GitSummary=v2.6.2-6-gb82b011-dirty -X github.com/textileio/powergate/v2/buildinfo.Version=git -X github.com/textileio/powergate/v2/buildinfo.BuildDate=2022-05-12T00:08:11Z -X github.com/textileio/powergate/v2/buildinfo.GitCommit=b82b011 -X github.com/textileio/powergate/v2/buildinfo.GitBranch=master -X github.com/textileio/powergate/v2/buildinfo.GitState=dirty" ./cmd/pow
# github.com/ipfs/go-ipfs/core/node/libp2p
../../../go/pkg/mod/github.com/ipfs/go-ipfs@v0.8.0/core/node/libp2p/transport.go:21:7: undefined: quic.RetireBugBackwardsCompatibilityMode
make: *** [install-pow] Error 2
@jsign
Copy link
Contributor

jsign commented May 12, 2022

The newest libp2p has a limitation (I guess is temporal) for people compiling with Go v1.18.x, which is a release from some weeks ago.

You need to compile with v1.17.x or older. (i.e: I tried with v1.17.8 now and didn't have an issue compiling)
Be sure that your git repo is clean (no changes).

@chaitanyaprem
Copy link
Author

Thanks, will try on a 1.17 version then.

But, is it the lipp2p which is causing the issue? Because i don't see an open issue for the same under libp2p.
And the issue i have referenced above seems to have addressed this in go-ipfs and libp2p.
I see that go-ipfs-0.8 is mentioned as dependency in powergate which is an older version and hence must be having this limitation whereas the latest is 0.12.

@jsign
Copy link
Contributor

jsign commented May 16, 2022

Yes, it's libp2p since the error:

../../../go/pkg/mod/github.com/lucas-clemente/quic-go@v0.21.2/internal/qtls/go118.go:5:13: cannot use "quic-go doesn't build on Go 1.18 yet." (untyped string constant) as int value in variable declaration

Comes from libp2p.

Correct, this repo isn't using the latest version of libp2p.

@jsolly
Copy link
Contributor

jsolly commented Aug 17, 2022

I ran into this error and initially logged the issue in the wrong repo.

After installing Go 1.17.13 the error went away.

@jsolly
Copy link
Contributor

jsolly commented Aug 23, 2022

@jsign I forked this repo and added a note to the repo's home page about the Go versions that are supported in https://github.com/jsolly/powergate/commit/bda20f6bbd0e55d23dcd41ac2e6ab9b14d5a6584

I noticed I on the PR page that it didn't have the option to choose my fork for a PR. What's the process for a contributor to open a PR?

I checked the Contributor doc and it is empty.

@jsign
Copy link
Contributor

jsign commented Aug 23, 2022

@jsign I forked this repo and added a note to the repo's home page about the Go versions that are supported in jsolly@bda20f6

I noticed I on the PR page that it didn't have the option to choose my fork for a PR. What's the process for a contributor to open a PR?

I checked the Contributor doc and it is empty.

There isn't a special process to create a PR, you should be able to created by clicking the "open pull request" button in your fokred repo:
image

BTW, thanks for the contribution.

@jsolly
Copy link
Contributor

jsolly commented Aug 23, 2022

Thanks! I opened a new PR to update the home page with information about installing Go.
#893

@jsign
Copy link
Contributor

jsign commented Aug 24, 2022

Closed by #893

@jsign jsign closed this as completed Aug 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants