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

Cross compilation is not working in macOS for raspberry #21

Open
ckbonu opened this issue Dec 10, 2018 · 2 comments
Open

Cross compilation is not working in macOS for raspberry #21

ckbonu opened this issue Dec 10, 2018 · 2 comments

Comments

@ckbonu
Copy link

ckbonu commented Dec 10, 2018

env GOOS=linux GOARCH=arm GOARM=5 go build godht.go.

command-line-arguments

./godht.go:24:15: undefined: dht.DHT11
./godht.go:31:1: undefined: dht.ReadDHTxxWithRetry

This is example1

@ckbonu
Copy link
Author

ckbonu commented Dec 17, 2018

@d2r2 any ideas how can we migrate c library to gocode calculate the pulse data to actual values so that we can make total code independent of C.

That would be great deal for the people in IOT who wants to go with GO than python.

@d2r2
Copy link
Owner

d2r2 commented Dec 21, 2018

@ckbonu, hello. I have some historical reasons do not write whole library in Go: read README.md and you will find the answer.

Please, read #20 how to correctly perform "cross compilation". Honestly I don't know how cross complilation works on macOS (but I know how it works on Linux), but I guess you have a mistake in your command line (somehow you should have special c-compilter with ARM target architecture to be installed on your macOS).

Finally, download latest version of library, try to compile on macOS again (if you figure out how to get special c-compilter to you macOS), and let me know what happened.

@d2r2 d2r2 changed the title Build is not working in MAC for raspberry Build is not working in macOS for raspberry Dec 21, 2018
@d2r2 d2r2 changed the title Build is not working in macOS for raspberry Cross compilation is not working in macOS for raspberry Dec 21, 2018
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