[Buildroot] [PATCH 2/2] package/python3: berkeleydb support needs the dbm interface

Bernd Kuhls bernd at kuhls.net
Mon Aug 7 17:45:15 UTC 2023


Berkeley DB support in python depends on dbm, when missing python fails
to detect libdb:
https://github.com/python/cpython/blob/d2340ef25721b6a72d45d4508c672c4be38c67d3/configure.ac#L4002

quoting configure log:
checking for libdb... no

quoting python config.log:
conftest.c:(.text.startup+0x8): undefined reference to `__db_ndbm_open'

Only with this patch python builds a berkeleydb module:

  output/build/python3-3.11.4$ find -iname *dbm*.so
  ./build/lib.linux-x86_64-3.11/_dbm.cpython-311-x86_64-linux-gnu.so

since python 3.11 (added with buildroot commit
738500c296c8b1206f20e94ca3e7c5932a6a0486) changed the way it detects libdb:
https://github.com/python/cpython/commit/0a9f69539be27acf1cddf1b58d02a88d02e5008d

Signed-off-by: Bernd Kuhls <bernd at kuhls.net>
---
 package/python3/Config.in | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/python3/Config.in b/package/python3/Config.in
index 761c38c850..38f0580aa4 100644
--- a/package/python3/Config.in
+++ b/package/python3/Config.in
@@ -48,6 +48,7 @@ config BR2_PACKAGE_PYTHON3_2TO3
 config BR2_PACKAGE_PYTHON3_BERKELEYDB
 	bool "berkeleydb"
 	select BR2_PACKAGE_BERKELEYDB
+	select BR2_PACKAGE_BERKELEYDB_DBM
 	help
 	  berkeleydb module for Python3
 
-- 
2.39.2




More information about the buildroot mailing list