Description
Bug Report
Current behavior
$ arduino-cli compile --fqbn arduino:avr:nano AnalogSensors/AnalogSensors.ino
Error during build: build failed: fork/exec /home/balsoft/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino5/bin/avr-g++: no such file or directory
The build fails because the toolchain (downloaded to ~/.arduino15/packages
) has /lib/ld-linux-x86-64.so.2
set as interpreter. While it might work on FHS systems, it doesn't work on mine. I can solve this by patching the executables (for i in $(find /home/balsoft/.arduino15 -t file); do patchelf --set-interpreter /nix/store/xlxiw4rnxx2dksa91fizjzf7jb5nqghc-glibc-2.27/lib/ld-linux-x86-64.so.2 $i; done
) but it is a flimsy solution and won't work long-term (it'll break after the next glibc update and garbage collection).
Expected behavior
It works out of the box, independent of the location of ld-linux-x86-64.so.2
. This can be achieved by building the toolchain statically.
Environment
- CLI version (output of
arduino-cli version
):0.0.0-git Commit:
(in reality it's built from master branch) The expression is here: https://github.com/balsoft/nur-packages/tree/master/pkgs/arduino-cli - OS and platform: NixOS GNU/Linux 20.03
Additional context
I'm not sure this should be reported here. If it isn't, please close the issue and redirect me to the correct place.