New IDE install on new MacBook Pro M2 not working

can't check or compile any sample sketches
new laptop downloaded and installed IDE no work - updated to 2,3.3 still no
MacBook Pro 14.6.1 IDE 2.3.3

avr-g++: internal compiler error: Killed: 9 (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See https://gcc.gnu.org/bugs/ for instructions.
exit status 4

Compilation error: exit status 4

I have installed IDE 1.8.19 and get the same error:
avr-g++: internal compiler error: Killed: 9 (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See https://gcc.gnu.org/bugs/ for instructions.
exit status 4
/Applications/Arduino.app/Contents/Java/arduino-builder returned 4
Error compiling for board Arduino Uno.

Can anybody help? (yes I have submitted a report - no reply)

I tried IDE 2.3.3 on old iMac 13.2.1 (intel) and it works fine. Must have something to do with the M2 or 14.6.1

I assume you installed the Silicon Mac version on the M2 Mac. I have an M3 and no issues.

Put the ARM version of 2.3.3 on the M2, load the blink sketch, select in preferences verbose compile. If it fais post entire error log in code tags ^^ if it compiles turn off compile verboise, tuen on upload verbose and if failure post entire error log in code tags.

1 Like

Verbose = compile

/Applications/Arduino.app/Contents/Java/arduino-builder -dump-prefs -logger=machine -hardware /Applications/Arduino.app/Contents/Java/hardware -hardware /Users/edwardunderwood/Library/Arduino15/packages -tools /Applications/Arduino.app/Contents/Java/tools-builder -tools /Applications/Arduino.app/Contents/Java/hardware/tools/avr -tools /Users/edwardunderwood/Library/Arduino15/packages -built-in-libraries /Applications/Arduino.app/Contents/Java/libraries -libraries /Users/edwardunderwood/Documents/Arduino/libraries -fqbn=arduino:avr:uno -vid-pid=2341_0001 -ide-version=10819 -build-path /var/folders/lv/lxk9nf7n1ks0s5l698yl6mv40000gn/T/arduino_build_103948 -warnings=default -build-cache /var/folders/lv/lxk9nf7n1ks0s5l698yl6mv40000gn/T/arduino_cache_339983 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=/Users/edwardunderwood/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=/Users/edwardunderwood/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avrdude.path=/Users/edwardunderwood/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17 -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=/Users/edwardunderwood/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17 -prefs=runtime.tools.arduinoOTA.path=/Users/edwardunderwood/Library/Arduino15/packages/arduino/tools/arduinoOTA/1.3.0 -prefs=runtime.tools.arduinoOTA-1.3.0.path=/Users/edwardunderwood/Library/Arduino15/packages/arduino/tools/arduinoOTA/1.3.0 -verbose /Applications/Arduino.app/Contents/Java/examples/01.Basics/Blink/Blink.ino
/Applications/Arduino.app/Contents/Java/arduino-builder -compile -logger=machine -hardware /Applications/Arduino.app/Contents/Java/hardware -hardware /Users/edwardunderwood/Library/Arduino15/packages -tools /Applications/Arduino.app/Contents/Java/tools-builder -tools /Applications/Arduino.app/Contents/Java/hardware/tools/avr -tools /Users/edwardunderwood/Library/Arduino15/packages -built-in-libraries /Applications/Arduino.app/Contents/Java/libraries -libraries /Users/edwardunderwood/Documents/Arduino/libraries -fqbn=arduino:avr:uno -vid-pid=2341_0001 -ide-version=10819 -build-path /var/folders/lv/lxk9nf7n1ks0s5l698yl6mv40000gn/T/arduino_build_103948 -warnings=default -build-cache /var/folders/lv/lxk9nf7n1ks0s5l698yl6mv40000gn/T/arduino_cache_339983 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=/Users/edwardunderwood/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=/Users/edwardunderwood/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avrdude.path=/Users/edwardunderwood/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17 -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=/Users/edwardunderwood/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17 -prefs=runtime.tools.arduinoOTA.path=/Users/edwardunderwood/Library/Arduino15/packages/arduino/tools/arduinoOTA/1.3.0 -prefs=runtime.tools.arduinoOTA-1.3.0.path=/Users/edwardunderwood/Library/Arduino15/packages/arduino/tools/arduinoOTA/1.3.0 -verbose /Applications/Arduino.app/Contents/Java/examples/01.Basics/Blink/Blink.ino
Using board 'uno' from platform in folder: /Users/edwardunderwood/Library/Arduino15/packages/arduino/hardware/avr/1.8.6
Using core 'arduino' from platform in folder: /Users/edwardunderwood/Library/Arduino15/packages/arduino/hardware/avr/1.8.6
Detecting libraries used...
/Users/edwardunderwood/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=10819 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/Users/edwardunderwood/Library/Arduino15/packages/arduino/hardware/avr/1.8.6/cores/arduino -I/Users/edwardunderwood/Library/Arduino15/packages/arduino/hardware/avr/1.8.6/variants/standard /var/folders/lv/lxk9nf7n1ks0s5l698yl6mv40000gn/T/arduino_build_103948/sketch/Blink.ino.cpp -o /dev/null
Error while detecting libraries included by /var/folders/lv/lxk9nf7n1ks0s5l698yl6mv40000gn/T/arduino_build_103948/sketch/Blink.ino.cpp
Generating function prototypes...
/Users/edwardunderwood/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=10819 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/Users/edwardunderwood/Library/Arduino15/packages/arduino/hardware/avr/1.8.6/cores/arduino -I/Users/edwardunderwood/Library/Arduino15/packages/arduino/hardware/avr/1.8.6/variants/standard /var/folders/lv/lxk9nf7n1ks0s5l698yl6mv40000gn/T/arduino_build_103948/sketch/Blink.ino.cpp -o /var/folders/lv/lxk9nf7n1ks0s5l698yl6mv40000gn/T/arduino_build_103948/preproc/ctags_target_for_gcc_minus_e.cpp
avr-g++: internal compiler error: Killed: 9 (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.
exit status 4
/Applications/Arduino.app/Contents/Java/arduino-builder returned 4
Error compiling for board Arduino Uno.

verbose = upload



avr-g++: internal compiler error: Killed: 9 (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.
exit status 4
/Applications/Arduino.app/Contents/Java/arduino-builder returned 4
Error compiling for board Arduino Uno.

1 Like

There is definitely an error there, but it's not one I have seen before and to me it's not obvious what the fix is. Hopefully, one of the Arduino experts will see this and lend support.

Thank for your effort. I've submitted a bug report but who knows how far down the list I am. I do have my iMac I can use but I wanted to use my M2.

Have not heard from an Arduino experts

Purchased an Uno R4 WiFi and with 1.8 or 2.0 IDE gives me the same error.

Java? That looks like IDE 1.x, not 2.x. Be sure to download and use the "Apple Silicon" arm64 version.

The programs that failed are part of the board's tools, not the IDE. But there may be some flags or magic bits that make the difference. Out of curiosity, you can try three commands in a Terminal

$ file `find ~/Library/Arduino15/packages/arduino/tools -name 'avr-g++'`
<long path snipped>/bin/avr-g++: Mach-O 64-bit executable x86_64
$ file `find ~/Library/Arduino15/packages/arduino/tools -name 'cc1plus'`
<long path snipped>/libexec/gcc/avr/7.3.0/cc1plus: Mach-O 64-bit executable x86_64
$ file "$(find /Applications/Arduino\ IDE.app -name 'Arduino IDE')"
/Applications/Arduino IDE.app/Contents/MacOS/Arduino IDE: Mach-O 64-bit executable x86_64

On an Intel Mac, they're x86_64. I wonder what you get when you install the board on Apple Silicon. After getting the right IDE going, you might try removing the board(s) and reinstalling.

1 Like

So you know, your are dealing with someone who can turn the Mac on and use what I know. Not a technical person, you have been warned. Thank you for your reply. I have tried to run the terminal commands and posted 3 replies in order. I have an Intel based iMac and a MacBook Pro M.2 and I have 1.8.13 and 2.3.3 on both, yes I have the arm64 versions on the MacBook. I have no issues on the Intel iMac with either IDE and all the boards and libs. updated and work. I have a nano, UNO R3, Mega and now a UNO R4 WiFi and none of them work on the MacBook, they all work on the iMac.

The idea is to run the file command on the results of the find command, by surrounding the latter with backticks

$ file `find ~/Library/Arduino15/packages/arduino/tools -name 'avr-g++'`

which can handle multiple files, as in the case with cc1plus

$ file `find ~/Library/Arduino15/packages/arduino/tools -name 'cc1plus'`

or something fancier when there is a single file with spaces in its name

$ file "$(find /Applications/Arduino\ IDE.app -name 'Arduino IDE')"

The results will be easier to see and use when posted as <CODE/>

In the meantime, you have two cc1plus, which is the program that was killed because of an "internal compiler error". One is for arm, but it is not the same version as the other one, which matches the (not-arm) avr-g++

I don't have an Apple Silicon Mac, so can't say whether this is normal.

edwardunderwood@Edwards-MBP ~ % find ~/Library/Arduino15/packages/arduino/tools -name 'avr-g++'
/Users/edwardunderwood/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++
edwardunderwood@Edwards-MBP ~ % file /Users/edwardunderwood/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++
/Users/edwardunderwood/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++: Mach-O 64-bit executable x86_64
edwardunderwood@Edwards-MBP ~ % 

edwardunderwood@Edwards-MBP ~ % find ~/Library/Arduino15/packages/arduino/tools -name 'cc1plus'
/Users/edwardunderwood/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/libexec/gcc/avr/7.3.0/cc1plus
/Users/edwardunderwood/Library/Arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/lib/gcc/arm-none-eabi/7.2.1/cc1plus
edwardunderwood@Edwards-MBP ~ % file /Users/edwardunderwood/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/libexec/gcc/avr/7.3.0/cc1plus
/Users/edwardunderwood/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/libexec/gcc/avr/7.3.0/cc1plus: Mach-O 64-bit executable x86_64
edwardunderwood@Edwards-MBP ~ % file /Users/edwardunderwood/Library/Arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/lib/gcc/arm-none-eabi/7.2.1/cc1plus
/Users/edwardunderwood/Library/Arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/lib/gcc/arm-none-eabi/7.2.1/cc1plus: Mach-O 64-bit executable x86_64
edwardunderwood@Edwards-MBP ~ %