once_cell icon indicating copy to clipboard operation
once_cell copied to clipboard

Illegal instruction on raspberry pi

Open long568 opened this issue 1 year ago • 1 comments

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...

long568 avatar May 29 '24 07:05 long568

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

briansmith avatar Jun 01 '24 00:06 briansmith

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 avatar Oct 31 '24 07:10 matklad