Skip to content
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

qt-build-utils: default to qmake, qmake6, qmake-qt5 #594

Closed

Conversation

ahayzen-kdab
Copy link
Collaborator

When using Nix with Qt 6 the output of qmake6 -query is incorrect and ends up pointing to the incorrect locations. But qmake -query points to the correct ones.

This solves the issue for Nix but looks like Debian only has qmake for Qt 5 and qmake6 for Qt 6.

Related to #590

@LeonMatthesKDAB
Copy link
Collaborator

I guess this would still work with Debian though, it would just choose Qt 5 by default.
So IMHO we can go ahead with this, as this kind of expresses the intent pretty well:

  1. Choose whatever "default" Qt installation has been chosen
  2. Try Qt6
  3. Try Qt5

However, we may need to ensure this defaulting makes sense when a specific QT_VERSION_MAJOR has been provided.

@ahayzen-kdab
Copy link
Collaborator Author

I guess this would still work with Debian though, it would just choose Qt 5 by default. So IMHO we can go ahead with this, as this kind of expresses the intent pretty well:

1. Choose whatever "default" Qt installation has been chosen

2. Try Qt6

3. Try Qt5

However, we may need to ensure this defaulting makes sense when a specific QT_VERSION_MAJOR has been provided.

So lets pretend that

qmake -> Qt 5
qmake6 -> Qt 6

If you specify QT_VERSION_MAJOR=6, what we want to happen is for it to try qmake, go hey the version is wrong, and continue looking. (which it kinda looks like it does already?).

If you specify QT_VERSION_MAJOR=5, what we want to happen is for it to try qmake, then go hey that's the right version. (which again kinda looks like it might be doing that, need to check).

@ahayzen-kdab ahayzen-kdab force-pushed the 590-qmake-exec-breaks-nix branch from 05f8649 to d013df9 Compare June 26, 2023 14:13
@ahayzen-kdab ahayzen-kdab changed the title WIP: qt-build-utils: default to qmake, qmake6, qmake-qt5 qt-build-utils: default to qmake, qmake6, qmake-qt5 Jun 26, 2023
@ahayzen-kdab ahayzen-kdab marked this pull request as ready for review June 26, 2023 14:13
When using Nix with Qt 6 the output of qmake6 -query is incorrect
and ends up pointing to the incorrect locations. But qmake -query
points to the correct ones.

qt_build_utils also will iterate through the possible qmake
executables and match to the major version.

Related to KDAB#590
@ahayzen-kdab ahayzen-kdab force-pushed the 590-qmake-exec-breaks-nix branch from d013df9 to 403166d Compare June 26, 2023 15:28
@ahayzen-kdab
Copy link
Collaborator Author

Lets report this upstream to Nix first and see what they say...

@Be-ing
Copy link
Contributor

Be-ing commented Jun 26, 2023

I agree. I'm not inclined to hack around a packaging bug that only affects one distro and risk regressions on other distros when it's clearly a bug.

@ahayzen-kdab ahayzen-kdab marked this pull request as draft June 26, 2023 16:49
@Be-ing
Copy link
Contributor

Be-ing commented Jun 26, 2023

The bug was fixed upstream in Nix. Shall we close this?

@ahayzen-kdab
Copy link
Collaborator Author

The bug was fixed upstream in Nix. Shall we close this?

Yup, it may take a while for it to flow from nixpkgs unstable through to a stable release, but it's fixed.

And for now if anyone else gets stuck on this just set your QMAKE env var to point to qmake until qmake6 is fixed.

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