-
Notifications
You must be signed in to change notification settings - Fork 134
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
How can we compile for Raspberry pi? #127
Comments
Due to Cgo, it might be hard or impossible to do cross-compiling. How about compiling Oto on the same host machine (raspberry pi)? |
@codevin if you want to cross-compile you must use RPi toolchain/compiler, i.e.
In my distro, it is easy to install such a toolchain for whatever arch/platform, but you can start with https://github.com/raspberrypi/tools/tree/master/arm-bcm2708. |
This error occurs while trying to use gcc instead of arm compiler. If you want to compile for arm, you should install corresponding compiler and specify it in CC directive. I use arm-linux-gnueabi-gcc, but now have another not solved problem. |
I'm using the following Dockerfile to cross-compile my app for Raspberry:
bootstrap_pure.sh:
Docker build and compile commands defined in Makefile:
Hope it helps. |
With go options to compile for ARM (i.e. GOARCH=arm etc.), it won't compile without
having CGO_ENABLED=1. When I enabled CGO, I get following error.
gcc: error: unrecognized command line option '-marm'; did you mean '-mabm'?
Any help is appreciated.
The text was updated successfully, but these errors were encountered: