Latest blinka requires glibc 2.34 which is not available for RPi OS?

CircuitPython on hardware including Adafruit's boards, and CircuitPython libraries using Blinka on host computers.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Post Reply
User avatar
sfsdfd
 
Posts: 4
Joined: Sun Aug 27, 2023 7:21 am

Latest blinka requires glibc 2.34 which is not available for RPi OS?

Post by sfsdfd »

I'm working on a servo project using a Raspberry Pi 4B and a PCA9685 servo driver board. I have installed the latest Raspberry Pi OS, which is based on Debian Bullseye, and have run the usual commands (apt update, apt upgrade, pip install setuptools, etc.)

I am following the Adafruit CircuitPython guide:

https://learn.adafruit.com/adafruit-16- ... it-library

...which requires installing CircuitPython and Blinka, so I followed these steps:

https://learn.adafruit.com/circuitpytho ... spberry-pi

...including upgrading setuptools, wgetting and running the raspi-blinka.py script, and rebooting. All completed fine, and i2cdetect shows the servo board communicating on channel 40. So far, so good.

However, when I download and run blinkatest.py, I get this:

Code: Select all

  File "/home/pi/.pyenv/versions/3.11.5/lib/python3.11/site-packages/RPi/GPIO/__init__.py", line 23, in <module>
    from RPi._GPIO import *
ImportError: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.34' not found (required by /home/pi/.pyenv/versions/3.11.5/lib/python3.11/site-packages/RPi/_GPIO.cpython-311-arm-linux-gnueabihf.so)
That same error recurs whenever I try to import RPi.GPIO.

It appears that the latest version of blinka, including RPi.GPIO, requires glibc 2.34. Unfortunately, the latest Raspberry Pi OS ships with glibc 2.31.

I've done some searching for how to build a more up-to-date glibc from source, and the guidance appears to be: "Don't bother trying." (For instance: https://forums.raspberrypi.com/viewtopic.php?t=334896 )

Aside from just shelving this entire project until Raspberry Pi OS updates to Bookwork with a more recent glibc, what are my options?

User avatar
mikeysklar
 
Posts: 11727
Joined: Mon Aug 01, 2016 8:10 pm

Re: Latest blinka requires glibc 2.34 which is not available for RPi OS?

Post by mikeysklar »

What code are you using that is trying to use RPi.GPIO? The Blinka package has replaced all of that functionality for quite some time.

You should continue on this guide and these examples to start driving with your PCA9685.

User avatar
sfsdfd
 
Posts: 4
Joined: Sun Aug 27, 2023 7:21 am

Re: Latest blinka requires glibc 2.34 which is not available for RPi OS?

Post by sfsdfd »

mikeysklar wrote: Sat Sep 16, 2023 4:54 pm What code are you using that is trying to use RPi.GPIO? The Blinka package has replaced all of that functionality for quite some time.

You should continue on this guide and these examples to start driving with your PCA9685.
All of those examples use RPi.GPIO under the hood. For example, in your first link, the first example begins:

Code: Select all

import board
...and just running that one import in Python produces this:

Code: Select all

>> import board
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/pi/.pyenv/versions/3.11.5/lib/python3.11/site-packages/board.py", line 44, in <module>
    from adafruit_blinka.board.raspberrypi.raspi_4b import *
  File "/home/pi/.pyenv/versions/3.11.5/lib/python3.11/site-packages/adafruit_blinka/board/raspberrypi/raspi_4b.py", line 6, in <module>
    from adafruit_blinka.microcontroller.bcm2711 import pin
  File "/home/pi/.pyenv/versions/3.11.5/lib/python3.11/site-packages/adafruit_blinka/microcontroller/bcm2711/pin.py", line 5, in <module>
    from RPi import GPIO
  File "/home/pi/.pyenv/versions/3.11.5/lib/python3.11/site-packages/RPi/GPIO/__init__.py", line 23, in <module>
    from RPi._GPIO import *
ImportError: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.34' not found (required by /home/pi/.pyenv/versions/3.11.5/lib/python3.11/site-packages/RPi/_GPIO.cpython-311-arm-linux-gnueabihf.so)
And just to be clear - if you visit the Adafruit-Blinka github page and take a look at the current version of bcm2711/pin.py:

https://github.com/adafruit/Adafruit_Bl ... 711/pin.py

...and look at line 5:

Code: Select all

from RPi import GPIO

User avatar
mikeysklar
 
Posts: 11727
Joined: Mon Aug 01, 2016 8:10 pm

Re: Latest blinka requires glibc 2.34 which is not available for RPi OS?

Post by mikeysklar »

Good point about RPi.GPIO still being used under the hood.

Just to confirm what you said earlier:

You are running a stock Pi OS Bullseye system (May 11th release).

Is it 32bit or 64bit?

Desktop or Lite?

Are you using a custom compiler or kernel?

Not finding the newer GLIBC 2.34 has not shown up in the Adafruit Forums or CircuitPython github repo so I’m wondering if there something different about your install.

I’m asking the above so I can reproduce the issue.

Can you confirm that rolling back to the July blinka works as advertised?

Code: Select all

pip install Adafruit-Blinka==8.20.1
There have been five blinka releases in the last 10-days.

IMG_1358.jpeg
IMG_1358.jpeg (169.9 KiB) Viewed 47 times

User avatar
sfsdfd
 
Posts: 4
Joined: Sun Aug 27, 2023 7:21 am

Re: Latest blinka requires glibc 2.34 which is not available for RPi OS?

Post by sfsdfd »

mikeysklar wrote: Sun Sep 17, 2023 7:49 pmYou are running a stock Pi OS Bullseye system (May 11th release).

Is it 32bit or 64bit?

Desktop or Lite?
Stock, desktop, 32-bit. Literally just chose the default "Raspberry Pi OS" option from the top of the menu.
mikeysklar wrote: Sun Sep 17, 2023 7:49 pmAre you using a custom compiler or kernel?
No. The most configuration I've done is to add a couple of dtoverlay lines to enable an LCD touchscreen and amplifier. Everything else is stock.
mikeysklar wrote: Sun Sep 17, 2023 7:49 pmCan you confirm that rolling back to the July blinka works as advertised?
I tried this and encountered the same issue. I actually tried rolling all the way back to a mid-2022 release - same problem. The issue is arising in RPi.GPIO, and rolling back blinka to prior versions doesn't seem to affect the installed version of RPi.GPIO.

I also tried rolling RPi.GPIO from the latest version (0.7.1) to previous versions, 0.7.0 produced the same error, and anything before 0.7.0 wasn't available as a pywheel and couldn't be built from source.

Since I'm at a standstill with this project until I figure out this issue, I'm going to try starting from scratch by reimaging the microSD card and reinstalling blinka. I anticipate a low probability of success with this option, but I honestly don't know what else to try.

User avatar
sfsdfd
 
Posts: 4
Joined: Sun Aug 27, 2023 7:21 am

Re: Latest blinka requires glibc 2.34 which is not available for RPi OS?

Post by sfsdfd »

My reflashed Raspberry Pi OS install now runs just fine with Blinka and RPi.GPIO. No idea what I did wrong. Well, mystery solved... or at least, circumvented.

User avatar
mikeysklar
 
Posts: 11727
Joined: Mon Aug 01, 2016 8:10 pm

Re: Latest blinka requires glibc 2.34 which is not available for RPi OS?

Post by mikeysklar »

Thank you for follow up. Whatever went wrong with the previous install is a mystery to me as well. Fortunately, reloading a Pi is a pretty fast process.

Post Reply
Please be positive and constructive with your questions and comments.

Return to “Adafruit CircuitPython”