Description
When trying to build PythonQt on Ubuntu 22.04 LTS with distribution-shipped Python 3.10, the header pydebug.h
is not found automatically. This is because it has been moved to a subdirectory cpython
either by Ubuntu or by Python 3.10. This new include path is not output by python3-config --includes
used in build/python.prf
so the expectation might be that one is supposed to use #include <cpython/pydebug.h>
since Python 3.10. There might also be other header files which have moved but this is the first reported by the compiler. With Python 3.9 (RHEL 9) and earlier (v3.8 on Ubuntu 20.04 LTS, v3.6 on RHEL8, v2.7 on RHEL 7, v2.6 on RHEL 6) this specific file is not located in the cpython
subdirectory and hence compilation works.
Compiler error:
PythonQt.cpp:61:10: fatal error: pydebug.h: No such file or directory
61 | #include <pydebug.h>
| ^~~~~~~~~~~
compilation terminated.
System information:
$ cat /etc/os-release | grep PRETTY_NAME
PRETTY_NAME="Ubuntu 22.04.1 LTS"
$ gcc --version
gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ python3 --version
Python 3.10.6
$ qmake --version
QMake version 3.1
Using Qt version 5.15.3 in /usr/lib/x86_64-linux-gnu
$ python3-config --includes
-I/usr/include/python3.10 -I/usr/include/python3.10
$ find /usr -name pydebug.h
/usr/include/python3.10/cpython/pydebug.h