Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 476578

Summary: [qt overlay] dev-util/cmake - Qt5 found, but uses Qt4's uic version (/usr/bin/uic)
Product: Gentoo Linux Reporter: Stefan Böhmann <devel>
Component: [OLD] DevelopmentAssignee: Qt Bug Alias <qt>
Status: RESOLVED INVALID    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Qt5WidgetsConfig.cmake
Qt5WidgetsConfigExtras.cmake
Qt5WidgetsConfigVersion.cmake
Qt5WidgetsMacros.cmake
List of files installed by QtWidgets (equery f qtwidgets output)

Description Stefan Böhmann 2013-07-11 20:45:28 UTC
With Qt5 (5.1.0 from qt overlay) a cmake based project can find the right Qt version (if Qt5 and Qt4 is installed) and can compile and link basic code. 

But the build fails, when I use ui files (Qt Designer files) in my Qt5 project. Looks like cmake then uses the wrong uic binary (/usr/bin/uic instead of /usr/lib64/qt5/bin/uic). Therefor it generates code with an QtCore/QAction include instead of the right QtWidgets/QAction include and the compile fails. 

Maybe similar applies for other Qt executables (rcc, moc, ...).

Reproducible: Always
Comment 1 Davide Pesavento (RETIRED) gentoo-dev 2013-07-11 23:44:14 UTC
Attach the cmake files installed by qtwidgets please
Comment 2 Stefan Böhmann 2013-07-13 13:18:46 UTC
Created attachment 353202 [details]
Qt5WidgetsConfig.cmake

1 of 4 cmake files installed by QtWidgets into /usr/lib64/cmake/Qt5Widgets/
Comment 3 Stefan Böhmann 2013-07-13 13:19:31 UTC
Created attachment 353204 [details]
Qt5WidgetsConfigExtras.cmake

2 of 4 cmake files installed by QtWidgets into /usr/lib64/cmake/Qt5Widgets/
Comment 4 Stefan Böhmann 2013-07-13 13:20:04 UTC
Created attachment 353206 [details]
Qt5WidgetsConfigVersion.cmake

3 of 4 cmake files installed by QtWidgets into /usr/lib64/cmake/Qt5Widgets/
Comment 5 Stefan Böhmann 2013-07-13 13:20:27 UTC
Created attachment 353208 [details]
Qt5WidgetsMacros.cmake

4 of 4 cmake files installed by QtWidgets into /usr/lib64/cmake/Qt5Widgets/
Comment 6 Stefan Böhmann 2013-07-13 13:22:20 UTC
Created attachment 353210 [details]
List of files installed by QtWidgets (equery f qtwidgets output)
Comment 7 Davide Pesavento (RETIRED) gentoo-dev 2013-07-13 14:31:11 UTC
In the second file you attached there's

    set(imported_location "${_qt5Widgets_install_prefix}/lib64/qt5/bin/uic")

so the path looks good to me.

Can you attach a testcase that reproduces the failure please?
Comment 8 Stefan Böhmann 2013-07-13 20:16:36 UTC
Sorry guys. It turned out that there was an error in my makefile. I had forgotten to call find_package(Qt5Widgets), but the error message has put me on the wrong track.

Thank you for your efforts!