Compiling the LoRa Gateway Bridge source-code

I’m trying to build from the github source and I keep running into the following when using the docker-compose.yml file to build a container.

I’m obviously doing something stupid, but I don’t know what. Any suggestions?

gatewaybridge_1 | Compiling source for linux arm
gatewaybridge_1 | internal/backend/mqttpubsub/backend.go:13:2: cannot find package “github.com/brocaar/loraserver/api/gw” in any of:
gatewaybridge_1 | /usr/local/go/src/github.com/brocaar/loraserver/api/gw (from $GOROOT)
gatewaybridge_1 | /go/src/github.com/brocaar/loraserver/api/gw (from $GOPATH)
gatewaybridge_1 | internal/backend/mqttpubsub/backend.go:14:2: cannot find package “github.com/brocaar/lorawan” in any of:
gatewaybridge_1 | /usr/local/go/src/github.com/brocaar/lorawan (from $GOROOT)
gatewaybridge_1 | /go/src/github.com/brocaar/lorawan (from $GOPATH)
gatewaybridge_1 | internal/gateway/backend.go:15:2: cannot find package “github.com/brocaar/lorawan/band” in any of:
gatewaybridge_1 | /usr/local/go/src/github.com/brocaar/lorawan/band (from $GOROOT)
gatewaybridge_1 | /go/src/github.com/brocaar/lorawan/band (from $GOPATH)
gatewaybridge_1 | internal/backend/mqttpubsub/backend.go:15:2: cannot find package “github.com/eclipse/paho.mqtt.golang” in any of:
gatewaybridge_1 | /usr/local/go/src/github.com/eclipse/paho.mqtt.golang (from $GOROOT)
gatewaybridge_1 | /go/src/github.com/eclipse/paho.mqtt.golang (from $GOPATH)
gatewaybridge_1 | internal/backend/mqttpubsub/backend.go:16:2: cannot find package “github.com/pkg/errors” in any of:
gatewaybridge_1 | /usr/local/go/src/github.com/pkg/errors (from $GOROOT)
gatewaybridge_1 | /go/src/github.com/pkg/errors (from $GOPATH)
gatewaybridge_1 | internal/backend/mqttpubsub/backend.go:17:2: cannot find package “github.com/sirupsen/logrus” in any of:
gatewaybridge_1 | /usr/local/go/src/github.com/sirupsen/logrus (from $GOROOT)
gatewaybridge_1 | /go/src/github.com/sirupsen/logrus (from $GOPATH)
gatewaybridge_1 | cmd/lora-gateway-bridge/cmd/configfile.go:9:2: cannot find package “github.com/spf13/cobra” in any of:
gatewaybridge_1 | /usr/local/go/src/github.com/spf13/cobra (from $GOROOT)
gatewaybridge_1 | /go/src/github.com/spf13/cobra (from $GOPATH)
gatewaybridge_1 | cmd/lora-gateway-bridge/cmd/root.go:13:2: cannot find package “github.com/spf13/viper” in any of:
gatewaybridge_1 | /usr/local/go/src/github.com/spf13/viper (from $GOROOT)
gatewaybridge_1 | /go/src/github.com/spf13/viper (from $GOPATH)
gatewaybridge_1 | make: *** [Makefile:10: build] Error 1

It looks like you forgot to run make requirements? See also https://www.loraserver.io/lora-gateway-bridge/community/source/.

I tried multiple ways. What I finally realized was the docker-compose.yml file built the requirements but not the actual gateway (using the Makefile-devel. When I did a docker build with the Dockerfile, it built everything using the actual Makefile.

Sorry for that @brocaar
That was my first message in this forum, I searched in my account to select and post the topic. But I didn’t find that.

I have my pre-environment setup development environment and running successfully.

Now i want to create the Complete LoRa Server environment with the help of github codes
I am first executing the make sudo command for Lora Gateway Bridge. This is the error :point_down:


@brocaar and @shuangcai_huang

I also did “make requirements”
Not working.

Thank You

Please see https://www.loraserver.io/lora-gateway-bridge/community/source/ for the commands to execute :slight_smile: I recommend you to use the provided Docker based development environment.