Red Hat Bugzilla – Bug 818348
Qt Creator can't use mingw toolchain
Last modified: 2012-05-03 01:55:37 EDT
Description of problem:
Qt Creator won't use mingw-qt because /usr/bin/mingw32-qmake-qt4 fails.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Start Qt Creator
2. Click Projects in left toolbar.
3. In the Build Settings tab, click Add (build configuration), Clone selected.
4. Next to Qt version, click Manage.
5. Click Add, specify /usr/bin/mingw32-qmake-qt4 in the file selector dialog.
Error message appears at the bottom of the window:
"Could not determine the path to the binaries of the Qt installation, maybe the qmake path is wrong?"
Apparently Qt Creator is using 'qmake-qt4 -query' to discover the environment. The mingw32-qmake-qt4 wrapper script adds a '-spec' option before calling the real qmake-qt4. However, qmake-qt4 can't handle being invoked with *both* -spec and -query, so it reports an error and confuses Qt Creator.
This issue has already been resolved in Fedora 17 and rawhide (which use the new mingw packaging infrastructure and the mingw-w64 toolchain). On Fedora 17 we use a mingw-qt source package which provides a noarch mingw32-qt binary package and an arch-specific mingw32-qt-qmake binary package. On older Fedora versions we've got a mingw32-qt source package which provides a noarch mingw32-qt binary package and a mingw32-qt-qmake source package which provides a noarch mingw32-qt-qmake binary package
It will be quite hard to backport these changes to Fedora 16 as it involves changing a noarch package to an arch-specific package (mingw32-qt-qmake) and involves quite a lot of code duplication (copying over various pieces of the mingw32-qt .spec file). As there are two separate source packages involved this will be difficult to maintain and is easy to break. Therefore I'm not going to fix this issue in older Fedora releases.
Please update to Fedora 17 or use the new mingw-w64 based packages from the testing repository at https://fedoraproject.org/wiki/MinGW/CrossCompilerFramework#Development_and_testing_repository which are compatible with Fedora 16