Compiling the LoRa App Server source-code

Yup… I m faccing this issue while doing make build

In that case, please try building using the Docker container first. If that works, you know it is related to your own development environment (outdated tools, packages, …).

Hi,

the code of “migrations_gen.go” generated different.
As shown in the following figure.
The left use “go build cmd/lora-app-server” can not success.
it says "./main.go:217: undefined: migrations.AssetDir
./main.go:475: undefined: static.AssetDir
./main.go:476: undefined: static.AssetInfo
"
But the right one can success.
Does anyone come across this problem?
Thank you!

You should not use go build cmd/lora-app-server, use make build (as documented: https://www.loraserver.io/lora-app-server/community/source/).

Thank you.
I use “make requirements ui-requirements"、“make clean”、“make build”,but not work.
Like this,

Is it a problem with “go-bindata”?

See the fatal error in your logs, that should not be there? Maybe because the lora-app-server directory is not a git clone?

Thank you.
I tried git clone.
But it doesn’t seem to be successful.

Hmm, that is odd. I don’t know what is causing that. Could you try using the provided Docker development container? At least then you have an environment that I can reproduce.

docker-compose run --rm appserver bash

And then the usual commands. All the project files and build artifacts will be shared with the Docker host :slight_smile:

Thank you.
Today it works.
Maybe because the computer was restarted.

thanks brocaar for your work, when i use the Docker development container with
docker-compose run --rm appserver bash
this happened
make requirements
Installing development tools
#github.com/goreleaser/nfpm/deb
../../goreleaser/nfpm/deb/deb.go:150:9: unknown field 'Format' in struct literal of type tar.Header
../../goreleaser/nfpm/deb/deb.go:232:9: unknown field 'Format' in struct literal of type tar.Header
../../goreleaser/nfpm/deb/deb.go:251:9: unknown field 'Format' in struct literal of type tar.Header
../../goreleaser/nfpm/deb/deb.go:268:10: unknown field 'Format' in struct literal of type tar.Header
make: *** [Makefile:74: requirements] Error 2
with version 0.19.0 and 0.18.2 works fine.

Could you try to rebuild the appserver image? (docker-compose build appserver)

1 Like

Hi guys!

I have compiled the 0.20.1 lora-app-gateway, and when i am trying to join the web interface i saw this:

When i go on swagger i got the REST Api. But i haven’t the other API :confused:

Thanks!!

This question has been asked before, I think the solution is already mentioned in this topic (I moved your message).

make requirements hangs up and do not respond anything for a long time. Any solution?

If you are using a proxy, don’t forget to set it in the console:

http_proxy=your_proxy_ip:your_proxy_port
https_proxy=your_proxy_ip:your_proxy_port

When i make requirements, i get the following error.
My guess is there is a version mismatch somewhere and am missing it.

$ make requirements
echo “Installing development tools”
Installing development tools
go get -u github-com/golang/lint/golint
go get -u github-com/brocaar/grpc-gateway/protoc-gen-grpc-gateway
github-com/brocaar/grpc-gateway/protoc-gen-grpc-gateway
…/…/…/github-com/brocaar/grpc-gateway/protoc-gen-grpc-gateway/main.go:65:21: not enough arguments in call to gengateway.New
have (“github-com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway/descriptor”.Registry, bool, string)
want (
“github-com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway/descriptor”.Registry, bool, string, string)

Any idea what might be wrong?

Thanks!

1 Like

Hi, I have the same issue running the command
docker-compose run --rm appserver bash

I’ve experienced the same issue…

Please pull the latest master and try again. It should be solved :slight_smile:

2 Likes