I've got an app that I'm trying to get working again after wiping my system and installing Snow Leopard. I installed Ruby 1.9 from Macports (now a later version) and the dev server starts up just fine, but then dies on the first request, only telling me "Illegal instruction". I have no idea what's causing this or even how to go about debugging it. Does anyone have any ideas?
Asked
Active
Viewed 1,121 times
3
-
Could you post the code? Have you tried other Rubies (using RVM)? – Pistos Apr 20 '10 at 12:53
-
I've tried installing the exact patch level that's on my server right now (and working greatly), but even that crashed. I even tried running the same version of Ramaze; no dice. It's gotta be something with how it's compiling, but I can't figure it out. – Phil Kulak Apr 21 '10 at 00:40
2 Answers
3
"Illegal instruction" is usually an error message from the CPU meaning some piece of binary code you tried to run contained an instruction that is not implemented on that particular CPU.
This can have multiple reasons:
- The binary was compiled with optimization settings for the wrong CPU. The CPU vendors add new instructions all the time, if the compiler optimizes for a CPU that is newer than the one you have, it might have emitted an instruction that your CPU doesn't understand.
- The compiler is broken.
- The binary is corrupted.
- The code you are compiling contains assembly code or intrinsics containing instructions that your CPU doesn't have.

Jörg W Mittag
- 363,080
- 75
- 446
- 653