-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pydebug.h not found on Ubuntu 22.04 with Python 3.10 #81
Comments
Until this can be resolved properly in a correct way, a workaround (hack) for anyone running into this is on Ubuntu 22.04 (and nowhere else) is add to the end of
Above if of course an ugly hack, non-portable, et cetera, and only an emergency workaround. |
This is a change in Python 3.10, introduced with this commit, so we probably have to adapt the build script depending on the Python version. |
Ah... the Python people breaking backward compatibility and forcing everyone to update their code. Who could have expected that. (sarcasm off) How about including the Python.h file instead? As discussed in the same ticket. |
Yes, this would be the correct fix, I think. |
Actually, according to this PR |
Great. As long as we don't include any of the other moved files. |
Hmm, critical is to do my hack-workaround last in the file so that the cpython directory is last in search. Otherwise I got some other error as header files were in both directories or something and only the one in the "top" directory worked. So it was critical that it found the top level header files first before the ones in cpython subdirectory. However, for your issue with
|
I would suggest install all Qt packages ( I wish Ubuntu people could use a uniform package naming scheme (as now it is also over the place) like the RHEL people. |
This is what I install on Ubuntu 22.04:
and on RHEL/Rocky 9:
Though not all of the above may be needed to build PythonQt alone. The packages listed are needed to build our application which builds PythonQt as part of its libsrc tree. |
- also remove unneeded "pydebug.h" include -> fixes MeVisLab#81
I actually do this in the docker image and thought that I did it locally, but obviously I was wrong
I tried this, but this creates some incompatibility issues between packages, which I have to sort out first. I'll probably merge the current state(I also removed the unneeded include, which will fix #81), and will check some time later how to optimize this. After all, this is currently only to check that the code generation works in principle, the generated files are not provided - this is something that would certainly be helpful in the future. |
Actually, this comment belongs more to the PR than to this issue, but as the PR will hopefully fix this, I'll leave it. |
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 subdirectorycpython
either by Ubuntu or by Python 3.10. This new include path is not output bypython3-config --includes
used inbuild/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 thecpython
subdirectory and hence compilation works.Compiler error:
System information:
The text was updated successfully, but these errors were encountered: