Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doesn't compile due to references to paypal/gatt in examples #1

Closed
gr4ssi opened this issue Jun 22, 2016 · 2 comments
Closed

doesn't compile due to references to paypal/gatt in examples #1

gr4ssi opened this issue Jun 22, 2016 · 2 comments

Comments

@gr4ssi
Copy link

gr4ssi commented Jun 22, 2016

When doing go install in the folder github.com/cfreeman/WeatherMachine2-hrm I get errors:

../gatt/device_linux.go:7:2: cannot find package "github.com/paypal/gatt/linux" in any of:
        /usr/local/go/src/github.com/paypal/gatt/linux (from $GOROOT)
        /root/work/src/github.com/paypal/gatt/linux (from $GOPATH)
../gatt/device_linux.go:8:2: cannot find package "github.com/paypal/gatt/linux/cmd" in any of:
        /usr/local/go/src/github.com/paypal/gatt/linux/cmd (from $GOROOT)
        /root/work/src/github.com/paypal/gatt/linux/cmd (from $GOPATH)
../gatt/linux/cmd/cmd.go:10:2: cannot find package "github.com/paypal/gatt/linux/evt" in any of:
        /usr/local/go/src/github.com/paypal/gatt/linux/evt (from $GOROOT)
        /root/work/src/github.com/paypal/gatt/linux/evt (from $GOPATH)
../gatt/linux/cmd/cmd.go:11:2: cannot find package "github.com/paypal/gatt/linux/util" in any of:
        /usr/local/go/src/github.com/paypal/gatt/linux/util (from $GOROOT)
        /root/work/src/github.com/paypal/gatt/linux/util (from $GOPATH)

I looked into the file github.com/cfreeman/gatt/examples/option/option_linux.go and there, the paypal/gatt is still referenced.
To resolve this, you can use sed:

cd ${GOPATH}/github.com/cfreeman/gatt
find ./ -type f -exec sed -i -e 's/paypal/cfreeman/g' {} \;   # This removes references to paypal 

After I did this, WeatherMachine2-scan and WeatherMachine2-hrm both compiled.

@gr4ssi
Copy link
Author

gr4ssi commented Jun 22, 2016

Also, I had issues with compiling on go 1.3. I did an install of go1.5 now on the raspi, and the error is gone.
I followed this excellent tutorial: http://dave.cheney.net/2015/09/04/building-go-1-5-on-the-raspberry-pi

@cfreeman
Copy link
Owner

Sorry about that. I left the original paypal references to make it easier for them to merge: paypal/gatt#60 -- Unfortunately it hasn't been merged yet.

If you shoot through a pull request with the updated references I will merge them here.

Should also compile with go1.6. Official builds for the Pi (armv6l) are also available from the download page: https://golang.org/dl/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants