Tiny Core Linux
Tiny Core Base => Raspberry Pi => Topic started by: DrRob on December 08, 2023, 05:40:00 PM
-
Hi,
I'm using piCore 14.0 on a Pi Zero W. I installed the python3.11-rpi-gpio package but there's a problem with it:
tc@box:~$ python3
Python 3.11.4 (main, Aug 22 2023, 19:25:35) [GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import RPi.GPIO
Illegal instruction
I'm not sure where to go from here... help!
Thanks,
Rob.
-
seems I copied the aarch64 version of the extension here. should be fixed.
One thing to note is that RPI.GPIO is going obsolete in future releases. The way the kernel handles gpio is changing.
-
Thank you, Paul.
However, this is strange - I removed and reinstalled the package, and it looks like I've got the updated file, but I'm still seeing the same error:
tc@box:~$ file /tmp/tcloop/python3.11-rpi-gpio/usr/local/lib/python3.11/site-packages/RPi/_GPIO.cpython-311-arm-linux-gnueabihf.so
/tmp/tcloop/python3.11-rpi-gpio/usr/local/lib/python3.11/site-packages/RPi/_GPIO.cpython-311-arm-linux-gnueabihf.so: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, stripped
tc@box:~$ python3
Python 3.11.4 (main, Aug 22 2023, 19:25:35) [GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import RPi.GPIO
Illegal instruction
What am I doing wrong?
-
Meanwhile I've worked around it by installing the package with pip3 (after installing all the dependencies it needed).
For what it's worth, I was trying to install the Python neopixel lib, which requires the blinka lib, which requires RPi.GPIO. Hopefully Adafruit will update those libraries before RPi.GPIO changes...
-
file will not show you the required instruction set. You need readelf for that. python is getting super problematic, when building using pip/setuptools and a pi4 to build code.
I just re-uploaded, and then fired up a pizero and tested it out. Should be fine now.... if you are using the main repo. If using a mirror, it might take a day to update.
tc@pi:~$ readelf -A /usr/local/lib/python3.11/site-packages/RPi/_GPIO.cpython-311-arm-linux-gnueabihf.so
Attribute Section: aeabi
File Attributes
Tag_CPU_name: "6ZK"
Tag_CPU_arch: v6KZ
Tag_ARM_ISA_use: Yes
Tag_THUMB_ISA_use: Thumb-1
Tag_FP_arch: VFPv2
Tag_ABI_PCS_wchar_t: 4
Tag_ABI_FP_denormal: Needed
Tag_ABI_FP_exceptions: Needed
Tag_ABI_FP_number_model: IEEE 754
Tag_ABI_align_needed: 8-byte
Tag_ABI_align_preserved: 8-byte, except leaf SP
Tag_ABI_enum_size: int
Tag_ABI_VFP_args: VFP registers
Tag_CPU_unaligned_access: v6
Tag_Virtualization_use: TrustZone
tc@pi:~$ python3
Python 3.11.4 (main, Aug 22 2023, 19:25:35) [GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import RPi.GPIO
>>>
-
Well python is a changing too. Virtual environments is going to be forced down your throat soon too.
-
That worked, thanks.