Skip to content

xtensa-lx106-elf-g++: bad CPU type in executable on a M2 Mac without rosetta emulation installed #8725

Open
@aleroot

Description

@aleroot

I'm trying to compile and upload a sketch to a NodeMCU Lolin V3 board using arduino-cli_0.29.0_macOS_ARM64 but I get the following error whenever I try to compile:

alessio@AleMacBookPro Tools % ./arduino-cli compile --fqbn esp8266:esp8266:nodemcuv2 example



Used platform   Version Path                                                                    
esp8266:esp8266 3.0.2   /Users/alessio/Library/Arduino15/packages/esp8266/hardware/esp8266/3.0.2

Error during build: fork/exec /Users/alessio/Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/3.0.4-gcc10.3-1757bed/bin/xtensa-lx106-elf-g++: bad CPU type in executable

Looks clear that the executable file xtensa-lx106-elf-g++ has been built for x86-64 Mac instead of AMR64... How can I download the correct files for my architecture?

I have been following this procedure, the problem is that arduino-cli core install esp8266:esp8266 downloads the wrong architecture executables, it should download executables built for ARM64 instead of those for x86-64.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions