-
Notifications
You must be signed in to change notification settings - Fork 64
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 fails #21
Comments
Try running the following command before building the app:
This command should re-build |
I managed to build it with a C cross compiler: env CC=arm-linux-gnueabi-gcc GOOS=linux GOARCH=arm CGO_ENABLED=1 go build ./cmd/api/main.go But I could only do this on Linux. So I use docker to cross compile on a Mac. I'm not sure if your suggestion would work if I do it on macOS and use the resulted binary on an ARM architecture. |
My suggestion will work only when building binaries for host system. It doesn't work for cross-compilation :( |
That's ok, it can be done using docker, so that's good enough I'd say. I will close this issue, but maybe it's worth mentioning in the docs that one must use a C cross compiler and the appropriate flags when cross compiling. |
Agreed. Could you prepare the corresponding pull request? |
As reported in vmihailenco/taskq#55, if I try to cross compile a project that has a indirect dependency on this package I get:
The text was updated successfully, but these errors were encountered: