schollz / find

High-precision indoor positioning framework for most wifi-enabled devices.
https://www.internalpositioning.com/
GNU Affero General Public License v3.0
5.03k stars 370 forks source link

can't build/compile #199

Closed 9H1LO closed 6 years ago

9H1LO commented 6 years ago

Ubuntu 16 on x86

git clone https://github.com/schollz/find.git cd find go get ./...

package context: unrecognized import path "context" Username for 'https://github.com': Password for 'https://github.com':

cd .; git clone https://github.com/foo/vendored /root/find/src/github.com/foo/vendored

Cloning into '/root/find/src/github.com/foo/vendored'... remote: Repository not found. fatal: Authentication failed for 'https://github.com/foo/vendored/' package github.com/thinkerou/favicon imports golang.org/x/sync/errgroup imports github.com/foo/vendored: exit status 128

is there some ready x86 binaries available or better documentation or an install method (apt?) not using "GO" as have no idea of it

schollz commented 6 years ago

Sorry! You don't need go get ./... anymore because all the libraries are vendored. But to use the vendored libraries you have to work in the GOPATH. I will update the documentation, but here is how you should build:

go get github.com/schollz/find
cd $GOPATH/src/github.com/schollz/find
go build
9H1LO commented 6 years ago

wow ! quick reply ! thanks i'll try that

9H1LO commented 6 years ago

what should $GOPATH be set to ?

root@haserver:~# cd find root@haserver:~/find# go get github.com/schollz/find package github.com/schollz/find: cannot download, $GOPATH not set. For more details see: go help gopath

9H1LO commented 6 years ago

set $GOPATH to the gitclone folder (/root/find/)....probably its not right as i'm getting lots of errors when doing go build

root@haserver:~/find# echo $GOPATH /root/find root@haserver:~/find# cd $GOPATH/src/github.com/schollz/find root@haserver:~/find/src/github.com/schollz/find# ls api.go cache_test.go fingerprint.go Makefile parameters_ffjson.go priors_test.go routes.go templates api_test.go data fingerprint_test.go mqtt.go parameters.go priorsThreaded.go server.go testing backup.go db.go Gopkg.lock mqtt_test.go parameters_test.go README.md static test_rf.py backup_test.go Dockerfile Gopkg.toml network.go posterior.go rf.go supervisord.conf utils.go BENCHMARKS.md FAQ.md LICENSE network_test.go posterior_test.go rf.py svm.go vendor cache.go fingerprint_ffjson.go macs.json NOTICE priors.go RF.py svm_test.go root@haserver:~/find/src/github.com/schollz/find# root@haserver:~/find/src/github.com/schollz/find# root@haserver:~/find/src/github.com/schollz/find# root@haserver:~/find/src/github.com/schollz/find# root@haserver:~/find/src/github.com/schollz/find# go build

gopkg.in/go-playground/validator.v8

../../../gopkg.in/go-playground/validator.v8/cache.go:25:7: error: reference to undefined identifier ‘atomic.Value’ m atomic.Value // map[reflect.Type]cStruct ^ ../../../gopkg.in/go-playground/validator.v8/cache.go:47:7: error: reference to undefined identifier ‘atomic.Value’ m atomic.Value // map[string]cTag ^ ../../../gopkg.in/go-playground/validator.v8/validator.go:152:23: error: reference to undefined identifier ‘sync.Pool’ errsPool *sync.Pool ^ ../../../gopkg.in/go-playground/validator.v8/validator.go:234:19: error: reference to undefined identifier ‘sync.Pool’ errsPool: &sync.Pool{New: func() interface{} { ^ ../../../gopkg.in/go-playground/validator.v8/validator.go:234:23: error: expected ‘,’ or ‘}’ errsPool: &sync.Pool{New: func() interface{} { ^ ../../../gopkg.in/go-playground/validator.v8/cache.go:177:7: error: expected map index on right hand side if tagsVal, found := v.aliasValidators[t]; found { ^ ../../../gopkg.in/go-playground/validator.v8/cache.go:247:23: error: expected map index on right hand side if current.fn, ok = v.validationFuncs[current.tag]; !ok { ^ ../../../gopkg.in/go-playground/validator.v8/util.go:54:3: error: not enough arguments to return return v.extractTypeInternal(current.Elem(), nullable)

schollz commented 6 years ago

See https://golang.org/doc/code.html#GOPATH

Also, maybe download the latest version of Go, as it will do it automatically

9H1LO commented 6 years ago

all i get is errors....is there no other way to get this without GO ? as its proving quite a headache

root@haserver:~/go/src/github.com/schollz/find# go version go version xgcc (Ubuntu 4.9.3-0ubuntu4) 4.9.3 linux/386

9H1LO commented 6 years ago

root@haserver:~/go/src/github.com/schollz/find# export GOPATH="/root/go"

root@haserver:~/go/src/github.com/schollz/find# cd $GOPATH/src/github.com/schollz/find

root@haserver:~/go/src/github.com/schollz/find# go build ../../boltdb/bolt/bolt_unix_solaris.go:10:2: cannot find package "golang.org/x/sys/unix" in any of: /usr/lib/go/src/pkg/golang.org/x/sys/unix (from $GOROOT) /root/go/src/golang.org/x/sys/unix (from $GOPATH)

schollz commented 6 years ago

Did you install Go with apt-get?

I'd suggest just downloading it - its easier: https://golang.org/doc/install#tarball

9H1LO commented 6 years ago

thanks schollz !

yes as a note to all others, GO was installed via apt and it didn't work for me

i downloaded and extracted the tarball and its running fine now

managed to build and run find

thanks again and all the best

schollz commented 6 years ago

Great! Let me know if you have more questions.