{SOLVED}install SAMD boards in IDE on rpi4-exit status 127

Installed the Arduino IDE on my new rpi4. loaded up a uno with blink to check it out and everything worked fine.
But after I used the boards manager to install the samD boards for my MKR wifi 1010 the IDE will not even open. The intro screen comes up then goes away and the IDE itself never comes up.

Any idea's what may be causing this?

1 Like

If you run arduino from the terminal, what output do you get?

Which version of the Arduino IDE are you using?

Thanks that told me I had installed the IDE in the wrong place. I fixed that and the IDE will now open. This is with 1.8.10 downloaded from the Arduino site.

Unfortunately now when I compile I get an "exit status 127" error shown below.
In order to stay below the 9000 char limit I removed a bunch of "using previously compiled file" lines (core files)

[Arduino: 1.8.10 (Linux), Board: "Arduino MKR WiFi 1010"

/home/pi/Public/arduino-1.8.10/arduino-builder -dump-prefs -logger=machine -hardware /home/pi/Public/arduino-1.8.10/hardware -hardware /home/pi/.arduino15/packages -tools /home/pi/Public/arduino-1.8.10/tools-builder -tools /home/pi/Public/arduino-1.8.10/hardware/tools/avr -tools /home/pi/.arduino15/packages -built-in-libraries /home/pi/Public/arduino-1.8.10/libraries -libraries /home/pi/Arduino/libraries -fqbn=arduino:samd:mkrwifi1010 -vid-pid=0X2341_0X8054 -ide-version=10810 -build-path /tmp/arduino_build_235776 -warnings=none -build-cache /tmp/arduino_cache_583269 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.bossac.path=/home/pi/.arduino15/packages/arduino/tools/bossac/1.7.0-arduino3 -prefs=runtime.tools.bossac-1.7.0-arduino3.path=/home/pi/.arduino15/packages/arduino/tools/bossac/1.7.0-arduino3 -prefs=runtime.tools.CMSIS-Atmel.path=/home/pi/.arduino15/packages/arduino/tools/CMSIS-Atmel/1.2.0 -prefs=runtime.tools.CMSIS-Atmel-1.2.0.path=/home/pi/.arduino15/packages/arduino/tools/CMSIS-Atmel/1.2.0 -prefs=runtime.tools.arduinoOTA.path=/home/pi/.arduino15/packages/arduino/tools/arduinoOTA/1.2.1 -prefs=runtime.tools.arduinoOTA-1.2.1.path=/home/pi/.arduino15/packages/arduino/tools/arduinoOTA/1.2.1 -prefs=runtime.tools.CMSIS.path=/home/pi/.arduino15/packages/arduino/tools/CMSIS/4.5.0 -prefs=runtime.tools.CMSIS-4.5.0.path=/home/pi/.arduino15/packages/arduino/tools/CMSIS/4.5.0 -prefs=runtime.tools.openocd.path=/home/pi/.arduino15/packages/arduino/tools/openocd/0.10.0-arduino7 -prefs=runtime.tools.openocd-0.10.0-arduino7.path=/home/pi/.arduino15/packages/arduino/tools/openocd/0.10.0-arduino7 -prefs=runtime.tools.arm-none-eabi-gcc.path=/home/pi/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4 -prefs=runtime.tools.arm-none-eabi-gcc-7-2017q4.path=/home/pi/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4 -verbose /home/pi/Public/arduino-1.8.10/examples/01.Basics/Blink/Blink.ino
/home/pi/Public/arduino-1.8.10/arduino-builder -compile -logger=machine -hardware /home/pi/Public/arduino-1.8.10/hardware -hardware /home/pi/.arduino15/packages -tools /home/pi/Public/arduino-1.8.10/tools-builder -tools /home/pi/Public/arduino-1.8.10/hardware/tools/avr -tools /home/pi/.arduino15/packages -built-in-libraries /home/pi/Public/arduino-1.8.10/libraries -libraries /home/pi/Arduino/libraries -fqbn=arduino:samd:mkrwifi1010 -vid-pid=0X2341_0X8054 -ide-version=10810 -build-path /tmp/arduino_build_235776 -warnings=none -build-cache /tmp/arduino_cache_583269 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.bossac.path=/home/pi/.arduino15/packages/arduino/tools/bossac/1.7.0-arduino3 -prefs=runtime.tools.bossac-1.7.0-arduino3.path=/home/pi/.arduino15/packages/arduino/tools/bossac/1.7.0-arduino3 -prefs=runtime.tools.CMSIS-Atmel.path=/home/pi/.arduino15/packages/arduino/tools/CMSIS-Atmel/1.2.0 -prefs=runtime.tools.CMSIS-Atmel-1.2.0.path=/home/pi/.arduino15/packages/arduino/tools/CMSIS-Atmel/1.2.0 -prefs=runtime.tools.arduinoOTA.path=/home/pi/.arduino15/packages/arduino/tools/arduinoOTA/1.2.1 -prefs=runtime.tools.arduinoOTA-1.2.1.path=/home/pi/.arduino15/packages/arduino/tools/arduinoOTA/1.2.1 -prefs=runtime.tools.CMSIS.path=/home/pi/.arduino15/packages/arduino/tools/CMSIS/4.5.0 -prefs=runtime.tools.CMSIS-4.5.0.path=/home/pi/.arduino15/packages/arduino/tools/CMSIS/4.5.0 -prefs=runtime.tools.openocd.path=/home/pi/.arduino15/packages/arduino/tools/openocd/0.10.0-arduino7 -prefs=runtime.tools.openocd-0.10.0-arduino7.path=/home/pi/.arduino15/packages/arduino/tools/openocd/0.10.0-arduino7 -prefs=runtime.tools.arm-none-eabi-gcc.path=/home/pi/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4 -prefs=runtime.tools.arm-none-eabi-gcc-7-2017q4.path=/home/pi/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4 -verbose /home/pi/Public/arduino-1.8.10/examples/01.Basics/Blink/Blink.ino
Using board 'mkrwifi1010' from platform in folder: /home/pi/.arduino15/packages/arduino/hardware/samd/1.8.4
Using core 'arduino' from platform in folder: /home/pi/.arduino15/packages/arduino/hardware/samd/1.8.4
Detecting libraries used...
/home/pi/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/bin/arm-none-eabi-g++ -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10810 -DARDUINO_SAMD_MKRWIFI1010 -DARDUINO_ARCH_SAMD -DUSE_ARDUINO_MKR_PIN_LAYOUT -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x8054 -DUSBCON "-DUSB_MANUFACTURER=\"Arduino LLC\"" "-DUSB_PRODUCT=\"Arduino MKR WiFi 1010\"" -DUSE_BQ24195L_PMIC -I/home/pi/.arduino15/packages/arduino/tools/CMSIS/4.5.0/CMSIS/Include/ -I/home/pi/.arduino15/packages/arduino/tools/CMSIS-Atmel/1.2.0/CMSIS/Device/ATMEL/ -I/home/pi/.arduino15/packages/arduino/hardware/samd/1.8.4/cores/arduino -I/home/pi/.arduino15/packages/arduino/hardware/samd/1.8.4/variants/mkrwifi1010 /tmp/arduino_build_235776/sketch/Blink.ino.cpp -o /dev/null
Generating function prototypes...
/home/pi/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/bin/arm-none-eabi-g++ -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10810 -DARDUINO_SAMD_MKRWIFI1010 -DARDUINO_ARCH_SAMD -DUSE_ARDUINO_MKR_PIN_LAYOUT -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x8054 -DUSBCON "-DUSB_MANUFACTURER=\"Arduino LLC\"" "-DUSB_PRODUCT=\"Arduino MKR WiFi 1010\"" -DUSE_BQ24195L_PMIC -I/home/pi/.arduino15/packages/arduino/tools/CMSIS/4.5.0/CMSIS/Include/ -I/home/pi/.arduino15/packages/arduino/tools/CMSIS-Atmel/1.2.0/CMSIS/Device/ATMEL/ -I/home/pi/.arduino15/packages/arduino/hardware/samd/1.8.4/cores/arduino -I/home/pi/.arduino15/packages/arduino/hardware/samd/1.8.4/variants/mkrwifi1010 /tmp/arduino_build_235776/sketch/Blink.ino.cpp -o /tmp/arduino_build_235776/preproc/ctags_target_for_gcc_minus_e.cpp
/home/pi/Public/arduino-1.8.10/tools-builder/ctags/5.8-arduino11/ctags -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives /tmp/arduino_build_235776/preproc/ctags_target_for_gcc_minus_e.cpp
Compiling sketch...
/home/pi/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/bin/arm-none-eabi-g++ -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD -DF_CPU=48000000L -DARDUINO=10810 -DARDUINO_SAMD_MKRWIFI1010 -DARDUINO_ARCH_SAMD -DUSE_ARDUINO_MKR_PIN_LAYOUT -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x8054 -DUSBCON "-DUSB_MANUFACTURER=\"Arduino LLC\"" "-DUSB_PRODUCT=\"Arduino MKR WiFi 1010\"" -DUSE_BQ24195L_PMIC -I/home/pi/.arduino15/packages/arduino/tools/CMSIS/4.5.0/CMSIS/Include/ -I/home/pi/.arduino15/packages/arduino/tools/CMSIS-Atmel/1.2.0/CMSIS/Device/ATMEL/ -I/home/pi/.arduino15/packages/arduino/hardware/samd/1.8.4/cores/arduino -I/home/pi/.arduino15/packages/arduino/hardware/samd/1.8.4/variants/mkrwifi1010 /tmp/arduino_build_235776/sketch/Blink.ino.cpp -o /tmp/arduino_build_235776/sketch/Blink.ino.cpp.o
Compiling libraries...
Compiling core...
Using previously compiled file: /tmp/arduino_build_235776/core/variant.cpp.o


Using previously compiled file: /tmp/arduino_build_235776/core/USB/USBCore.cpp.o
/home/pi/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/bin/arm-none-eabi-ar rcs /tmp/arduino_build_235776/core/core.a /tmp/arduino_build_235776/core/pulse_asm.S.o
/home/pi/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/bin/arm-none-eabi-ar: error while loading shared libraries: libfl.so.2: cannot open shared object file: No such file or directory
exit status 127
Error compiling for board Arduino MKR WiFi 1010./code]

EDIT: still compiles/loads fine using a Uno just not the MKR

Even though this is related to the toolchain for the Arduino 33 BLE boards, rather than for the Arduino SAMD Boards toolchain you're using, it looks relevant:

One possible solution would be to roll back to the last release of Arduino SAMD Boards before they switched to using arm-none-eabi-gcc 7-2017q4. Unfortunately, that does mean going back to 1.6.21 and losing whatever other improvements have been made to Arduino SAMD Boards since that time. If you want to do that:

  • Tools > Board > Boards Manager
  • Wait for the download to finish.
  • Click on "Arduino SAMD Boards (32-bits ARM Cortex-M0+)".
  • From the "Select version" menu, select "1.6.21".
  • Click the "Install" button.
  • Wait for the installation to finish.
  • Click the "Close" button.

Other than that, I could only suggest that you read the issue report I linked above and try to follow what they did there.

@pert you are a major asset to this forum Thank You!! again.

For any others who may have this issue here is the solution I used:

In the terminal navigate to this folder: (Don't forget the "." at the beginning) .arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/lib

Then install the missing library:sudo apt install libfl2

1 Like

You're welcome. I'm glad if I am able to be of assistance. Enjoy!
Per

I run into the same troubles...
Thanks a lot for posting this solution!!!

All the best Andreas