Bug 2083972 - libtdb fails to build with Python 3.11: ModuleNotFoundError: No module named 'tdb'
Summary: libtdb fails to build with Python 3.11: ModuleNotFoundError: No module named ...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: libtdb
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Andreas Schneider
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.11
TreeView+ depends on / blocked
 
Reported: 2022-05-11 06:57 UTC by Tomáš Hrnčiar
Modified: 2022-06-18 06:51 UTC (History)
12 users (show)

Fixed In Version: libtdb-1.4.7-2.fc37
Clone Of:
Environment:
Last Closed: 2022-06-18 06:51:48 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker SSSD-4677 0 None None None 2022-06-18 03:07:37 UTC

Description Tomáš Hrnčiar 2022-05-11 06:57:18 UTC
libtdb fails to build with Python 3.11.0b1.

Traceback (most recent call last):
  File "/builddir/build/BUILD/tdb-1.4.6/python/tests/simple.py", line 14, in <module>
    import tdb
    ^^^^^^^^^^
ModuleNotFoundError: No module named 'tdb'

https://docs.python.org/3.11/whatsnew/3.11.html

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.11/fedora-rawhide-x86_64/04392274-libtdb/

For all our attempts to build libtdb with Python 3.11, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.11/package/libtdb/

Testing and mass rebuild of packages is happening in copr. You can follow these instructions to test locally in mock if your package builds with Python 3.11:
https://copr.fedorainfracloud.org/coprs/g/python/python3.11/

Let us know here if you have any questions.

Python 3.11 is planned to be included in Fedora 37. To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.11.
A build failure prevents us from testing all dependent packages (transitive [Build]Requires), so if this package is required a lot, it's important for us to get it fixed soon.
We'd appreciate help from the people who know this package best, but if you don't want to work on this now, let us know so we can try to work around it on our side.

Comment 1 Miro Hrončok 2022-05-11 09:24:08 UTC
The latest Fedora build has:

Waf: Entering directory `/builddir/build/BUILD/tdb-1.4.6/bin/default'
+ install /builddir/build/BUILDROOT/libtdb-1.4.6-1.fc36.x86_64/usr/lib64/pkgconfig/tdb.pc (from bin/default/tdb.pc)
+ install /builddir/build/BUILDROOT/libtdb-1.4.6-1.fc36.x86_64/usr/lib64/python3.10/site-packages/_tdb_text.py (from _tdb_text.py)
[ 26/130] Linking bin/default/libtdb.so
[ 36/130] Linking bin/default/pytdb.cpython-310-x86_64-linux-gnu.so
+ symlink /builddir/build/BUILDROOT/libtdb-1.4.6-1.fc36.x86_64/usr/lib64/libtdb.so.1 (to libtdb.so.1.4.6)
+ symlink /builddir/build/BUILDROOT/libtdb-1.4.6-1.fc36.x86_64/usr/lib64/libtdb.so (to libtdb.so.1.4.6)
+ install /builddir/build/BUILDROOT/libtdb-1.4.6-1.fc36.x86_64/usr/bin/tdbrestore (from bin/default/tdbrestore)
+ install /builddir/build/BUILDROOT/libtdb-1.4.6-1.fc36.x86_64/usr/bin/tdbdump (from bin/default/tdbdump)
+ install /builddir/build/BUILDROOT/libtdb-1.4.6-1.fc36.x86_64/usr/lib64/libtdb.so.1.4.6 (from bin/default/libtdb.so)
+ install /builddir/build/BUILDROOT/libtdb-1.4.6-1.fc36.x86_64/usr/bin/tdbbackup (from bin/default/tdbbackup)
+ install /builddir/build/BUILDROOT/libtdb-1.4.6-1.fc36.x86_64/usr/bin/tdbtool (from bin/default/tdbtool)
+ install /builddir/build/BUILDROOT/libtdb-1.4.6-1.fc36.x86_64/usr/lib64/python3.10/site-packages/tdb.cpython-310-x86_64-linux-gnu.so (from bin/default/pytdb.cpython-310-x86_64-linux-gnu.so)
+ install /builddir/build/BUILDROOT/libtdb-1.4.6-1.fc36.x86_64/usr/include/tdb.h (from include/tdb.h)
+ install /builddir/build/BUILDROOT/libtdb-1.4.6-1.fc36.x86_64/usr/share/man/man8/tdbrestore.8 (from bin/default/man/tdbrestore.8)
+ install /builddir/build/BUILDROOT/libtdb-1.4.6-1.fc36.x86_64/usr/share/man/man8/tdbdump.8 (from bin/default/man/tdbdump.8)
+ install /builddir/build/BUILDROOT/libtdb-1.4.6-1.fc36.x86_64/usr/share/man/man8/tdbbackup.8 (from bin/default/man/tdbbackup.8)
+ install /builddir/build/BUILDROOT/libtdb-1.4.6-1.fc36.x86_64/usr/share/man/man8/tdbtool.8 (from bin/default/man/tdbtool.8)

The Python 3.11 build has:

Waf: Entering directory `/builddir/build/BUILD/tdb-1.4.6/bin/default'
+ install /builddir/build/BUILDROOT/libtdb-1.4.6-1.fc37.x86_64/usr/lib64/pkgconfig/tdb.pc (from bin/default/tdb.pc)
+ install /builddir/build/BUILDROOT/libtdb-1.4.6-1.fc37.x86_64/usr/lib64/python3.11/site-packages/_tdb_text.py (from _tdb_text.py)
[ 26/130] Linking bin/default/libtdb.so
[ 36/130] Linking bin/default/pytdb
+ symlink /builddir/build/BUILDROOT/libtdb-1.4.6-1.fc37.x86_64/usr/lib64/libtdb.so.1 (to libtdb.so.1.4.6)
+ symlink /builddir/build/BUILDROOT/libtdb-1.4.6-1.fc37.x86_64/usr/lib64/libtdb.so (to libtdb.so.1.4.6)
+ install /builddir/build/BUILDROOT/libtdb-1.4.6-1.fc37.x86_64/usr/bin/tdbrestore (from bin/default/tdbrestore)
+ install /builddir/build/BUILDROOT/libtdb-1.4.6-1.fc37.x86_64/usr/bin/tdbdump (from bin/default/tdbdump)
+ install /builddir/build/BUILDROOT/libtdb-1.4.6-1.fc37.x86_64/usr/lib64/libtdb.so.1.4.6 (from bin/default/libtdb.so)
+ install /builddir/build/BUILDROOT/libtdb-1.4.6-1.fc37.x86_64/usr/bin/tdbbackup (from bin/default/tdbbackup)
+ install /builddir/build/BUILDROOT/libtdb-1.4.6-1.fc37.x86_64/usr/bin/tdbtool (from bin/default/tdbtool)
+ install /builddir/build/BUILDROOT/libtdb-1.4.6-1.fc37.x86_64/usr/lib64/python3.11/site-packages/tdb (from bin/default/pytdb)
+ install /builddir/build/BUILDROOT/libtdb-1.4.6-1.fc37.x86_64/usr/include/tdb.h (from include/tdb.h)
+ install /builddir/build/BUILDROOT/libtdb-1.4.6-1.fc37.x86_64/usr/share/man/man8/tdbrestore.8 (from bin/default/man/tdbrestore.8)
+ install /builddir/build/BUILDROOT/libtdb-1.4.6-1.fc37.x86_64/usr/share/man/man8/tdbdump.8 (from bin/default/man/tdbdump.8)
+ install /builddir/build/BUILDROOT/libtdb-1.4.6-1.fc37.x86_64/usr/share/man/man8/tdbbackup.8 (from bin/default/man/tdbbackup.8)
+ install /builddir/build/BUILDROOT/libtdb-1.4.6-1.fc37.x86_64/usr/share/man/man8/tdbtool.8 (from bin/default/man/tdbtool.8)



Most interestingly, compare:

+ install /builddir/build/BUILDROOT/libtdb-1.4.6-1.fc36.x86_64/usr/lib64/python3.10/site-packages/tdb.cpython-310-x86_64-linux-gnu.so (from bin/default/pytdb.cpython-310-x86_64-linux-gnu.so)

With

+ install /builddir/build/BUILDROOT/libtdb-1.4.6-1.fc37.x86_64/usr/lib64/python3.11/site-packages/tdb (from bin/default/pytdb)

The filename seems to be wrong.

Comment 2 Pavel Filipensky 2022-05-16 14:27:22 UTC
Reported this waf issue: https://gitlab.com/ita1024/waf/-/issues/2386

Comment 3 Pavel Filipensky 2022-05-16 19:18:15 UTC
Forwarding request from  https://gitlab.com/ita1024/waf/-/issues/2386#note_948347309 :

Can you please attach the config.log files for the two versions?

Comment 4 Miro Hrončok 2022-05-17 14:37:31 UTC
I've uploaded them to https://gitlab.com/ita1024/waf/-/issues/2386 and also figured out where the problem is.

Comment 5 Lukas Slebodnik 2022-05-17 16:20:15 UTC
(In reply to Miro Hrončok from comment #4)
> I've uploaded them to https://gitlab.com/ita1024/waf/-/issues/2386 and also
> figured out where the problem is.

BTW samba uses bundled version of waf; so similar patch as in https://gitlab.com/ita1024/waf/-/merge_requests/2341 will need to be contributed there as well.
https://gitlab.com/samba-team/samba/-/blob/master/third_party/waf/waflib/Tools/python.py#L331

Comment 6 Miro Hrončok 2022-05-17 17:22:18 UTC
As far as I know, the entire stack of libs and samba uses bundled waf, so each of the package will need to carry its own copy of the patch, at least that is accurate for libtdb :(

Comment 7 Lukas Slebodnik 2022-05-18 08:45:31 UTC
(In reply to Miro Hrončok from comment #6)
> As far as I know, the entire stack of libs and samba uses bundled waf, so
> each of the package will need to carry its own copy of the patch, at least
> that is accurate for libtdb :(

If upstream samba has patched waf than next release of libtalloc, libtevent, libtdb, libldb and samba will not require fedora patch :-)
Patching upstream waf is still useful just in case upstream samba will decide to rebase bundled waf in few months/years.

Comment 8 Andreas Schneider 2022-05-19 06:36:09 UTC
I will update waf next week and backport it.

https://bugzilla.samba.org/show_bug.cgi?id=15071

Comment 9 Andre Boscatto 2022-06-18 03:10:29 UTC
Hi Andreas,

Can we consider this BZ done since the https://bugzilla.samba.org/show_bug.cgi?id=15071 was already merged?

Kindly


Note You need to log in before you can comment on or make changes to this bug.