From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Bernd Kuhls <bernd@kuhls.net>
Cc: Asaf Kahlon <asafka7@gmail.com>, buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 1/2] package/berkeleydb: add option for historic dbm interface
Date: Mon, 7 Aug 2023 23:14:38 +0200 [thread overview]
Message-ID: <20230807231438.6bfe2c7a@windsurf> (raw)
In-Reply-To: <20230807174515.3261136-1-bernd@kuhls.net>
Hello Bernd,
On Mon, 7 Aug 2023 19:45:14 +0200
Bernd Kuhls <bernd@kuhls.net> wrote:
> 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 python configure log:
> checking for libdb... no
>
> quoting python config.log:
> conftest.c:(.text.startup+0x8): undefined reference to `__db_ndbm_open'
>
> This patch provides a configure option for the historic dbm interface
> to be used by the python package.
>
> Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
Thanks for those patches. However, I don't quite understand how it was
working in Python 3.10.
I agree that in Python 3.11, they moved some detection logic from
setup.py to configure.ac. But the actual code of dbm module hasn't
changed. Back in Python 3.10, it was already calling dbm_open(), which
gets expanded by a macro from db.h into __db_ndbm_open(). And indeed in
Python 3.10, the dbm module already has references to this symbol:
$ readelf -aW output/target/usr/lib/python3.10/lib-dynload/_dbm.cpython-310-arm-linux-gnueabihf.so | grep "UND.*__db"
10: 00000000 0 NOTYPE GLOBAL DEFAULT UND __db_ndbm_delete
15: 00000000 0 NOTYPE GLOBAL DEFAULT UND __db_ndbm_store
23: 00000000 0 NOTYPE GLOBAL DEFAULT UND __db_ndbm_nextkey
25: 00000000 0 NOTYPE GLOBAL DEFAULT UND __db_ndbm_clearerr
40: 00000000 0 NOTYPE GLOBAL DEFAULT UND __db_ndbm_fetch
41: 00000000 0 NOTYPE GLOBAL DEFAULT UND __db_ndbm_open
44: 00000000 0 NOTYPE GLOBAL DEFAULT UND __db_ndbm_firstkey
48: 00000000 0 NOTYPE GLOBAL DEFAULT UND __db_ndbm_error
51: 00000000 0 NOTYPE GLOBAL DEFAULT UND __db_ndbm_close
And those symbols are not provided by libdb-5.3.so:
$ readelf -aW output/target/usr/lib/libdb-5.3.so | grep __db_ndbm
$
But, the dbm Python module works as expected:
# python
Python 3.10.8 (main, Aug 7 2023, 22:52:15) [GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import dbm
>>> dbm.open("/tmp/plop", "c")
<dbm.dumb._Database object at 0x767ccc28>
So I'm really confused. How does it work in Python 3.10 ? Did we
already need the historic dbm interface back then ?
Any idea?
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2023-08-07 21:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-07 17:45 [Buildroot] [PATCH 1/2] package/berkeleydb: add option for historic dbm interface Bernd Kuhls
2023-08-07 17:45 ` [Buildroot] [PATCH 2/2] package/python3: berkeleydb support needs the " Bernd Kuhls
2023-09-11 20:50 ` Peter Korsgaard
2023-08-07 21:14 ` Thomas Petazzoni via buildroot [this message]
[not found] ` <20230807231438.6bfe2c7a__31533.8530390122$1691442911$gmane$org@windsurf>
2023-08-08 16:01 ` [Buildroot] [PATCH 1/2] package/berkeleydb: add option for historic " Bernd Kuhls
2023-08-08 19:48 ` Thomas Petazzoni via buildroot
2023-09-11 20:50 ` Peter Korsgaard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230807231438.6bfe2c7a@windsurf \
--to=buildroot@buildroot.org \
--cc=asafka7@gmail.com \
--cc=bernd@kuhls.net \
--cc=thomas.petazzoni@bootlin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox