Add article re: "bad CPU type in executable" error #172
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We saw a spike in reports of this error following the recent release of the native Apple Silicon build of Arduino IDE.
Investigation showed that the affected users did not have the Rosetta 2 translation software required to run executables built for x86 (AKA "Intel") host architecture on Apple Silicon machines.
Previously, this condition was not likely to occur because macOS shows a dialog when the user starts an x86 application if Rosetta 2 is not already installed. But it turns out macOS doesn't do that if the x86 executable is run by a subprocess. So users of the Apple Silicon build of Arduino IDE do not get the dialog when starting Arduino IDE, since the application itself does not require Rosetta 2, but when Arduino IDE executes one of the helper tools (e.g., avr-gcc) that is not built for Apple Silicon, the process fails with the "
bad CPU in executable
" error.Changes proposed in this pull request
The solution is for the user to manually install Rosetta 2. Instructions for that are provided here.
The article is intended to be a comprehensive guide to solving the "
bad CPU type in executable
" error. This error may occur under other conditions than the one described above, so instructions for the resolution of the error as it occurs under those other conditions are also included.Additional information
Resolves arduino/arduino-ide#1818
Related
Please check