-
Notifications
You must be signed in to change notification settings - Fork 4
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
Compilation problems with Go v1.20 and 1.21 #3
Comments
@aabbtree77 if you agree, the reported problem should move to Also, |
I agree with you, go-libp2p doesn't support v1.21 yet, as indicated in #2468. Let's wait for the August 22-24 2023 release then, that should solve the problem #2428. After skimming through some issues I see that go-libp2p is quite actively developed with some breaking changes, I am afraid to touch any 3-5 year old libp2p codes now. I mostly need this to ssh into computers without proper IPs, and awl solves this fairly well for me, one can even get access to remote Linux terminal from Android, but it is slow and not so reliable, so I keep looking around. Eyeballing goose now. Ideally, also something free, open and simple/reliable to send a message from PC to PC directly in Go. This version stuff is such a mess everywhere. I spent an evening compiling Android code for awl, and I should probably report a similar issue there, but it takes time and I do not remember all the fixes anymore. |
I've had some experience actually adding the networking level required for connectivity so you could use ssh or any other regular network protocol. You can take a look at wireguard-go-vsock. It essentially implements a "Bind" that aims opening WireGuard over hosts with VSOCK. Of course in this case, as the objective is just to establish a TCP/IP stack host to guest, other more lightweight alternatives exist and may be more suitable, such as SOCAT. Anyways, once you establish this network link, you can use iptables to promote NAT (masquerade) to your guest. I leave it as another option to you case you feel it suits your needs. go-libp2p-vpn has only one advantage compared to all other projects you mentioned: it's very simple to hack. In fact it has been created as a proof of concept project, feel free to fork and modify as you want. |
The last error is due to a signature change in |
Which error you're referring to @mooijtech? |
@balena This one: # github.com/libp2p/go-libp2p/p2p/protocol/identify
../../go/pkg/mod/github.com/libp2p/go-libp2p@v0.29.2/p2p/protocol/identify/id.go:559:25: type func(a multiaddr.Multiaddr, b multiaddr.Multiaddr) bool of func(a, b ma.Multiaddr) bool {…} does not match inferred type func(a multiaddr.Multiaddr, b multiaddr.Multiaddr) int for func(a E, b E) int
../../go/pkg/mod/github.com/libp2p/go-libp2p@v0.29.2/p2p/protocol/identify/obsaddr.go:217:22: type func(first *observedAddr, second *observedAddr) bool of func(first, second *observedAddr) bool {…} does not match inferred type func(a *observedAddr, b *observedAddr) int for func(a E, b E) int There is a pull request to fix this but it hasn't been merged. |
Interesting @mooijtech but from the error message I can't infer the problem comes from this project but from go-libp2p |
Correct this issue is from go-libp2p. |
Turning the line "go 1.19" to "go 1.21" inside go.mod, followed by "go mod tidy" does not change anything.
Afterwards, I bump up the Go version, enforce "latest" and remove the indirects:
Running "go mod tidy" now brings all the latest versions:
Oddly, I get nearly the same quic-go issue:
I could also note that in the past I have been able to solve this quic-go issue when going from Go v1.16 to v1.19, but not this time.
It is possible to get through this go-quic error by experimenting with different versions of Go (1.20 or 1.21), go-libp2p, and go-quic, but I do not remember precise numbers anymore and there were still some go-libp2p errors about generic type conversions thrown in the end of the compilation of this code with go build.
One can find examples where go-libp2p works with go-quic and Go v1.20. No doubt it is possible to hunt for correct versions there, but I would like to avoid that and move on to Go v1.21.
The code compiles with Go v19.12.
The text was updated successfully, but these errors were encountered: