Skip to content

Doesn't work on non-FHS systems #87

Open
@balsoft

Description

@balsoft

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

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.

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