Cannot build 3.11.4 on Raspberry pi #105706
Copy link
Copy link
Closed as not planned
Labels
buildThe build process and cross-buildThe build process and cross-buildpendingThe issue will be closed if no feedback is providedThe issue will be closed if no feedback is providedtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
During make -j 4 after having configured optimizations :
The installed version of openssl is 1.1.1n-0+deb11u4+rpt1
fatal error: ffi.h: No such file or directory
118 | #include <ffi.h>
| ^~~~~~~
compilation terminated.
gcc -pthread -shared -fno-semantic-interposition build/temp.linux-aarch64-3.11/home/sure/Python-3.11.4/Modules/xxlimited_35.o -L/usr/lib/arm-linux-gnueabihf -L/usr/local/lib -o build/lib.linux-aarch64-3.11/xxlimited_35.cpython-311-arm-linux-gnueabihf.so
gcc -pthread -shared -fno-semantic-interposition build/temp.linux-aarch64-3.11/home/sure/Python-3.11.4/Modules/_decimal/_decimal.o Modules/_decimal/libmpdec/libmpdec.a -L/usr/lib/arm-linux-gnueabihf -L/usr/local/lib -lm -o build/lib.linux-aarch64-3.11/_decimal.cpython-311-arm-linux-gnueabihf.so
The necessary bits to build these optional modules were not found:
_bz2 _curses _curses_panel
_dbm _gdbm _hashlib
_lzma _ssl _tkinter
_uuid readline
To find the necessary bits, look in setup.py in detect_modules() for the module's name.
The following modules found by detect_modules() in setup.py have not
been built, they are *disabled* by configure:
_sqlite3
Failed to build these modules:
_ctypes
Could not build the ssl module!
Python requires a OpenSSL 1.1.1 or newer
Your environment
- Operating system and architecture: aarch 64 (Raspbian 11), Raspberry Pi 4 Model B 4GB
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
buildThe build process and cross-buildThe build process and cross-buildpendingThe issue will be closed if no feedback is providedThe issue will be closed if no feedback is providedtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Activity
chgnrdv commentedon Jun 12, 2023
Have you installed
libssl-devpackage? I'm not Raspbian user, but pretty sure that installation process doesn't differ much from Debian one.TheCarpetMerchant commentedon Jun 12, 2023
I've installed the following package after reading a few stackoverflow posts :
libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-devOpenSSL works without problems.
ronaldoussoren commentedon Jun 13, 2023
Try installing
libffi-devas well, that should fix the build error for_ctypes. The devguide contains a list of packages to install on Debian, which should also work on Raspian. In short:$ sudo apt-get install build-essential gdb lcov pkg-config \ libbz2-dev libffi-dev libgdbm-dev libgdbm-compat-dev liblzma-dev \ libncurses5-dev libreadline6-dev libsqlite3-dev libssl-dev \ lzma lzma-dev tk-dev uuid-dev zlib1g-devThat command includes a number of additional packages relative to what you already already installed.
TheCarpetMerchant commentedon Jun 13, 2023
Still getting the same error, albeit with fewer missing packages :
ronaldoussoren commentedon Jun 13, 2023
It's hard to say without seeing a full build log, but this likely still indicates that some build requirements are missing, e.g. the various '-dev ' packages that should be installed according to the devguide.
TheCarpetMerchant commentedon Jun 14, 2023
Where can I find the 'deb-src' url for Raspbian ?
The following packages are installed :
erlend-aasland commentedon Jun 16, 2023
You should be able to run
./.github/workflows/posix-deps-apt.shfrom within your git cloned CPython repo, which will install pretty much all dependencies for you.StanFromIreland commentedon Jun 18, 2025
Was this resolved successfully? The ARM Raspbian buildbot is green on 3.11 (see log) and so is the ARM64 Raspbian buildbot for > 3.12 (see green fields [ignore the yellow "dandelions"] :-).
cc @gpshead (PS. you are not listed in the devguide beside Raspbian)
gpshead commentedon Jun 18, 2025
closing as this is just a matter of installing the required dependencies. not rpi specific, anything debian based needs deps installed.