#1133593 openbabel: ftbfs with GCC-16

Package:
src:openbabel
Source:
src:openbabel
Submitter:
Emanuele Rocca
Date:
2026-09-14 07:51:01 UTC
Severity:
normal
Tags:
#1133593#5
Date:
2026-04-13 13:09:09 UTC
From:
To:
Hi,

openbabel fails to build in a test rebuild on at least amd64 and arm64 with
gcc-16/g++-16, but builds properly with gcc-15/g++-15. The severity of this
report will be raised before the forky release.

The full build log can be found at:
https://people.debian.org/~ema/gcc-16-rebuilds/output-1/openbabel_arm64.build.xz

The last lines of the build log are at the end of this report.

To build with GCC 16, either set CC=gcc-16 CXX=g++-16 explicitly,
or install the gcc, g++, gfortran, ... packages from experimental.

  apt-get -t=experimental install g++

Common build failures include unused (but set) variables, array subscripts
partly outside array bounds, and new/dropped symbols in Debian symbols files.
For other C/C++ related build failures see the porting guide at
http://gcc.gnu.org/gcc-16/porting_to.html

Please only close this issue after double-checking that the package can be
built correctly with GCC 16.

Please do not reassign this bug to another package. If a fix in another package
is required, then file a bug for the other package (or clone), and mark this
bug as blocked by the bug in the other package.

[...]


                 from /usr/include/c++/16/bits/stl_algobase.h:70,
                 from /usr/include/c++/16/bits/specfun.h:44,
                 from /usr/include/c++/16/cmath:3913,
                 from /usr/include/c++/16/math.h:36,
                 from /build/reproducible-path/openbabel-3.1.1+dfsg/include/openbabel/mol.h:41,
                 from /build/reproducible-path/openbabel-3.1.1+dfsg/include/openbabel/conformersearch.h:24,
                 from /build/reproducible-path/openbabel-3.1.1+dfsg/src/conformersearch.cpp:20:
/usr/include/c++/16/bits/stl_function.h:134:12: note: declared here
  134 |     struct binary_function
      |            ^~~~~~~~~~~~~~~
make[4]: *** [src/CMakeFiles/openbabel.dir/build.make:824: src/CMakeFiles/openbabel.dir/confsearch.cpp.o] Error 1
make[4]: *** Waiting for unfinished jobs....
In file included from /build/reproducible-path/openbabel-3.1.1+dfsg/include/openbabel/format.h:22,
                 from /build/reproducible-path/openbabel-3.1.1+dfsg/include/openbabel/obconversion.h:37,
                 from /build/reproducible-path/openbabel-3.1.1+dfsg/src/distgeom.cpp:38:
/build/reproducible-path/openbabel-3.1.1+dfsg/include/openbabel/plugin.h:41:42: warning: ‘template<class _Arg1, class _Arg2, class _Result> struct std::binary_function’ is deprecated [-Wdeprecated-declarations]
   41 | struct OBERROR CharPtrLess : public std::binary_function<const char*,const char*, bool>
      |                                          ^~~~~~~~~~~~~~~
In file included from /usr/include/c++/16/bits/predefined_ops.h:33,
                 from /usr/include/c++/16/bits/stl_algobase.h:70,
                 from /usr/include/c++/16/bits/specfun.h:44,
                 from /usr/include/c++/16/cmath:3913,
                 from /usr/include/c++/16/math.h:36,
                 from /build/reproducible-path/openbabel-3.1.1+dfsg/include/openbabel/mol.h:41,
                 from /build/reproducible-path/openbabel-3.1.1+dfsg/include/openbabel/distgeom.h:24,
                 from /build/reproducible-path/openbabel-3.1.1+dfsg/src/distgeom.cpp:22:
/usr/include/c++/16/bits/stl_function.h:134:12: note: declared here
  134 |     struct binary_function
      |            ^~~~~~~~~~~~~~~
/build/reproducible-path/openbabel-3.1.1+dfsg/src/atom.cpp: In member function ‘unsigned int OpenBabel::OBAtom::GetHyb() const’:
/build/reproducible-path/openbabel-3.1.1+dfsg/src/atom.cpp:495:16: note: non-delegitimized UNSPEC UNSPEC_TLS (98) found in variable location
  495 |   unsigned int OBAtom::GetHyb() const
      |                ^~~~~~
/build/reproducible-path/openbabel-3.1.1+dfsg/src/atom.cpp: In member function ‘double OpenBabel::OBAtom::GetPartialCharge()’:
/build/reproducible-path/openbabel-3.1.1+dfsg/src/atom.cpp:531:10: note: non-delegitimized UNSPEC UNSPEC_TLS (98) found in variable location
  531 |   double OBAtom::GetPartialCharge()
      |          ^~~~~~
/build/reproducible-path/openbabel-3.1.1+dfsg/src/atom.cpp: In member function ‘bool OpenBabel::OBAtom::IsAromatic() const’:
/build/reproducible-path/openbabel-3.1.1+dfsg/src/atom.cpp:774:8: note: non-delegitimized UNSPEC UNSPEC_TLS (98) found in variable location
  774 |   bool OBAtom::IsAromatic() const
      |        ^~~~~~
/build/reproducible-path/openbabel-3.1.1+dfsg/src/atom.cpp: In member function ‘char* OpenBabel::OBAtom::GetType()’:
/build/reproducible-path/openbabel-3.1.1+dfsg/src/atom.cpp:468:9: note: non-delegitimized UNSPEC UNSPEC_TLS (98) found in variable location
  468 |   char *OBAtom::GetType()
      |         ^~~~~~
/build/reproducible-path/openbabel-3.1.1+dfsg/src/typer.cpp: In function ‘void __tls_init()’:
/build/reproducible-path/openbabel-3.1.1+dfsg/src/typer.cpp:42:33: note: non-delegitimized UNSPEC UNSPEC_TLS (98) found in variable location
   42 |   THREAD_LOCAL OBAromaticTyper  aromtyper;
      |                                 ^~~~~~~~~
/build/reproducible-path/openbabel-3.1.1+dfsg/src/typer.cpp: In member function ‘void OpenBabel::OBAtomTyper::AssignHyb(OpenBabel::OBMol&)’:
/build/reproducible-path/openbabel-3.1.1+dfsg/src/typer.cpp:179:8: note: non-delegitimized UNSPEC UNSPEC_TLS (98) found in variable location
  179 |   void OBAtomTyper::AssignHyb(OBMol &mol)
      |        ^~~~~~~~~~~
/build/reproducible-path/openbabel-3.1.1+dfsg/src/mol.cpp: In member function ‘bool OpenBabel::OBMol::CorrectForPH(double)’:
/build/reproducible-path/openbabel-3.1.1+dfsg/src/mol.cpp:2359:8: note: non-delegitimized UNSPEC UNSPEC_TLS (98) found in variable location
 2359 |   bool OBMol::CorrectForPH(double pH)
      |        ^~~~~
/build/reproducible-path/openbabel-3.1.1+dfsg/src/mol.cpp: In member function ‘void OpenBabel::OBMol::PerceiveBondOrders()’:
/build/reproducible-path/openbabel-3.1.1+dfsg/src/mol.cpp:3186:8: note: non-delegitimized UNSPEC UNSPEC_TLS (98) found in variable location
 3186 |   void OBMol::PerceiveBondOrders()
      |        ^~~~~
make[4]: Leaving directory '/build/reproducible-path/openbabel-3.1.1+dfsg/builddir'
make[3]: *** [CMakeFiles/Makefile2:1722: src/CMakeFiles/openbabel.dir/all] Error 2
make[3]: Leaving directory '/build/reproducible-path/openbabel-3.1.1+dfsg/builddir'
make[2]: *** [Makefile:149: all] Error 2
make[2]: Leaving directory '/build/reproducible-path/openbabel-3.1.1+dfsg/builddir'
dh_auto_build: error: cd builddir && make -j128 INSTALL="install --strip-program=true" VERBOSE=1 returned exit code 2
make[1]: *** [debian/rules:34: override_dh_auto_build] Error 25
make[1]: Leaving directory '/build/reproducible-path/openbabel-3.1.1+dfsg'
make: *** [debian/rules:28: binary] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess failed with exit status 2

#1133593#20
Date:
2026-09-11 20:54:17 UTC
From:
To:
user debian-python@lists.debian.org
usertags 1133593 python3.15
tags 1133593 patch
thanks

Hi!

While rebuilding the python related packages against the Python 3.15rc2
version I ran into this bug [1].

In order to get openbabel to build, I had to apply several changes:
   - Get rid of deprecated allocate (removed in c++20)
   - Apply the changes proposed in pr#2858 [2] (same as for the Debian
     bug #1136307, which was only uploaded to experimental)
   - Use guess-concurrency, limit openmp threads to 1 (the work is
     already parallelized)
   - Disable the test/testdistgeom.py test, as it requires too much
     memory and causes the build machines to crash. It was already
     disabled in amd64.

I've applied these fixes in the sandbox [3] to verify that it builds
successfully, these should be applied in Debian to get the package back
to a healthy state.

Happy hacking,

[1]: https://debusine.debian.net/debian/r-python-python3.15/artifact/4290363/
[2]: https://github.com/openbabel/openbabel/pull/2858
[3]: https://debusine.debian.net/debian/r-python-python3.15/

#1133593#27
Date:
2026-09-14 07:49:17 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
openbabel, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1133593@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Andrius Merkys <merkys@debian.org> (supplier of updated openbabel package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Mon, 14 Sep 2026 03:20:55 -0400
Source: openbabel
Architecture: source
Version: 3.2.0+dfsg-1
Distribution: unstable
Urgency: medium
Maintainer: Debichem Team <debichem-devel@lists.alioth.debian.org>
Changed-By: Andrius Merkys <merkys@debian.org>
Closes: 1133593
Changes:
 openbabel (3.2.0+dfsg-1) unstable; urgency=medium
 .
   * Upload to unstable
   * Always skip test/testdistgeom.py in autopkgtest due to timeout and
     excessive memory use.
   * Use guess-concurrency, limit openmp threads to 1. Thanks Maximiliano Curia
   * Get rid of deprecated allocate (removed in c++20). (Closes: #1133593)
     Thanks Maximiliano Curia
Checksums-Sha1:
 86703caa071286c72ec3b18997788449dbc32374 2203 openbabel_3.2.0+dfsg-1.dsc
 6afe6ed13dc51fd9520efa86fae8bf4f2e2beac9 19920 openbabel_3.2.0+dfsg-1.debian.tar.xz
 1accf37e85d193a93abc11acd177ca1cf0431674 11159 openbabel_3.2.0+dfsg-1_source.buildinfo
Checksums-Sha256:
 70bab0217a741da5a995355e76c79031df3a40627a9d4dc9fdcc943ae7f1c647 2203 openbabel_3.2.0+dfsg-1.dsc
 ccc58c784ad14744615ab9a82e8b8baafc946d93ebcdd506f61ffb67a6a167d8 19920 openbabel_3.2.0+dfsg-1.debian.tar.xz
 1cda4e79221b26252242d405fdf7482563b1009b82a5798a27c47478d75834ac 11159 openbabel_3.2.0+dfsg-1_source.buildinfo
Files:
 b80ee7f548144071ffe2b4350a1eebc7 2203 science optional openbabel_3.2.0+dfsg-1.dsc
 29737e6d1baa61d46f173c29af54d93e 19920 science optional openbabel_3.2.0+dfsg-1.debian.tar.xz
 6dcc2cff94646e75c50acd32aa5fbabb 11159 science optional openbabel_3.2.0+dfsg-1_source.buildinfo
-----BEGIN PGP SIGNATURE-----

iHUEARYKAB0WIQQ9mT++eHAQdiuDyvHYokBlilUePQUCaqeh5AAKCRDYokBlilUe
PcUDAP9eCcKFMjh02ppHMUsgT/eY8hgnFYjMsux/7iBWxjn5XwEA8yPw4leMhBlQ
s8O5C0griB7C4c77ck0cI7CKBxT7cQo=
=8oYV
-----END PGP SIGNATURE-----