Compiling the LoRa Server source-code


#22

I follow this operation, but the hint is wrong.

What am I gonna do?thanks


#23

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


#24


This can be compiled.


#25

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.


#26

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.


#27

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:


#28

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 (https://github.com/brocaar/lora-app-server/blob/master/Dockerfile#L24) 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 (https://github.com/brocaar/lora-app-server/blob/master/docker-compose.yml) 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.


#29

i have same error .I Solve it by global proxy


#30

if chat?please join QQ:978575821


#31

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


#32

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


#33

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.


#37

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!