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

Illegal instruction on raspberry pi #257

Closed
long568 opened this issue May 29, 2024 · 2 comments
Closed

Illegal instruction on raspberry pi #257

long568 opened this issue May 29, 2024 · 2 comments

Comments

@long568
Copy link

long568 commented May 29, 2024

Build System:
MacBook M2 + Docker(Debian)
rustup 1.27.1 (54dd3d00f 2024-04-24)
rustc 1.78.0 (9b00956e5 2024-04-29)

Target System:
Raspberry Pi Zero 2 W + Raspberry Pi OS Lite 64bit

There are all aarch64-unknown-linux-gnu, I did some tests and they all worked fine.
Then I added once_cell to the code to build a singleton class. The code compiles fine and runs fine in docker, but after copying it to the Raspberry Pi, I get the aforementioned error:Illegal instruction
I guess it's trying to tell me that my program doesn't match the target instruction architecture.
Then I just delete once_cell and abandon the singleton class, the code works well on Raspberry Pi again.
So strange...

@briansmith
Copy link

What is the exact command line you are using to build your application? I'm guessing that this is due to rust-lang/rust#125033.

@matklad
Copy link
Owner

matklad commented Oct 31, 2024

This is potentially still an issue, but I can't debug this personally, and, as no one felt sufficiently motivated to dig into this so far, let's close this. Chances are this was an upstream rustc issue

@matklad matklad closed this as completed Oct 31, 2024
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

3 participants