cvut / QtMips

MIPS CPU emulator
https://github.com/cvut/QtMips
GNU General Public License v3.0
55 stars 12 forks source link

QtChooser deprecation on Arch Linux #6

Closed petrzjunior closed 3 years ago

petrzjunior commented 4 years ago

qtchooser seems to be a deprecated tool, since qmake itself can find Qt version with QT_SELECT=5 environmental variable.

More precisely there is a severe conflict in AUR-based systems (such as Arch Linux, Gentoo and others). Packages qtchooser and qt5-base cannot be installed together, because qt5-base is basically superset of qtchooser now.

Provided you have only one Qt version installed, problem can be solved by directly calling qmake in build.sh:

-qtchooser -run-tool=qmake -qt=5 -recursive "$ROOT" "QMAKE_RPATHDIR += ../qtmips_machine ../qtmips_osemu ../qtmips_asm"
+qmake -recursive "$ROOT" "QMAKE_RPATHDIR += ../qtmips_machine ../qtmips_osemu ../qtmips_asm"

In case there are more Qt versions installed, it might be worth adding the QT_SELECT=5 into that script. I suggest checking on other distros if this the case as well and maybe go with one of these solutions.

P.S. It might be even worth pushing QtMips into Arch User Repository as a package. The procedure is not difficult at all and I can assist you.

ppisa commented 4 years ago

Thanks for report. I am not sure what is the best solution to document.

I usually call directly

/usr/lib/x86_64-linux-gnu/qt5/bin/qmake

which is really reliable that no incorrect qmake version is chosen. But the location can differ between distributions....

petrzjunior commented 4 years ago

@ppisa For me, qmake is installed at /usr/bin/qmake, so I can call directly $ qmake. Is this different on other distros? Do you have to use an absolute path insto /usr/lib/...?

ppisa commented 4 years ago

May it be /usr/bin/qmake is symlink in your case. It is link to /usr/bin/qtchooser in my case on stable Debian. On older, it was Qt4 version and Qt5 was available as /usr/bin/qmake-qt5 etc...

The absolute path to lib ensures that all these layers are skipped and correct version is run. But that is not ideal. I try to discuss what is the better solution with @fvacek who knows Qt much better than me.

petrzjunior commented 4 years ago

May it be /usr/bin/qmake is symlink in your case.

In my case, it is installed directly in /usr/bin/qmake and there is a symlink from /usr/bin/qmake-qt5.

fvacek commented 4 years ago

Hi, my opinion is that:

ppisa commented 3 years ago

The reference to QtChooser and its use has been removed in the commit 95433b7858d9d22adbc134094733af5a823643d4 Project: c++14, sanitizer, tests, buildscript, designator syntax.