matklad / once_cell

Rust library for single assignment cells and lazy statics without macros
Apache License 2.0
1.87k stars 109 forks source link

Illegal instruction on raspberry pi #257

Closed long568 closed 1 week ago

long568 commented 5 months ago

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 commented 5 months ago

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.

matklad commented 1 week ago

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