Skip to content

Fix problems in Qt5.11 generator #128

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

Merged
merged 2 commits into from
Oct 14, 2023
Merged

Fix problems in Qt5.11 generator #128

merged 2 commits into from
Oct 14, 2023

Conversation

jbowler
Copy link
Contributor

@jbowler jbowler commented Oct 13, 2023

The fix for Qt5.12 breaks pythonqt_generator for 5.11. Patch includes better checking for precompiled headers and errors out early rather than failing when linking the src/ with mysterious missing symbols.

The fix for Qt5.12 breaks pythonqt_generator for 5.11.  Patch includes
better checking for precompiled headers and errors out early rather than
failing when linking the src/ with mysterious missing symbols.

Signed-off-by: John Bowler <[email protected]>
@jbowler
Copy link
Contributor Author

jbowler commented Oct 13, 2023

Florian Link's last check-in to generator/qtscript_masterinclude.h breaks pythonqt_generator on earlier versions than Qt5.12 (it introduces a duplicate definition because the #define results in declarations of the same functions in two places.)

Tested against Qt5.11.11 using header files generatored from Qt5.11.3, Qt5.12.12 and Qt5.13.2 (Qt5.14.2 generation fails for the same reason as Qt5.11.11 does; the Qt6 coompat changes.)

Also makes the build stop if the precompiled headers aren't found rather than wading through the complication then failing at the link step.

Copy link
Contributor

@mrbean-bremen mrbean-bremen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We really need some tests to avoid this kind of regression...

@jbowler
Copy link
Contributor Author

jbowler commented Oct 13, 2023

We really need some tests to avoid this kind of regression...

generated_cpp_512 was never added; do you know why? Qt5.15.11 compiles and passes the tests with these headers so I could do a pull request with that and even with generated_cpp_513 but there's no point if there is some known problem with those generated files.

Adding tests for the generator requires the official Qt header files for the release. Perfectly possible with a pre-built dedicated test machine but you seem to be building the system (in a docker or similar) each time so that's pretty tricky given that Qt changes the downloads regularly.

@jbowler jbowler mentioned this pull request Oct 14, 2023
@mrbean-bremen
Copy link
Contributor

generated_cpp_512 was never added; do you know why?

I guess it wasn't needed by anybody? Maybe @usiems knows the answer.

Generally, I think it would be nice if the sources could just be generated in a build step for the currently used version by the user, but at the moment it probably would make sense to add the generated sources at least for 5.12 and 5.15 (as soon as that works reliably).

Copy link
Contributor

@mrbean-bremen mrbean-bremen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a side note: the goal is to use cmake instead of qmake at least for Qt6, but this is something that can be added later.

@mrbean-bremen mrbean-bremen merged commit 335d77e into MeVisLab:qt6 Oct 14, 2023
@jbowler jbowler deleted the pull-request-128 branch October 14, 2023 16:20
@usiems
Copy link
Contributor

usiems commented Oct 16, 2023

generated_cpp_512 was never added; do you know why?

I guess it wasn't needed by anybody? Maybe @usiems knows the answer.

The generator didn't work for the 5.12 sources, and I didn't invest the time to find and fix the problem, assuming that the differences between 5.11 and 5.12 wouldn't be that great. The same happened when we switched MeVisLab to Qt 5.15, where the old 5.11 wrappers still are "good enough" for our purposes. Too much other stuff with higher priority.

mrbean-bremen pushed a commit to mrbean-bremen/pythonqt that referenced this pull request Oct 29, 2023
- a previous fix for Qt5.12 breaks pythonqt_generator for 5.11
- includes better checking for precompiled headers and errors out early rather than
  failing when linking the src/ with mysterious missing symbols.
mrbean-bremen pushed a commit that referenced this pull request Oct 29, 2023
- a previous fix for Qt5.12 breaks pythonqt_generator for 5.11
- includes better checking for precompiled headers and errors out early rather than
  failing when linking the src/ with mysterious missing symbols.
mrbean-bremen pushed a commit that referenced this pull request Nov 1, 2023
- a previous fix for Qt5.12 breaks pythonqt_generator for 5.11
- includes better checking for precompiled headers and errors out early rather than
  failing when linking the src/ with mysterious missing symbols.
mrbean-bremen pushed a commit to YuriUfimtsev/pythonqt that referenced this pull request Nov 1, 2023
- a previous fix for Qt5.12 breaks pythonqt_generator for 5.11
- includes better checking for precompiled headers and errors out early rather than
  failing when linking the src/ with mysterious missing symbols.
mrbean-bremen pushed a commit that referenced this pull request Nov 2, 2023
- a previous fix for Qt5.12 breaks pythonqt_generator for 5.11
- includes better checking for precompiled headers and errors out early rather than
  failing when linking the src/ with mysterious missing symbols.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants