Open velison1-mbed opened 3 months ago
Ohhh, arm6l. Of course, I'd forgotten that arch...
Note to self: check the "arm7l" wheels to see if they're actually arm6l; if not, rebuild on raspios on a true arm6l board
I have installed swig with dockerfile and it fails building for arm64:
FROM python:3.11-slim-bullseye
ENV PYTHONUNBUFFERED=1 \
PIP_DISABLE_PIP_VERSION_CHECK=1 \
PYTHONDONTWRITEBYTECODE=1 \
PUID=1000\
PGID=1000
# Install system dependencies for PyAudio, evdev, and build tools
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc \
portaudio19-dev \
libevdev-dev \
supervisor \
swig \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements.txt to the container and install Python dependencies
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of the application code to the container
COPY . .
# Ensure the entrypoint script is executable
RUN chmod +x ./entrypoint.sh
# Expose the port the app runs on
EXPOSE 8010
ENTRYPOINT ["./entrypoint.sh"]
CMD ["supervisord", "-c", "/pi-audio-recorder/config/supervisord_docker.conf"]
252.2 Building wheel for lgpio (setup.py): finished with status 'error'
252.2 error: subprocess-exited-with-error
252.2
252.2 × python setup.py bdist_wheel did not run successfully.
252.2 │ exit code: 1
252.2 ╰─> [15 lines of output]
252.2 running bdist_wheel
252.2 running build
252.2 running build_py
252.2 running build_ext
252.2 building '_lgpio' extension
252.2 swigging lgpio.i to lgpio_wrap.c
252.2 swig -python -o lgpio_wrap.c lgpio.i
252.2 creating build
252.2 creating build/temp.linux-aarch64-cpython-311
252.2 gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Isrc -I/usr/local/include/python3.11 -c lgpio_wrap.c -o build/temp.linux-aarch64-cpython-311/lgpio_wrap.o
252.2 creating build/lib.linux-aarch64-cpython-311
252.2 gcc -pthread -shared build/temp.linux-aarch64-cpython-311/lgpio_wrap.o -L/usr/local/lib -llgpio -o build/lib.linux-aarch64-cpython-311/_lgpio.cpython-311-aarch64-linux-gnu.so
252.2 /usr/bin/ld: cannot find -llgpio
252.2 collect2: error: ld returned 1 exit status
252.2 error: command '/usr/bin/gcc' failed with exit code 1
252.2 [end of output]
252.2
252.2 note: This error originates from a subprocess, and is likely not a problem with pip.
252.2 ERROR: Failed building wheel for lgpio
252.2 Running setup.py clean for lgpio
@Ed1ks I noticed this line:
/usr/bin/ld: cannot find -llgpio
I had the same problem when trying to migrate my project from rpi3 to rpi4, and the only thing that worked was installing the lgpio module, following the instructions found here: https://abyz.me.uk/lg/download.html
Hope this helps!
Ohhh, arm6l. Of course, I'd forgotten that arch...
Note to self: check the "arm7l" wheels to see if they're actually arm6l; if not, rebuild on raspios on a true arm6l board
I just hit the same issue trying to install the lgpio package on a pi zero w (also armv6l). I had to do a pip install swig
since there appear to be dependency issues with the debian swig
package.
$ pip install rpi-lgpio
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting rpi-lgpio
Using cached https://www.piwheels.org/simple/rpi-lgpio/rpi_lgpio-0.6-py3-none-any.whl (11 kB)
Collecting lgpio>=0.1.0.1 (from rpi-lgpio)
Using cached lgpio-0.2.2.0.tar.gz (90 kB)
Preparing metadata (setup.py) ... done
Building wheels for collected packages: lgpio
Building wheel for lgpio (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [15 lines of output]
running bdist_wheel
running build
running build_py
running build_ext
building '_lgpio' extension
swigging lgpio.i to lgpio_wrap.c
swig -python -o lgpio_wrap.c lgpio.i
creating build
creating build/temp.linux-armv6l-cpython-311
arm-linux-gnueabihf-gcc -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -Isrc -I/home/pi/RPi-Jukebox-RFID/.venv/include -I/usr/include/python3.11 -c lgpio_wrap.c -o build/temp.linux-armv6l-cpython-311/lgpio_wrap.o
creating build/lib.linux-armv6l-cpython-311
arm-linux-gnueabihf-gcc -shared -Wl,-O1 -Wl,-Bsymbolic-functions -g -fwrapv -O2 build/temp.linux-armv6l-cpython-311/lgpio_wrap.o -L/usr/lib/arm-linux-gnueabihf -llgpio -o build/lib.linux-armv6l-cpython-311/_lgpio.cpython-311-arm-linux-gnueabihf.so
/usr/bin/ld: cannot find -llgpio: No such file or directory
collect2: error: ld returned 1 exit status
error: command '/usr/bin/arm-linux-gnueabihf-gcc' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for lgpio
Running setup.py clean for lgpio
Failed to build lgpio
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (lgpio)
I am attempting to dockerize my Python project on a Raspberry Pi Zero W. I am using the balenalib/raspberry-pi-python:3.11.2-bookworm-build base image. When I try to install the rpi-lgpio package, I encounter an error. Here are the details of the error: