Compiling the LoRa Server source-code

I follow this operation, but the hint is wrong.

What am I gonna do?thanks

Maybe share why it is wrong / what error you’re getting :wink:


This can be compiled.

Hi brocaar
I have resolved this problem(not @zhufeng’s)
This is really network issue( GFW- Chinese own).
My solution:
1. Change the makefile statements “make requirements”, add “-v” in command go get -u. Because I need where errors occur.
2. Add my proxy tools installation in Docker-devel file. ( I have tried most of the methods to make docker be able to work behind a proxy, but I failed. Don’t know why, so just install a proxy into the lora server docker directly)

Now I run make requirements \ make build \make test successfully.

Ps: Chinese coders are hard.

1 Like

This is what I experienced:

  1. I ran docker-compose run --rm loraserver bash
  2. The container builds for the first time, seems that everything in the dockerfile is executed.
    2.1 There is no /build folder in path the shell spawned in.

From here I don’t really understand what’s going on. This is how I continued:

  1. I used the make commands, and then run the executable in the /build folder.

The main questions: Is this the correct way? I think it’s weird mainly because I see in the output the first time I run docker-compose run --rm loraserver bash that the Dockerfile is executed (which contains the make arguments).

Second questions: I specified the - port value in the docker-compose file, but I still can’t access the GUI via https://localhost:8080

Thanks in advanced.

1 Like

Where did you read that the build is at /build? If that is somewhere in the docs, then it should be fixed. Regardless of using Docker or not the compiled binaries are stored under ./build (relative to the project root).

Second questions: I specified the - port value in the docker-compose file, but I still can’t access the GUI via https://localhost:8080

The docker-compose.yml file does not include LoRa App Server (the GUI). It only provides a development environment for compiling LoRa Server and running the tests. You can extend the docker-compose.yml file, but I leave that as an exercise for you you :slight_smile:

It is not in the documentation. I tried to understand it via the code, because the information on how to use docker and build from source was very short - and my thought was that everything below that chapter does not refer to docker. Here (chirpstack-application-server/Dockerfile at master · brocaar/chirpstack-application-server · GitHub) docker copies the files from the build folder (that is created via the make command) and then execute the compiled binaries.

Regarding my first question: Was that the correct way?

But this (chirpstack-application-server/docker-compose.yml at master · brocaar/chirpstack-application-server · GitHub) is included? I just added the arguments that was missing from here (https://docs.loraserver.io/install/docker/#docker-compose).

I’m sorry for all the questions.

1 Like

i have same error .I Solve it by global proxy

1 Like

if chat?please join QQ:978575821

I encountered the same problem on windows 7 and modified the code in a similar way before compiling it.

every time I compile the lora source code i get these errors.

make: dep: Command not found
Makefile:50: recipe for target ‘requirements’ failed
make: *** [requirements] Error 127

I have searched a lot of solutions in google but none of them are working. I know its a golang issue but I will be thankful if I get a solution here

Please check the source of the requirements target:

requirements:
	@go get -u github.com/kisielk/errcheck
	@go get -u github.com/golang/lint/golint
	@go get -u github.com/kardianos/govendor
	@go get -u github.com/smartystreets/goconvey
	@go get -u golang.org/x/tools/cmd/stringer
	@go get -u github.com/golang/protobuf/proto
	@go get -u github.com/golang/protobuf/protoc-gen-go
	@go get -u github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger
	@go get -u github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway
	@go get -u github.com/elazarl/go-bindata-assetfs/...
	@go get -u github.com/jteeuwen/go-bindata/...
	@go get -u github.com/golang/dep/cmd/dep
	@go get -u github.com/goreleaser/goreleaser
	@dep ensure -v

You will see that the last command is failing, where dep is executed. This tool is installed a couple of lines above go get -u github.com/golang/dep/cmd/dep.

Hi Brocaar,

I have a same problem as JerryCui mentioned,and I am in China too :sweat_smile:

the purpose of “make dev-requirements” is to get the file in vendor/

So mabe could you please share me with the file you have download?

thanks and regards!

Hii @brocaar

I am getting problem while build loraserver repository

@brocaar
I having this issue also? can i know how to solve it?

Hi,@brocaar
I use
docker-compose run --rm loraserver bash
to build the loraserver, But I got the following error, what is the problem?

my docker, docker-compose, git, go‘s version:

I am confused about this error, please help ,thanks.

1 Like

Facing difficulty in debugging this though it seems easy for someone.help me in debugging this
installed GO language using command
sudo snap install go --classic
go version =>go version go1.12.9 linux/amd64
then cloning the git repository git clone https://github.com/brocaar/loraserver.git
cd loraserver
sudo make dev-requirements
sudo make
I am getting the go-bindata executable file not found in $PATH
so i did go get -u github.com/jteeuwen/go-bindata/
as @brocaar said
not worked for me
then i found the bin directory where dev-requirements were installed i did
export PATH=$PATH:$GOPATH/bin

giving same Error

help me !!

ignore my english please

This works for me:

# make sure the container is up-to-date
docker-compose build loraserver

# enter bash shell in container
docker-compose run --rm loraserver bash

# install dev requirements
make dev-requirements

# compile
make build

Again, see https://www.loraserver.io/loraserver/community/source/ for instructions. No need to install Go yourself and no need for any sudo!

2 Likes

Thank you for your fast reply sir.
I did the following instructions you sent to me.Worked for me too.

Facing issues in connecting to Postgresql Database.How to do that sir??
do we need to change dsn?? in loraserver.toml

Thanks & regards,
Sadashiv