Jetson Nano Pygame Illegal instruction (core dumped)

I already manage to install pygame on the Jetson nano with some difficulties using the pygame guide:

Even with some errors i finally manage to install it but this error appears:

and on every execution on python3 just says Illegal instruction (core dumped)

How can i solve this?


I have not looked very closely at this, but I see it uses a cross compiler, “aarch64-linux-gnu-gcc”. I wonder if it just couldn’t find this command (you might set your build script to explicitly give the full path of aarch64-linux-gnu-gcc), but more likely it produced or consumed code which differs across architectures. An example would be that if the code being compiled uses SSE instructions from an amd64 machine, then trying to compile on aarch64 would fail with an illegal instruction since aarch64 doesn’t have SSE. Or vice-versa, e.g., a thumb2 instruction exists on aarch64, but not on amd64.

If it is a case of not finding the compiler, then that’s easy to fix. If it is a case of using a bad mix of specialty code (e.g., SSE or thumb2) across architectures, then you’d have to find a way to cut out that specialty code (or find a compatibility option).

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.