arduino / arduino-ide

Arduino IDE 2.x
https://www.arduino.cc/en/software
GNU Affero General Public License v3.0
2.25k stars 381 forks source link

ctags: bad CPU type in executable in macOS (2.0.0-beta.7) #433

Open hgrecco opened 3 years ago

hgrecco commented 3 years ago

Describe the bug Cannot Verify/Compile even simple examples (AnalogReadSerial.ino). ctags: bad CPU type in executable in macOS with

To Reproduce

Just run the any example.

Using board 'uno' from platform in folder: /Users/grecco/Library/Arduino15/packages/arduino/hardware/avr/1.8.3 Using core 'arduino' from platform in folder: /Users/grecco/Library/Arduino15/packages/arduino/hardware/avr/1.8.3 Detecting libraries used... /Users/grecco/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/Users/grecco/Library/Arduino15/packages/arduino/hardware/avr/1.8.3/cores/arduino -I/Users/grecco/Library/Arduino15/packages/arduino/hardware/avr/1.8.3/variants/standard /var/folders/xj/xsrq0ml15_q98sq78466mbwr000bjr/T/arduino-sketch-ECD2946323C50FF71A5DD32C03F77EE8/sketch/AnalogReadSerial.ino.cpp -o /dev/null Generating function prototypes... /Users/grecco/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/Users/grecco/Library/Arduino15/packages/arduino/hardware/avr/1.8.3/cores/arduino -I/Users/grecco/Library/Arduino15/packages/arduino/hardware/avr/1.8.3/variants/standard /var/folders/xj/xsrq0ml15_q98sq78466mbwr000bjr/T/arduino-sketch-ECD2946323C50FF71A5DD32C03F77EE8/sketch/AnalogReadSerial.ino.cpp -o /var/folders/xj/xsrq0ml15_q98sq78466mbwr000bjr/T/arduino-sketch-ECD2946323C50FF71A5DD32C03F77EE8/preproc/ctags_target_for_gcc_minus_e.cpp /Users/grecco/Library/Arduino15/packages/builtin/tools/ctags/5.8-arduino11/ctags -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives /var/folders/xj/xsrq0ml15_q98sq78466mbwr000bjr/T/arduino-sketch-ECD2946323C50FF71A5DD32C03F77EE8/preproc/ctags_target_for_gcc_minus_e.cpp Compilation error: Error: 2 UNKNOWN: fork/exec /Users/grecco/Library/Arduino15/packages/builtin/tools/ctags/5.8-arduino11/ctags: bad CPU type in executable

Expected behavior It should compile (and it does with Arudino 1.8.13.

Desktop (please complete the following information):

Additional context I also have Arduino 1.8.13 installed and there it works fine. It seems to be using a differen toolchain located in:

/Applications/Arduino.app/Contents/Java/tools-builder/ctags/5.8-arduino11/ctags
flatsiedatsie commented 2 years ago

I'm seeing this issue on M1 Macbook Pro, running Monterey 12.1. Upgrading to latest Arduino IDE 1.8.19 did not solve it.

It happened while trying to upload code to an Arduino Nano There is no problem with the checkmark (test) button, only when using the arrow (upload) button. I tried updating all libraries too, no effect. This also occurs with the basic blink sketch.

Could it be that part of the upload process is still 32 bit?

nickdesaulniers commented 1 year ago

possible dup of #1818 or #1796. @hgrecco @flatsiedatsie do you have rosetta installed?

flatsiedatsie commented 1 year ago

@nickdesaulniers Yes I have