LibreElec + Python + SPI + RFID Reader (RC 552)

  • Hello together,

    I am having trouble following along this tutorial while using LibreElec 8 instead of Raspbian, which is for practical and eco reasons. I have installed the rpi-tools-addon in order to have GPIO available in python. For SPI functionality the tutorial uses this git. Now, when I am trying to install it with the included setup.py I get this:

    Bash
    #############:~/downloads/SPI-Py # python setup.py install
    running install
    running build
    running build_ext
    building 'spi' extension
    /home/chewitt/LibreELEC.82-images/build.LibreELEC-RPi2.arm-8.2.4/toolchain/bin/host-gcc -pthread -fno-strict-aliasing -O2 -Wall -pipe -I/home/chewitt/LibreELEC.82-images/build.LibreELEC-RPi2.arm-8.2.4/toolchain/include -Wno-format-security -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c spi.c -o build/temp.linux-armv7l-2.7/spi.o
    unable to execute '/home/chewitt/LibreELEC.82-images/build.LibreELEC-RPi2.arm-8.2.4/toolchain/bin/host-gcc': No such file or directory
    error: command '/home/chewitt/LibreELEC.82-images/build.LibreELEC-RPi2.arm-8.2.4/toolchain/bin/host-gcc' failed with exit status 1

    I am not too much into Linux but I guess this is strongly related to LibreElec and it's limitations towards compiling or something. Does anybody have an idea for a workaround or a solution or a somewhat alternative to the mentioned git? Any help is really appreciated.

    I originally posted this on reddit. Thanks in advance!

  • LibreELEC is an embedded appliance-like OS with no build/compile tools. You will need to cross-compile the code from another machine and then either copy the binary over or create your own LE image that includes the binary. If you run LE 9.0 development builds instead of LE 8.0 releases you'll have the same base kernel as Raspbian which may allow the easier binary-copy option.

  • [...]. If you run LE 9.0 development builds instead of LE 8.0 releases you'll have the same base kernel as Raspbian which may allow the easier binary-copy option.

    Tanks for your replay. I already wondered who chewitt is in the error message :)

    So basically I'm just preparing a spare SD card with Libreelec 9.0 dev build and try the exact same thing? Which are the respective binaries then?

  • You need to build the binaries on a 'similar' OS like Raspbian then copy them over to /storage on the LE9.0 install to see if they work for whatever you're trying to acheive. If you "try the same thing" running the script on an LE9.0 image you will get the same result; there are still no build/compile tools in the OS and it will still fail.