Skip to content

Build error when installing #682

@DiffuseHyperion

Description

@DiffuseHyperion

On Fedora 43, installing with pip fails due to a build error. Here are the error logs:

  error: subprocess-exited-with-error
  
  × Building wheel for tpm2-pytss (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [152 lines of output]
      /tmp/pip-build-env-ebmyyqmw/overlay/lib/python3.14/site-packages/setuptools/dist.py:759: SetuptoolsDeprecationWarning: License classifiers are deprecated.
      !!
      
              ********************************************************************************
              Please consider removing the following classifiers in favor of a SPDX license expression:
      
              License :: OSI Approved :: BSD License
      
              See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
              ********************************************************************************
      
      !!
        self._finalize_license_expression()
      adding path: /tmp/pip-install-xhbc9w_3/tpm2-pytss_f34426f64a124ee69b22cd41e2e5c253/scripts
      running bdist_wheel
      running build
      running build_py
      creating build/lib.linux-x86_64-cpython-314/tpm2_pytss
      copying src/tpm2_pytss/utils.py -> build/lib.linux-x86_64-cpython-314/tpm2_pytss
      copying src/tpm2_pytss/types.py -> build/lib.linux-x86_64-cpython-314/tpm2_pytss
      copying src/tpm2_pytss/tsskey.py -> build/lib.linux-x86_64-cpython-314/tpm2_pytss
      copying src/tpm2_pytss/policy.py -> build/lib.linux-x86_64-cpython-314/tpm2_pytss
      copying src/tpm2_pytss/fapi_info.py -> build/lib.linux-x86_64-cpython-314/tpm2_pytss
      copying src/tpm2_pytss/encoding.py -> build/lib.linux-x86_64-cpython-314/tpm2_pytss
      copying src/tpm2_pytss/cryptography.py -> build/lib.linux-x86_64-cpython-314/tpm2_pytss
      copying src/tpm2_pytss/constants.py -> build/lib.linux-x86_64-cpython-314/tpm2_pytss
      copying src/tpm2_pytss/__init__.py -> build/lib.linux-x86_64-cpython-314/tpm2_pytss
      copying src/tpm2_pytss/TSS2_Exception.py -> build/lib.linux-x86_64-cpython-314/tpm2_pytss
      copying src/tpm2_pytss/TCTISPIHelper.py -> build/lib.linux-x86_64-cpython-314/tpm2_pytss
      copying src/tpm2_pytss/TCTILdr.py -> build/lib.linux-x86_64-cpython-314/tpm2_pytss
      copying src/tpm2_pytss/TCTI.py -> build/lib.linux-x86_64-cpython-314/tpm2_pytss
      copying src/tpm2_pytss/FAPI.py -> build/lib.linux-x86_64-cpython-314/tpm2_pytss
      copying src/tpm2_pytss/ESAPI.py -> build/lib.linux-x86_64-cpython-314/tpm2_pytss
      creating build/lib.linux-x86_64-cpython-314/tpm2_pytss/internal
      copying src/tpm2_pytss/internal/utils.py -> build/lib.linux-x86_64-cpython-314/tpm2_pytss/internal
      copying src/tpm2_pytss/internal/templates.py -> build/lib.linux-x86_64-cpython-314/tpm2_pytss/internal
      copying src/tpm2_pytss/internal/crypto.py -> build/lib.linux-x86_64-cpython-314/tpm2_pytss/internal
      copying src/tpm2_pytss/internal/__init__.py -> build/lib.linux-x86_64-cpython-314/tpm2_pytss/internal
      running build_ext
      generating cffi module 'build/temp.linux-x86_64-cpython-314/tpm2_pytss._libtpm2_pytss.c'
      creating build/temp.linux-x86_64-cpython-314
      building 'tpm2_pytss._libtpm2_pytss' extension
      creating build/temp.linux-x86_64-cpython-314/build/temp.linux-x86_64-cpython-314
      gcc -fno-strict-overflow -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -fcf-protection -fexceptions -fcf-protection -fexceptions -fcf-protection -fexceptions -O3 -fPIC -I/usr/include -I/usr/include/tss2 -I/usr/include/json-c -I/usr/include/uuid -I/usr/include/tss -I/home/diffusehyperion/PycharmProjects/tpm-testing/.venv/include -I/usr/include/python3.14 -c build/temp.linux-x86_64-cpython-314/tpm2_pytss._libtpm2_pytss.c -o build/temp.linux-x86_64-cpython-314/build/temp.linux-x86_64-cpython-314/tpm2_pytss._libtpm2_pytss.o
      gcc -shared build/temp.linux-x86_64-cpython-314/build/temp.linux-x86_64-cpython-314/tpm2_pytss._libtpm2_pytss.o -L/usr/lib64 -ltss2-rc -ltss2-fapi -ltss2-esys -ltss2-mu -ltss2-tctildr -lssl -ltss2-policy -ltss2-tcti-spi-helper -o build/lib.linux-x86_64-cpython-314/tpm2_pytss/_libtpm2_pytss.abi3.so
      Traceback (most recent call last):
        File "/home/diffusehyperion/PycharmProjects/tpm-testing/.venv/lib/python3.14/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 389, in <module>
          main()
          ~~~~^^
        File "/home/diffusehyperion/PycharmProjects/tpm-testing/.venv/lib/python3.14/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 373, in main
          json_out["return_val"] = hook(**hook_input["kwargs"])
                                   ~~~~^^^^^^^^^^^^^^^^^^^^^^^^
        File "/home/diffusehyperion/PycharmProjects/tpm-testing/.venv/lib/python3.14/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 280, in build_wheel
          return _build_backend().build_wheel(
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
              wheel_directory, config_settings, metadata_directory
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
          )
          ^
        File "/tmp/pip-build-env-ebmyyqmw/overlay/lib/python3.14/site-packages/setuptools/build_meta.py", line 435, in build_wheel
          return _build(['bdist_wheel', '--dist-info-dir', str(metadata_directory)])
        File "/tmp/pip-build-env-ebmyyqmw/overlay/lib/python3.14/site-packages/setuptools/build_meta.py", line 423, in _build
          return self._build_with_temp_dir(
                 ~~~~~~~~~~~~~~~~~~~~~~~~~^
              cmd,
              ^^^^
          ...<3 lines>...
              self._arbitrary_args(config_settings),
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
          )
          ^
        File "/tmp/pip-build-env-ebmyyqmw/overlay/lib/python3.14/site-packages/setuptools/build_meta.py", line 404, in _build_with_temp_dir
          self.run_setup()
          ~~~~~~~~~~~~~~^^
        File "/tmp/pip-build-env-ebmyyqmw/overlay/lib/python3.14/site-packages/setuptools/build_meta.py", line 317, in run_setup
          exec(code, locals())
          ~~~~^^^^^^^^^^^^^^^^
        File "<string>", line 285, in <module>
        File "/tmp/pip-build-env-ebmyyqmw/overlay/lib/python3.14/site-packages/setuptools/__init__.py", line 115, in setup
          return distutils.core.setup(**attrs)
                 ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
        File "/tmp/pip-build-env-ebmyyqmw/overlay/lib/python3.14/site-packages/setuptools/_distutils/core.py", line 186, in setup
          return run_commands(dist)
        File "/tmp/pip-build-env-ebmyyqmw/overlay/lib/python3.14/site-packages/setuptools/_distutils/core.py", line 202, in run_commands
          dist.run_commands()
          ~~~~~~~~~~~~~~~~~^^
        File "/tmp/pip-build-env-ebmyyqmw/overlay/lib/python3.14/site-packages/setuptools/_distutils/dist.py", line 1002, in run_commands
          self.run_command(cmd)
          ~~~~~~~~~~~~~~~~^^^^^
        File "/tmp/pip-build-env-ebmyyqmw/overlay/lib/python3.14/site-packages/setuptools/dist.py", line 1102, in run_command
          super().run_command(command)
          ~~~~~~~~~~~~~~~~~~~^^^^^^^^^
        File "/tmp/pip-build-env-ebmyyqmw/overlay/lib/python3.14/site-packages/setuptools/_distutils/dist.py", line 1021, in run_command
          cmd_obj.run()
          ~~~~~~~~~~~^^
        File "/tmp/pip-build-env-ebmyyqmw/overlay/lib/python3.14/site-packages/setuptools/command/bdist_wheel.py", line 370, in run
          self.run_command("build")
          ~~~~~~~~~~~~~~~~^^^^^^^^^
        File "/tmp/pip-build-env-ebmyyqmw/overlay/lib/python3.14/site-packages/setuptools/_distutils/cmd.py", line 357, in run_command
          self.distribution.run_command(command)
          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
        File "/tmp/pip-build-env-ebmyyqmw/overlay/lib/python3.14/site-packages/setuptools/dist.py", line 1102, in run_command
          super().run_command(command)
          ~~~~~~~~~~~~~~~~~~~^^^^^^^^^
        File "/tmp/pip-build-env-ebmyyqmw/overlay/lib/python3.14/site-packages/setuptools/_distutils/dist.py", line 1021, in run_command
          cmd_obj.run()
          ~~~~~~~~~~~^^
        File "/tmp/pip-build-env-ebmyyqmw/overlay/lib/python3.14/site-packages/setuptools/_distutils/command/build.py", line 135, in run
          self.run_command(cmd_name)
          ~~~~~~~~~~~~~~~~^^^^^^^^^^
        File "/tmp/pip-build-env-ebmyyqmw/overlay/lib/python3.14/site-packages/setuptools/_distutils/cmd.py", line 357, in run_command
          self.distribution.run_command(command)
          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
        File "/tmp/pip-build-env-ebmyyqmw/overlay/lib/python3.14/site-packages/setuptools/dist.py", line 1102, in run_command
          super().run_command(command)
          ~~~~~~~~~~~~~~~~~~~^^^^^^^^^
        File "/tmp/pip-build-env-ebmyyqmw/overlay/lib/python3.14/site-packages/setuptools/_distutils/dist.py", line 1021, in run_command
          cmd_obj.run()
          ~~~~~~~~~~~^^
        File "/tmp/pip-build-env-ebmyyqmw/normal/lib64/python3.14/site-packages/cffi/setuptools_ext.py", line 155, in run
          base_class.run(self)
          ~~~~~~~~~~~~~~^^^^^^
        File "<string>", line 235, in run
        File "<string>", line 215, in get_mappings
        File "/tmp/pip-build-env-ebmyyqmw/overlay/lib/python3.14/site-packages/pycparser/c_parser.py", line 147, in parse
          return self.cparser.parse(
                 ~~~~~~~~~~~~~~~~~~^
                  input=text,
                  ^^^^^^^^^^^
                  lexer=self.clex,
                  ^^^^^^^^^^^^^^^^
                  debug=debug)
                  ^^^^^^^^^^^^
        File "/tmp/pip-build-env-ebmyyqmw/overlay/lib/python3.14/site-packages/pycparser/ply/yacc.py", line 331, in parse
          return self.parseopt_notrack(input, lexer, debug, tracking, tokenfunc)
                 ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-ebmyyqmw/overlay/lib/python3.14/site-packages/pycparser/ply/yacc.py", line 1199, in parseopt_notrack
          tok = call_errorfunc(self.errorfunc, errtoken, self)
        File "/tmp/pip-build-env-ebmyyqmw/overlay/lib/python3.14/site-packages/pycparser/ply/yacc.py", line 193, in call_errorfunc
          r = errorfunc(token)
        File "/tmp/pip-build-env-ebmyyqmw/overlay/lib/python3.14/site-packages/pycparser/c_parser.py", line 1968, in p_error
          self._parse_error(
          ~~~~~~~~~~~~~~~~~^
              'before: %s' % p.value,
              ^^^^^^^^^^^^^^^^^^^^^^^
              self._coord(lineno=p.lineno,
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                          column=self.clex.find_tok_column(p)))
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-ebmyyqmw/overlay/lib/python3.14/site-packages/pycparser/plyparser.py", line 67, in _parse_error
          raise ParseError("%s: %s" % (coord, msg))
      pycparser.plyparser.ParseError: /usr/lib/gcc/x86_64-redhat-linux/15/include/stddef.h:465:31: before: nullptr_t
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for tpm2-pytss
Failed to build tpm2-pytss
error: failed-wheel-build-for-install

× Failed to build installable wheels for some pyproject.toml based projects
╰─> tpm2-pytss

Searching pycparser.plyparser.ParseError: /usr/lib/gcc/x86_64-redhat-linux/15/include/stddef.h:465:31: before: nullptr_t only returns #639, but i'm unsure if it is related.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions