Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at
Bug 1913346 - libsbml fails to build with Python 3.10: Imports the removed formatter module
Summary: libsbml fails to build with Python 3.10: Imports the removed formatter module
Alias: None
Product: Fedora
Classification: Fedora
Component: libsbml
Version: rawhide
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Zbigniew Jędrzejewski-Szmek
QA Contact:
Depends On:
Blocks: PYTHON3.10
TreeView+ depends on / blocked
Reported: 2021-01-06 14:53 UTC by Tomáš Hrnčiar
Modified: 2021-01-21 08:25 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2021-01-21 08:25:32 UTC
Type: Bug

Attachments (Terms of Use)

Description Tomáš Hrnčiar 2021-01-06 14:53:22 UTC
libsbml fails to build with Python 3.10.0a4.

cd /builddir/build/BUILD/libSBML-5.18.0-Source/build/src && /usr/bin/cmake -E cmake_symlink_library
make[2]: Leaving directory '/builddir/build/BUILD/libSBML-5.18.0-Source/build'
In function 'strncpy',
    inlined from '__ct_base ' at /builddir/build/BUILD/libSBML-5.18.0-Source/src/sbml/xml/XMLMemoryBuffer.cpp:62:10:
/usr/include/bits/string_fortified.h:91:34: warning: '__builtin_strncpy' specified bound depends on the length of the source argument [-Wstringop-overflow=]
   91 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |                                  ^
/builddir/build/BUILD/libSBML-5.18.0-Source/src/sbml/xml/XMLMemoryBuffer.cpp: In member function '__ct_base ':
/builddir/build/BUILD/libSBML-5.18.0-Source/src/sbml/xml/XMLMemoryBuffer.cpp:59:27: note: length computed here
   59 |   size_t bufsize  = strlen(buffer);
      |                           ^
In function 'strncpy',
    inlined from 'file_build_ioposix' at /builddir/build/BUILD/libSBML-5.18.0-Source/src/sbml/compress/ioapi.c:123:5,
    inlined from 'fopen_file_func' at /builddir/build/BUILD/libSBML-5.18.0-Source/src/sbml/compress/ioapi.c:141:16:
/usr/include/bits/string_fortified.h:91:10: warning: '__builtin_strncpy' specified bound depends on the length of the source argument [-Wstringop-overflow=]
   91 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^
/builddir/build/BUILD/libSBML-5.18.0-Source/src/sbml/compress/ioapi.c: In function 'fopen_file_func':
/builddir/build/BUILD/libSBML-5.18.0-Source/src/sbml/compress/ioapi.c:121:31: note: length computed here
  121 |     ioposix->filenameLength = strlen(filename) + 1;
      |                               ^
make[1]: Entering directory '/builddir/build/BUILD/libSBML-5.18.0-Source/build'
[ 70%] Built target sbml
make[1]: Leaving directory '/builddir/build/BUILD/libSBML-5.18.0-Source/build'
make: *** [Makefile:185: all] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.oEPHut (%build)

For the build logs, see:

For all our attempts to build libsbml with Python 3.10, see:

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.10:

Let us know here if you have any questions.

Python 3.10 will be included in Fedora 35. To make that update smoother, we're building Fedora packages with early pre-releases of Python 3.10.
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 Antonio T. sagitter 2021-01-06 18:01:34 UTC

[ 70%] Swig Python source
cd /builddir/build/BUILD/libSBML-5.18.0-Source/build/src/bindings/python && /usr/bin/python3 /builddir/build/BUILD/libSBML-5.18.0-Source/src/bindings/python/../swig/ --language python --top /builddir/build/BUILD/libSBML-5.18.0-Source --master /builddir/build/BUILD/libSBML-5.18.0-Source/src/bindings/python/../swig/libsbml.i --output /builddir/build/BUILD/libSBML-5.18.0-Source/build/src/bindings/python/pydoc-doxygen.i --define USE_COMP --define USE_FBC --define USE_GROUPS --define USE_L3V2EXTENDEDMATH --define USE_LAYOUT --define USE_MULTI --define USE_QUAL --define USE_RENDER --define USE_COMP --define USE_FBC --define USE_GROUPS --define USE_L3V2EXTENDEDMATH --define USE_MULTI --define USE_QUAL --define USE_RENDER
cd /builddir/build/BUILD/libSBML-5.18.0-Source/build/src/bindings/python && /usr/bin/python3 /builddir/build/BUILD/libSBML-5.18.0-Source/build/src/bindings/python/ /builddir/build/BUILD/libSBML-5.18.0-Source/src > /builddir/build/BUILD/libSBML-5.18.0-Source/build/src/bindings/python/class-list.txt
cd /builddir/build/BUILD/libSBML-5.18.0-Source/build/src/bindings/python && /usr/bin/python3 /builddir/build/BUILD/libSBML-5.18.0-Source/build/src/bindings/python/ /builddir/build/BUILD/libSBML-5.18.0-Source/build/src/bindings/python/class-list.txt > /builddir/build/BUILD/libSBML-5.18.0-Source/build/src/bindings/python/libsbml-converters.txt
cd /builddir/build/BUILD/libSBML-5.18.0-Source/build/src/bindings/python && /usr/bin/python3 /builddir/build/BUILD/libSBML-5.18.0-Source/src/bindings/python/doc-converter/ -f /builddir/build/BUILD/libSBML-5.18.0-Source/build/src/bindings/python/pydoc-doxygen.i -o /builddir/build/BUILD/libSBML-5.18.0-Source/build/src/bindings/python/pydoc-normal.i -i /builddir/build/BUILD/libSBML-5.18.0-Source/src/bindings/python/../../../docs/src/common-text -g /builddir/build/BUILD/libSBML-5.18.0-Source/src/bindings/python/../../../docs/src/common-graphics
Traceback (most recent call last):
  File "/builddir/build/BUILD/libSBML-5.18.0-Source/src/bindings/python/doc-converter/", line 121, in <module>
    from formatter import NullWriter, AbstractFormatter
ModuleNotFoundError: No module named 'formatter'

Comment 2 Miro Hrončok 2021-01-06 18:10:57 UTC
Yes, that is the actual error. Do you know where is the formatter module suppose to come from?

Comment 3 Miro Hrončok 2021-01-06 18:14:17 UTC
formatter: Deprecated since version 3.4: Due to lack of usage, the formatter module has been deprecated.

Removed the formatter module, which was deprecated in Python 3.4. It is somewhat obsolete, little used, and not tested. It was originally scheduled to be removed in Python 3.6, but such removals were delayed until after Python 2.7 EOL. Existing users should copy whatever classes they use into their code. (Contributed by Dong-hee Na and Terry J. Reedy in

Comment 4 Antonio T. sagitter 2021-01-06 19:10:09 UTC

i was about to open a bug ticket for upstream; do you prefer to patch libsbml for this issue?

Comment 5 Zbigniew Jędrzejewski-Szmek 2021-01-14 10:20:29 UTC
There's a bunch of issues. I had it building already, but then upgrades in rawhide caused more issues.
So I want to figure it out all the way, and then file a bug upstream.

Comment 6 Zbigniew Jędrzejewski-Szmek 2021-01-21 08:25:32 UTC

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