You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
checking for stdlib extension module _sqlite3... missing #58
Apparently, since early 3.11.0, it's been impossible to statically link sqlite3 into cpython. The good news it just got fixed and backported. The bad news is the "no patching" guideline of this project makes it hard to fix this for any pre-existing version. Any suggestions for this case?
In conjunction with the linked pull request, it's now possible to statically link sqlite3.
For posterity, here is the relevant configuration needed. Could probably get away with smaller patches but this verified to work.
For python 3.11.x-3.12.8, and 3.13.0-3.13.1
cpython-patches:
# https://github.com/python/cpython/issues/128321
# Until python 3.12.9, LIBSQLITE3_LIBS passed incorrectly in configure
# This patch fixes 2 issues:
# - Fixes the passing of the variable as per patch in linked issue
# - adds -lm to compensate for cpython not --static to pkg-config
# and maintainers choosing not to add -lm in linked issue
#
- file: configure
regex: ' LDFLAGS="\$LIBSQLITE3_LIBS \$LDFLAGS"'
replacement: ' LIBS="$LIBSQLITE3_LIBS $LIBS -lm"'
- file: configure.ac
regex: ' LDFLAGS="\$LIBSQLITE3_LIBS \$LDFLAGS"'
replacement: ' LIBS="$LIBSQLITE3_LIBS $LIBS -lm"'
For python 3.12.9+ and 3.13.2+
(just needs to add -lm)
cpython-patches:
# https://github.com/python/cpython/issues/128321
# Adds -lm to compensate for cpython not --static to pkg-config
# and maintainers choosing not to add -lm in linked issue
#
- file: configure
regex: ' LIBS="\$LIBS \$LIBSQLITE3_LIBS"'
replacement: ' LIBS="$LIBS $LIBSQLITE3_LIBS -lm"'
- file: configure.ac
regex: ' LIBS="\$LIBS \$LIBSQLITE3_LIBS"'
replacement: ' LIBS="$LIBS $LIBSQLITE3_LIBS -lm"'
Activity
solvingj commentedon Feb 12, 2025
In conjunction with the linked pull request, it's now possible to statically link sqlite3.
For posterity, here is the relevant configuration needed. Could probably get away with smaller patches but this verified to work.
For python 3.11.x-3.12.8, and 3.13.0-3.13.1
For python 3.12.9+ and 3.13.2+
(just needs to add
-lm)zsimic commentedon Feb 14, 2025
Release with portable-python v1.9.8