ipfs / kubo

An IPFS implementation in Go
https://docs.ipfs.tech/how-to/command-line-quick-start/
Other
16.14k stars 3.02k forks source link

Compiling from source: "undefined: netroute.New" #7687

Open jcea opened 4 years ago

jcea commented 4 years ago

I am trying to compile "ipfs-go-0.6.0" in Solaris, no success:

[root@XXX /tmp/go-ipfs-0.6.0]# go version
go version go1.14.4 solaris/amd64

[root@XXX /tmp/go-ipfs-0.6.0]# make nofuse
go version go1.14.4 solaris/amd64
bin/check_go_version 1.14.2
plugin/loader/preload.sh > plugin/loader/preload.go
go fmt plugin/loader/preload.go >/dev/null
go build  "-asmflags=all='-trimpath='" "-gcflags=all='-trimpath='" -ldflags="-X "github.com/ipfs/go-ipfs".CurrentCommit=" -tags="nofuse" -o "cmd/ipfs/ipfs" "github.com/ipfs/go-ipfs/cmd/ipfs"
# github.com/libp2p/go-nat
/root/go/pkg/mod/github.com/libp2p/go-nat@v0.0.5/gateway.go:10:17: undefined: netroute.New
# github.com/libp2p/go-reuseport-transport
/root/go/pkg/mod/github.com/libp2p/go-reuseport-transport@v0.0.3/multidialer.go:46:20: undefined: netroute.New
# github.com/libp2p/go-libp2p-quic-transport
/root/go/pkg/mod/github.com/libp2p/go-libp2p-quic-transport@v0.6.0/reuse.go:123:20: undefined: netroute.New
# github.com/libp2p/go-libp2p-kad-dht
/root/go/pkg/mod/github.com/libp2p/go-libp2p-kad-dht@v0.8.2/dht_filters.go:133:26: undefined: netroute.New
make: *** [cmd/ipfs/Rules.mk:22: cmd/ipfs/ipfs] Error 2

I can not program "go", so I can not do futher progress by myself.

Help!.

Thanks

welcome[bot] commented 4 years ago

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:

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

aschmahmann commented 4 years ago

@jcea the netroute library (https://github.com/libp2p/go-netroute) helps with figuring out network information which is useful in determining things like what IP address + port combinations your node tells other nodes about and deciding whether the DHT should run in client or server mode in the default configuration.

Since this low level information is platform specific and not just handed to us by Go this error means there is not yet an implementation for Solaris.

@willscott any idea if this is easy to do?

jcea commented 4 years ago

I don't program "go", but I will be happy to test whatever source code you provide and I have pretty deep Solaris sysadmin skills.

willscott commented 4 years ago

Recommendations on somewhere to spin up a solaris VM to test against? without that it's gonna be a bit of blind guessing.

My guess is that the solaris syscall API looks like it'll be closest to linux so we'll add it in the buildtags here https://github.com/libp2p/go-netroute/blob/master/netroute_linux.go#L7