#1098009 tpm2-pytss: ftbfs with GCC-15

#1098009#5
Date:
2025-02-17 17:57:35 UTC
From:
To:
[This bug is NOT targeted to the upcoming trixie release]

Please keep this issue open in the bug tracker for the package it
was filed for.  If a fix in another package is required, please
file a bug for the other package (or clone), and add a block in this
package. Please keep the issue open until the package can be built in
a follow-up test rebuild.

The package fails to build in a test rebuild on at least amd64 with
gcc-15/g++-15, but succeeds to build with gcc-14/g++-14. The
severity of this report will be raised before the forky release.

The full build log can be found at:
http://qa-logs.debian.net/2025/02/16/amd64exp/tpm2-pytss_2.3.0-1_unstable_gccexp.log.gz
The last lines of the build log are at the end of this report.

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

  apt-get -t=experimental install g++

GCC 15 now defaults to the C23/C++23 standards, exposing many FTBFS.
Other Common build failures are new warnings resulting in build failures
with -Werror turned on, or new/dropped symbols in Debian symbols files.
For other C/C++ related build failures see the porting guide at
http://gcc.gnu.org/gcc-15/porting_to.html

[...]
    ~~~~~~~~~~~~~~~~^^^^^
  File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 995, in run_command
    super().run_command(command)
    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^
  File "/usr/lib/python3/dist-packages/setuptools/_distutils/dist.py", line 973, in run_command
    cmd_obj.run()
    ~~~~~~~~~~~^^
  File "/usr/lib/python3/dist-packages/setuptools/command/bdist_wheel.py", line 381, in run
    self.run_command("build")
    ~~~~~~~~~~~~~~~~^^^^^^^^^
  File "/usr/lib/python3/dist-packages/setuptools/_distutils/cmd.py", line 316, in run_command
    self.distribution.run_command(command)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
  File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 995, in run_command
    super().run_command(command)
    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^
  File "/usr/lib/python3/dist-packages/setuptools/_distutils/dist.py", line 973, in run_command
    cmd_obj.run()
    ~~~~~~~~~~~^^
  File "/usr/lib/python3/dist-packages/setuptools/_distutils/command/build.py", line 135, in run
    self.run_command(cmd_name)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/setuptools/_distutils/cmd.py", line 316, in run_command
    self.distribution.run_command(command)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
  File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 995, in run_command
    super().run_command(command)
    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^
  File "/usr/lib/python3/dist-packages/setuptools/_distutils/dist.py", line 973, in run_command
    cmd_obj.run()
    ~~~~~~~~~~~^^
  File "/usr/lib/python3/dist-packages/cffi/setuptools_ext.py", line 142, in run
    base_class.run(self)
    ~~~~~~~~~~~~~~^^^^^^
  File "<string>", line 235, in run
  File "<string>", line 215, in get_mappings
  File "/usr/lib/python3/dist-packages/pycparser/c_parser.py", line 147, in parse
    return self.cparser.parse(
           ~~~~~~~~~~~~~~~~~~^
            input=text,
            ^^^^^^^^^^^
            lexer=self.clex,
            ^^^^^^^^^^^^^^^^
            debug=debug)
            ^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/ply/yacc.py", line 333, in parse
    return self.parseopt_notrack(input, lexer, debug, tracking, tokenfunc)
           ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/ply/yacc.py", line 1201, in parseopt_notrack
    tok = call_errorfunc(self.errorfunc, errtoken, self)
  File "/usr/lib/python3/dist-packages/ply/yacc.py", line 192, in call_errorfunc
    r = errorfunc(token)
  File "/usr/lib/python3/dist-packages/pycparser/c_parser.py", line 1945, in p_error
    self._parse_error(
    ~~~~~~~~~~~~~~~~~^
        'before: %s' % p.value,
        ^^^^^^^^^^^^^^^^^^^^^^^
        self._coord(lineno=p.lineno,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                    column=self.clex.find_tok_column(p)))
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/pycparser/plyparser.py", line 67, in _parse_error
    raise ParseError("%s: %s" % (coord, msg))
pycparser.plyparser.ParseError: /usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:450:31: before: nullptr_t

ERROR Backend subprocess exited when trying to invoke build_wheel
E: pybuild pybuild:389: build: plugin pyproject failed with: exit code=1: python3.13 -m build --skip-dependency-check --no-isolation --wheel --outdir /build/reproducible-path/tpm2-pytss-2.3.0/.pybuild/cpython3_3.13_tpm2_pytss
dh_auto_build: error: pybuild --build -i python{version} -p "3.12 3.13" returned exit code 13
make: *** [debian/rules:17: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2