schollz / find3

High-precision indoor positioning framework, version 3.
https://www.internalpositioning.com/doc
MIT License
4.65k stars 366 forks source link

Main server build instructions? #111

Closed doronbehar closed 6 years ago

doronbehar commented 6 years ago

I would like to package find3 main server for Arch Linux, I couldn't find instructions for building the it from source. While in server/main I tried to run the commands in the Makefile but I got the following errors for go build:

main.go:14:2: cannot find package "github.com/schollz/find3/server/main/src/api" in any of:
        /usr/lib/go/src/github.com/schollz/find3/server/main/src/api (from $GOROOT)
        /home/doron/.go/src/github.com/schollz/find3/server/main/src/api (from $GOPATH)
main.go:15:2: cannot find package "github.com/schollz/find3/server/main/src/database" in any of:
        /usr/lib/go/src/github.com/schollz/find3/server/main/src/database (from $GOROOT)
        /home/doron/.go/src/github.com/schollz/find3/server/main/src/database (from $GOPATH)
main.go:16:2: cannot find package "github.com/schollz/find3/server/main/src/mqtt" in any of:
        /usr/lib/go/src/github.com/schollz/find3/server/main/src/mqtt (from $GOROOT)
        /home/doron/.go/src/github.com/schollz/find3/server/main/src/mqtt (from $GOPATH)
main.go:17:2: cannot find package "github.com/schollz/find3/server/main/src/server" in any of:
        /usr/lib/go/src/github.com/schollz/find3/server/main/src/server (from $GOROOT)
        /home/doron/.go/src/github.com/schollz/find3/server/main/src/server (from $GOPATH)

And for dep ensure:

could not find project Gopkg.toml, use dep init to initiate a manifest

From my little understanding of go development, after dep ensure the 1st errors won't appear but there is no Gopkg.toml in the repo.

schollz commented 6 years ago

First get dependencies:

$ sudo apt-get install g++
$ sudo apt-get install mosquitto-clients mosquitto
$ go get -u -v github.com/schollz/find3/...

Then start the AI server:

$ cd $GOPATH/src/github.com/schollz/find3/server/ai
$ sudo python3 -m pip install -r requirements.txt
$ make

Then start main server:

$ cd $GOPATH/src/github.com/schollz/find3/server/main
$ go build -v
$ ./main -port 8005 

These instructions are at https://www.internalpositioning.com/doc/server_setup.md