Closed matthijskooijman closed 6 years ago
Having this problem too:
$ go get -u github.com/TheThingsNetwork/packet_forwarder
package github.com/TheThingsNetwork/ttn/api/gateway: cannot find package "github.com/TheThingsNetwork/ttn/api/gateway" in any of:
/usr/lib/go-1.8/src/github.com/TheThingsNetwork/ttn/api/gateway (from $GOROOT)
/home/vagrant/go/src/github.com/TheThingsNetwork/ttn/api/gateway (from $GOPATH)
package github.com/TheThingsNetwork/ttn/api/discovery: cannot find package "github.com/TheThingsNetwork/ttn/api/discovery" in any of:
/usr/lib/go-1.8/src/github.com/TheThingsNetwork/ttn/api/discovery (from $GOROOT)
/home/vagrant/go/src/github.com/TheThingsNetwork/ttn/api/discovery (from $GOPATH)
package github.com/TheThingsNetwork/ttn/api/fields: cannot find package "github.com/TheThingsNetwork/ttn/api/fields" in any of:
/usr/lib/go-1.8/src/github.com/TheThingsNetwork/ttn/api/fields (from $GOROOT)
/home/vagrant/go/src/github.com/TheThingsNetwork/ttn/api/fields (from $GOPATH)
package github.com/TheThingsNetwork/ttn/api/protocol: cannot find package "github.com/TheThingsNetwork/ttn/api/protocol" in any of:
/usr/lib/go-1.8/src/github.com/TheThingsNetwork/ttn/api/protocol (from $GOROOT)
/home/vagrant/go/src/github.com/TheThingsNetwork/ttn/api/protocol (from $GOPATH)
package github.com/TheThingsNetwork/ttn/api/protocol/lorawan: cannot find package "github.com/TheThingsNetwork/ttn/api/protocol/lorawan" in any of:
/usr/lib/go-1.8/src/github.com/TheThingsNetwork/ttn/api/protocol/lorawan (from $GOROOT)
/home/vagrant/go/src/github.com/TheThingsNetwork/ttn/api/protocol/lorawan (from $GOPATH)
package github.com/TheThingsNetwork/ttn/api/router: cannot find package "github.com/TheThingsNetwork/ttn/api/router" in any of:
/usr/lib/go-1.8/src/github.com/TheThingsNetwork/ttn/api/router (from $GOROOT)
/home/vagrant/go/src/github.com/TheThingsNetwork/ttn/api/router (from $GOPATH)
The build instructions say to use
go get
, which AFAICS clones the latest version of all dependencies. However, that does not neccesarily work (for example, the latest version of the ttn package does not work, I believe this is the cause of #77).I originally started this issue suggesting to use some kind of vendoring approach. However, while writing it I found out that
govendor
is already installed bymake dev-deps
and used bymake deps
. However, thego get -u github.com/TheThingsNetwork/packet_forwarder
suggested by the build instructions already fetches dependencies, and then returns failure becausepacket_forwarder
cannot be compiled against them. To fix that, you should probably usegit clone
instead ofgo get
to fetchpacket_forwarder
.If you do that, a secondary problem is that, AFAICS,
govendor
is not installed into PATH by default, makingmake deps
fail. This could either be fixed in the build instructions, or perhaps be fixed in the makefile by prepending$GOPATH/bin
toPATH
.Combining the above suggestions, this is what I used to successfully build, on a system with no prior go environment set up.