-
-
Notifications
You must be signed in to change notification settings - Fork 229
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
About Static compilation gcc: error: unrecognized argument in option '-mabi=32' #484
Comments
I have the same problem, how did you solve it? |
Hi @tower111, do you have the same environment as the original poster? We don't currently support cross-compilation on Windows (only Linux is supported and GOARCH=mipsle will be supported on future version). |
Hi @veeableful , I'm trying to build statically for mipsle:
I use the latest go-sdl2: The error that I'm getting:
Can you suggest how to fix this? Thanks. |
Hi @geniot, we currently don't support mipsle but I'll see if I can add support for it this week! |
It will be particularly useful because SDL2 is not everywhere the same. |
Hi @geniot, could you try the master branch and use the following command to build and run the executable? It does require the use of
|
Thanks @veeableful . After refactoring some sdl calls in my program I saw a big list of undefineds.
Now it takes some time to compile!
Update: |
Hi @geniot, sorry I didn't update for additional libraries like ttf, img, and mix. I have pushed another update to the |
Thanks @veeableful . I see some progress (but maybe it's not related to your changes). I can now successfully build with:
But the resulting binary fails to start on PocketGo:
And if I just use:
I'm getting:
which makes sense. /usr/mipsel-linux-gnu/lib doesn't have it. If I use my toolchain's compiler I get a lot of errors like this:
|
Hi @geniot, thanks for testing it again. I think I will need to look into integrating uClibc in the cross-compilation as we currently assume glibc as the C standard library. I won't be around until next month so I think I'll order the device for testing and continue implementing the support once it arrives! |
Hi @veeableful, I don't think you need the device (PocketGo2v2? - it's rather old and a bit noisy). |
Thanks for the information @geniot! I was actually having trouble finding a place to order the device 😅 I will try the toolchain and see if I can make use of it. |
main.go
build.bat
run it
gcc version 8.1.0 (x86_64-posix-sjlj-rev0, Built by MinGW-W64 project)
go version go1.16.4 windows/amd64
What should I do to complete the compilation from windows to mips, thank you.
The text was updated successfully, but these errors were encountered: