waveform80 / rpi-lgpio

A compatibility shim for lgpio emulating the RPi.GPIO API
https://rpi-lgpio.readthedocs.io/
Other
13 stars 8 forks source link

Error on importing in raspberry pi #13

Open Gautam023 opened 6 months ago

Gautam023 commented 6 months ago

I am getting an error while importing the library. The error is

" ImportError: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.33' not found (required by /usr/local/lib/python3.9/dist-packages/_lgpio.cpython-39-arm-linux-gnueabihf.so) "

I am on Raspbian (bullseye). The latest GLIBC for it is only 2.31.

waveform80 commented 3 months ago

Hmm, looks like the armhf wheels definitely need a rebuild (first for ARM6 compatibility and secondly for this)

binokaryg commented 3 months ago

Hmm, looks like the armhf wheels definitely need a rebuild (first for ARM6 compatibility and secondly for this)

Yes, please!

muellma8SICKAG commented 3 months ago

I had this Problem to it seems for me that the Package is not build correctly. When installing the package over the lgpio-0.2.2.0.tar.gz file and building it on the System and installing the RPi.lgpio Package, afterward everything works fine. This is because by using the tar.gz file for the installation, you build the c library which lies underneath the lgpio package yourself. So it does not get installed by the dependency management of the RPi.lgpio package. So I think the Problem is that the pre-build lgpio package for the Raspberry Pi is flawed because this library is missing or not build correctly. I hope this helps everyone until the Problem gets fixed properly.

jmidgren commented 1 month ago

When installing the package over the lgpio-0.2.2.0.tar.gz file and building it on the System and installing the RPi.lgpio Package

I tried to do exactly this, @muellma8SICKAG, but I was not successful. I still ended up with dependency towards the newer glibc 2.33.

This is how I did (in a fresh venv):

tar xzf rpi-lgpio-release-0.6.tar.gz
cd rpi-lgpio-release-0.6
python3 ./setup.py build
python3 ./setup.py install

I suspect that I do the exact same thing that pip actually does, so could you elaborate on how you managed to make it do build against the version of the glibc that is on the system?