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

Go build error #98

Closed
MichaelJCole opened this issue Sep 30, 2023 · 3 comments
Closed

Go build error #98

MichaelJCole opened this issue Sep 30, 2023 · 3 comments

Comments

@MichaelJCole
Copy link

Hi, I got this error when trying to run the go code. Here's what happened:

# install go
> $ sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go1.21.1.linux-amd64.tar.gz   
...                                                        
> $ go version         
go version go1.21.1 linux/amd64
> $ cd go-peer           
> $ ls                          
chat-example.gif  chatroom.go  Dockerfile  flag.go  go.mod  go.sum  identity.go  main.go  README.md  ui.go
> $ go run .                                                                                                                              go: downloading github.com/multiformats/go-multiaddr v0.9.0
go: downloading github.com/gdamore/tcell/v2 v2.6.0
go: downloading github.com/libp2p/go-libp2p-kad-dht v0.23.0
go: downloading github.com/rivo/tview v0.0.0-20230406072732-e22ce9588bb4
go: downloading github.com/libp2p/go-libp2p-pubsub v0.9.3
go: downloading github.com/multiformats/go-varint v0.0.7
go: downloading github.com/ipfs/go-cid v0.4.1
go: downloading github.com/multiformats/go-multibase v0.2.0
go: downloading github.com/multiformats/go-multihash v0.2.1
go: downloading github.com/multiformats/go-base36 v0.2.0
go: downloading github.com/multiformats/go-base32 v0.1.0
go: downloading github.com/mr-tron/base58 v1.2.0
go: downloading github.com/libp2p/go-buffer-pool v0.1.0
go: downloading github.com/gogo/protobuf v1.3.2
go: downloading github.com/ipfs/go-log/v2 v2.5.1
go: downloading github.com/libp2p/go-msgio v0.3.0
go: downloading github.com/ipfs/go-log v1.0.5
go: downloading github.com/gdamore/encoding v1.0.0
go: downloading github.com/lucasb-eyer/go-colorful v1.2.0
go: downloading github.com/mattn/go-runewidth v0.0.14
go: downloading golang.org/x/sys v0.7.0
go: downloading golang.org/x/term v0.7.0
go: downloading golang.org/x/text v0.9.0
go: downloading github.com/rivo/uniseg v0.4.4
go: downloading github.com/mattn/go-isatty v0.0.18
go: downloading go.uber.org/multierr v1.11.0
go: downloading go.uber.org/zap v1.24.0
go: downloading github.com/minio/sha256-simd v1.0.0
go: downloading github.com/spaolacci/murmur3 v1.1.0
go: downloading golang.org/x/crypto v0.8.0
go: downloading lukechampine.com/blake3 v1.1.7
go: downloading github.com/klauspost/cpuid/v2 v2.2.4
go: downloading go.uber.org/atomic v1.10.0
go: downloading github.com/google/uuid v1.3.0
go: downloading github.com/google/gopacket v1.1.19
go: downloading github.com/ipfs/boxo v0.8.0
go: downloading github.com/ipfs/go-datastore v0.6.0
go: downloading github.com/jbenet/goprocess v0.1.4
go: downloading github.com/libp2p/go-libp2p-kbucket v0.5.0
go: downloading github.com/libp2p/go-libp2p-record v0.2.0
go: downloading github.com/libp2p/go-netroute v0.2.1
go: downloading github.com/whyrusleeping/go-keyspace v0.0.0-20160322163242-5b898ac5add1
go: downloading go.opencensus.io v0.24.0
go: downloading go.opentelemetry.io/otel v1.14.0
go: downloading go.opentelemetry.io/otel/trace v1.14.0
go: downloading gonum.org/v1/gonum v0.12.0
go: downloading github.com/opentracing/opentracing-go v1.2.0
go: downloading github.com/hashicorp/golang-lru v0.5.4
go: downloading github.com/hashicorp/go-multierror v1.1.1
go: downloading github.com/hashicorp/errwrap v1.1.0
go: downloading github.com/go-logr/logr v1.2.4
go: downloading github.com/go-logr/stdr v1.2.2
go: downloading github.com/libp2p/go-libp2p-asn-util v0.3.0
go: downloading github.com/ipfs/go-ipfs-util v0.0.2
go: downloading github.com/libp2p/go-cidranger v1.1.0
go: downloading github.com/pkg/errors v0.9.1
go: downloading github.com/ipld/go-ipld-prime v0.20.0
go: downloading github.com/multiformats/go-multicodec v0.8.1
go: downloading github.com/polydawn/refmt v0.89.0
main.go:14:2: missing go.sum entry for module providing package github.com/libp2p/go-libp2p (imported by github.com/libp2p/universal-connectivity/go-peer); to add:
	go get github.com/libp2p/universal-connectivity/go-peer
../../go/pkg/mod/github.com/libp2p/[email protected]/pubkey.go:8:2: missing go.sum entry for module providing package github.com/libp2p/go-libp2p/core/crypto (imported by github.com/libp2p/universal-connectivity/go-peer); to add:
	go get github.com/libp2p/universal-connectivity/go-peer
../../go/pkg/mod/github.com/libp2p/[email protected]/pubkey.go:9:2: missing go.sum entry for module providing package github.com/libp2p/go-libp2p/core/peer (imported by github.com/libp2p/universal-connectivity/go-peer); to add:
	go get github.com/libp2p/universal-connectivity/go-peer
../../go/pkg/mod/github.com/ipfs/[email protected]/ipns/record.go:14:2: missing go.sum entry for module providing package github.com/libp2p/go-libp2p/core/peerstore (imported by github.com/libp2p/go-libp2p-kad-dht); to add:
	go get github.com/libp2p/[email protected]
../../go/pkg/mod/github.com/libp2p/[email protected]/providers/providers_manager.go:20:2: missing go.sum entry for module providing package github.com/libp2p/go-libp2p/p2p/host/peerstore (imported by github.com/libp2p/go-libp2p-kad-dht); to add:
	go get github.com/libp2p/[email protected]
../../go/pkg/mod/github.com/libp2p/[email protected]/internal/config/config.go:13:2: missing go.sum entry for module providing package github.com/libp2p/go-libp2p/core/host (imported by github.com/libp2p/universal-connectivity/go-peer); to add:
	go get github.com/libp2p/universal-connectivity/go-peer
../../go/pkg/mod/github.com/libp2p/[email protected]/internal/config/config.go:15:2: missing go.sum entry for module providing package github.com/libp2p/go-libp2p/core/protocol (imported by github.com/libp2p/go-libp2p-kad-dht); to add:
	go get github.com/libp2p/[email protected]
../../go/pkg/mod/github.com/libp2p/[email protected]/internal/config/quorum.go:3:8: missing go.sum entry for module providing package github.com/libp2p/go-libp2p/core/routing (imported by github.com/libp2p/go-libp2p-kad-dht); to add:
	go get github.com/libp2p/[email protected]
../../go/pkg/mod/github.com/libp2p/[email protected]/pb/message.go:4:2: missing go.sum entry for module providing package github.com/libp2p/go-libp2p/core/network (imported by github.com/libp2p/universal-connectivity/go-peer); to add:
	go get github.com/libp2p/universal-connectivity/go-peer
../../go/pkg/mod/github.com/libp2p/[email protected]/subscriber_notifee.go:7:2: missing go.sum entry for module providing package github.com/libp2p/go-libp2p/core/event (imported by github.com/libp2p/go-libp2p-kad-dht); to add:
	go get github.com/libp2p/[email protected]
../../go/pkg/mod/github.com/libp2p/[email protected]/subscriber_notifee.go:10:2: missing go.sum entry for module providing package github.com/libp2p/go-libp2p/p2p/host/eventbus (imported by github.com/libp2p/go-libp2p-kad-dht); to add:
	go get github.com/libp2p/[email protected]
../../go/pkg/mod/github.com/libp2p/[email protected]/tag_tracer.go:8:2: missing go.sum entry for module providing package github.com/libp2p/go-libp2p/core/connmgr (imported by github.com/libp2p/go-libp2p-pubsub); to add:
	go get github.com/libp2p/[email protected]
../../go/pkg/mod/github.com/libp2p/[email protected]/discovery.go:8:2: missing go.sum entry for module providing package github.com/libp2p/go-libp2p/core/discovery (imported by github.com/libp2p/go-libp2p-pubsub); to add:
	go get github.com/libp2p/[email protected]
../../go/pkg/mod/github.com/libp2p/[email protected]/gossipsub.go:17:2: missing go.sum entry for module providing package github.com/libp2p/go-libp2p/core/record (imported by github.com/libp2p/go-libp2p-pubsub); to add:
	go get github.com/libp2p/[email protected]
../../go/pkg/mod/github.com/libp2p/[email protected]/discovery.go:11:2: missing go.sum entry for module providing package github.com/libp2p/go-libp2p/p2p/discovery/backoff (imported by github.com/libp2p/go-libp2p-pubsub); to add:
	go get github.com/libp2p/[email protected]
main.go:20:2: missing go.sum entry for module providing package github.com/libp2p/go-libp2p/p2p/discovery/mdns (imported by github.com/libp2p/universal-connectivity/go-peer); to add:
	go get github.com/libp2p/universal-connectivity/go-peer
main.go:21:2: missing go.sum entry for module providing package github.com/libp2p/go-libp2p/p2p/discovery/routing (imported by github.com/libp2p/universal-connectivity/go-peer); to add:
	go get github.com/libp2p/universal-connectivity/go-peer
main.go:22:2: missing go.sum entry for module providing package github.com/libp2p/go-libp2p/p2p/discovery/util (imported by github.com/libp2p/universal-connectivity/go-peer); to add:
	go get github.com/libp2p/universal-connectivity/go-peer
main.go:23:2: missing go.sum entry for module providing package github.com/libp2p/go-libp2p/p2p/transport/quic (imported by github.com/libp2p/universal-connectivity/go-peer); to add:
	go get github.com/libp2p/universal-connectivity/go-peer
main.go:24:2: missing go.sum entry for module providing package github.com/libp2p/go-libp2p/p2p/transport/websocket (imported by github.com/libp2p/universal-connectivity/go-peer); to add:
	go get github.com/libp2p/universal-connectivity/go-peer
main.go:25:2: missing go.sum entry for module providing package github.com/libp2p/go-libp2p/p2p/transport/webtransport (imported by github.com/libp2p/universal-connectivity/go-peer); to add:
	go get github.com/libp2p/universal-connectivity/go-peer
@maschad
Copy link
Member

maschad commented Sep 30, 2023

Running go mod tidy with go v1.21.1 should solve this, we currently have a PR open

@MichaelJCole
Copy link
Author

That worked, thank you!

I got the go version up and running, but I don't see how to connect it to the rust and browser version.

The only place I can add a multiaddr is on the web page, and all the go version's addresses are quic:

│Listening on: /ip4/127.0.0.1/udp/9095/quic-v1/p2p/12D3KooWHHK4cjPXQ64BdLP4SMDRjgmxQSDtyTsph9jgNQfZfXoo                                                       │
│Listening on: /ip4/127.0.0.1/udp/9095/quic-v1/webtransport/certhash/uEiDkbBzN7UzKA9UukoT-qJ58WMsG-WCZuga_eoZV0WHpLA/certhash/uEiAVKuA_YV1zymqLb9dY6QSOAn8j4gQ│
│g9rbwL87hESwVOA/p2p/12D3KooWHHK4cjPXQ64BdLP4SMDRjgmxQSDtyTsph9jgNQfZfXoo                                                                                     │
│Listening on: /ip4/192.168.50.93/udp/9095/quic-v1/p2p/12D3KooWHHK4cjPXQ64BdLP4SMDRjgmxQSDtyTsph9jgNQfZfXoo                                                   │
│Listening on: /ip4/192.168.50.93/udp/9095/quic-v1/webtransport/certhash/uEiDkbBzN7UzKA9UukoT-qJ58WMsG-WCZuga_eoZV0WHpLA/certhash/uEiAVKuA_YV1zymqLb9dY6QSOAn8│
│j4gQg9rbwL87hESwVOA/p2p/12D3KooWHHK4cjPXQ64BdLP4SMDRjgmxQSDtyTsph9jgNQfZfXoo  

Would it be difficult to add the websocket protocol to the go version? Just a thought, thanks for this library!

@maschad
Copy link
Member

maschad commented Oct 2, 2023

You can dial the rust peer over QUIC via the CLI and the js-peer over webtransport via the web page. It shouldn't be difficult to add websocket to the go version, I believe adding the transport here should suffice, but feel free to explore the go-libp2p repo for clearer docs.

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

2 participants