Compiling the LoRa Server source-code

Hi,
How to solve it?
编译

Please see: https://docs.loraserver.io/loraserver/community/source/

And make sure the source has been cloned into $GOPATH/src/github.com/brocaar/loraserver.

Thank you very much.There is a problem.

@niushaolong seems like a networking issue, see “connection refused”

As a general note, I’ve removed the vendor/ folder from the git repository and moved the dependency management from govendor to dep.

The dependencies are now managed through a Gopkg.toml (containing the dependencies and desired version constraints) and Gopkg.lock (the current state, locked to a specific commit).

When executing make requirements the dep binary will be automatically installed after which dep ensure is called which will re-create the vendor/ folder matching the state of Gopkg.lock.

Thank you.
When I use “make requirements”,it will connecting some website that my country can not visit,and generate error.
So I tried another way,use “sudo make”,but there is an error say “migrations.AssetDir” is not define.
How can I solve it?

issue
@niushaolong @brocaar

Hi,
what is that mean?

Who has a souce-code that can be compiled directly,Please send me a copy.(niuzhao@newcapec.net)
Thank you very much.

i am also confused with the compling errors,after i have updated the projected today.



what can i do to solve these errors?
tnx.

Hi friends,

I tried to build the LoRa Server source code without docker on Ubuntu 16.04 ,but when I execute the “sudo make” under the “$GOPATH/src/github.com/brocaar/loraserver” directory, an error occured “undefined migrations.AssetDir” . How to solve this?

Thank you!
Climb

try this,
https://github.com/brocaar/loraserver/issues/168

Hi ,
Thank you.@shuangcai_huang
Just now , I tried this ,but it still doesn’t work,
when excute “apt-get autoremove go-bindata”, and "make build " it remind that it needs go bindata.

hi climb,
sorry, I’ve never meet this error before. but I saw this problem on that link which I given you.
please take a note at the error reported after your command executed,I doubt this error cause by a define about “migrations.AssetDir” can not be find,and this define should be implemented by internal/migrations/migrations_gen.go,you should take a look at your compile folder and search for migrations_gen.go file first. Acorreding to this error that link mentioned if there is no migrations_gen.go file you should use “make statics” to produce migrations_gen.go file.
Another,please take a look at main.go’s the first line,this line want to produce migrations_gen.go file,if you already have this file,I think you can comment this line.
If you can not find migrations_gen.go,you need to produce it first. the fist line of main.go can do this. i don’t think you need to remove “go-bindata” tools,it seems you need it to produce that file.

As mentioned above, you first need to use make requirements. This is documented here: https://docs.loraserver.io/loraserver/community/source/

I downloaded your new commits for this error. But I still get the same error. It has haunted me for a week.

I have the same error before.
To solve it,you should can connect the foreign country website,if you in China.

Yes, I am in China. I am sure I can connect all foreign website. But the URL has been redirected to https://godoc.org/golang.org/x/tools/go/loader. I have tried curl, and get the redirect message.

I have tried go get requirements in Makefile manually and still get the same error.

That seems network related as the IP to which you’re redirected seems to be blocked. Maybe use a VPN?

When you’re upgrading from LoRa Server which contained a vendor/ folder to the latest version where the vendor/ folder was removed, you might need to do a rm -rf vendor/ and run make requirements again to re-create it. This has been reported by a couple of users and should solve the issue.

I’m gonna put the code in there into $GOPATH/src/github.com/brocaar/loraserver.
I can compile it at version 0.23.1, but compile 0.23.2 can go wrong.

Compiler output:
.\device_profile.go:38:48: multiple-value uuid.NewV4() in single-value context
How to solve it?

Thank you!

Did you see my comment above your post and did you try that?