Go to file
Bernd Kuhls b84ffd85e2 package/python3: berkeleydb support needs the dbm interface
Until now, the Python build system was building a _dbm.cpython-*.so
native module when BR2_PACKAGE_PYTHON3_BERKELEYDB was enabled, but
since the bump of Python to 3.11.x, it was no longer building this
native module.

Investigation this, we found out that Python 3.11 changed how libdb
was detected [1] and that check now fails:

quoting configure log:
checking for libdb... no

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

However, in fact it turns that this problem is not new in Python
3.11. In Python 3.10, the build system was always producing the native
module, but it was in fact not working at runtime:

>>> from _dbm import *
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: /usr/lib/python3.10/lib-dynload/_dbm.cpython-310-arm-linux-gnueabihf.so: undefined symbol: __db_ndbm_delete

It was not really visible because when one does "import dbm", it
actually tries several "backends", including ndbm (which relies on
_dbm above), and if it doesn't work, it falls back silently on a pure
Python implementation.

So the issue was never noticed, but has already been there,
potentially forever.

In order for this _dbm native module to be built (Python >= 3.11) or
to work (Python < 3.11), the BerkeleyDB library need to be built with
its so-called "dbm" interface, which we do by selecting select
BR2_PACKAGE_BERKELEYDB_DBM.

And now:

>>> import _dbm
>>>

[1] d2340ef257/configure.ac (L4002)

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
[Thomas: did more research to have a better explanation of what is
happening, and realize the problem is not related to Python 3.11]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2023-08-09 20:16:38 +02:00
arch arch/Config.in.x86: consolidate Geode CPU targets 2023-08-01 23:16:02 +02:00
board board/zynq/post-image.sh: correct comment text 2023-08-08 00:03:54 +02:00
boot boot/at91dataflashboot: force arm mode instead of Thumb mode 2023-08-06 14:12:34 +02:00
configs configs/qemu_m68k: add Linux kernel patch to fix build with binutils >= 2.41 2023-08-08 00:03:22 +02:00
docs Update for 2023.08-rc1 2023-08-05 23:03:28 +02:00
fs fs/cpio: allow users to provide their own dracut modules 2023-02-06 22:46:35 +01:00
linux {linux, linux-headers}: security bump 4.{14, 19}.x / 5.{4, 10, 15}.x / 6.{1, 4}.x series 2023-08-09 12:20:52 +02:00
package package/python3: berkeleydb support needs the dbm interface 2023-08-09 20:16:38 +02:00
support support/testing: TestPolkitSystemd: fix systemctl exit code check on failure 2023-08-09 19:21:27 +02:00
system package/systemd: bump linux-headers dependency to 4.14 2023-08-02 21:18:16 +02:00
toolchain toolchain: introduce BR2_TOOLCHAIN_HAS_BINUTILS_BUG_30730 2023-08-07 23:34:02 +02:00
utils utils/docker-run: fix running when CWD is not MAIN_DIR 2023-07-31 20:56:57 +02:00
.checkpackageignore package/elf2flt: refresh patches 2023-08-06 15:43:07 +02:00
.clang-format .clang-format: initial import from Linux 5.15.6 2022-01-01 15:01:13 +01:00
.defconfig
.flake8
.gitignore
.gitlab-ci.yml .gitlab-ci.yml: update Docker image to use 2023-02-07 18:15:00 +01:00
.shellcheckrc utils/check-package: improve shellcheck reproducibility 2022-07-25 23:52:47 +02:00
CHANGES Update for 2023.08-rc1 2023-08-05 23:03:28 +02:00
Config.in package/sam-ba: drop 32bit host lib requirement 2023-07-30 23:41:44 +02:00
Config.in.legacy package/binutils: drop 2.38.x series 2023-08-01 23:12:01 +02:00
COPYING
DEVELOPERS DEVELOPERS: sort entries of Neal Frager 2023-08-03 21:16:34 +02:00
Makefile Update for 2023.08-rc1 2023-08-05 23:03:28 +02:00
Makefile.legacy
README docs: move the IRC channel away from Freenode 2021-05-29 22:16:23 +02:00

Buildroot is a simple, efficient and easy-to-use tool to generate embedded
Linux systems through cross-compilation.

The documentation can be found in docs/manual. You can generate a text
document with 'make manual-text' and read output/docs/manual/manual.text.
Online documentation can be found at http://buildroot.org/docs.html

To build and use the buildroot stuff, do the following:

1) run 'make menuconfig'
2) select the target architecture and the packages you wish to compile
3) run 'make'
4) wait while it compiles
5) find the kernel, bootloader, root filesystem, etc. in output/images

You do not need to be root to build or run buildroot.  Have fun!

Buildroot comes with a basic configuration for a number of boards. Run
'make list-defconfigs' to view the list of provided configurations.

Please feed suggestions, bug reports, insults, and bribes back to the
buildroot mailing list: buildroot@buildroot.org
You can also find us on #buildroot on OFTC IRC.

If you would like to contribute patches, please read
https://buildroot.org/manual.html#submitting-patches