Created attachment 813062 [details] Simple hello example with build output. Description of problem: When using mingw32-cmake (or mingw64-cmake), the build fails looking for Qt5Widgets.lib (and the generated makefile contains other Qt5 libs ending in .lib). Version-Release number of selected component (if applicable): mingw32-qt5-qtbase-5.0.2-3.fc18.noarch How reproducible: Every time. Steps to Reproduce: 1. Uncompress attached archive and place files hello.cpp and CMakeLists.txt in a test directory. 2. cd to test directory 3. mkdir build && cd build 4. mingw32-cmake .. 5. make Actual results: make[2]: *** No rule to make target `/usr/i686-w64-mingw32/sys-root/mingw/lib/Qt5Widgets.lib', needed by `mingw-cmake-hello.exe'. Stop. Expected results: Successful linking. Additional info: In the file build/CMakeFiles/mingw-cmake-hello.dir/build.make, at line 143 on my box, there is a dependency on /usr/i686-w64-mingw32/sys-root/mingw/lib/Qt5Widgets.lib. I guess this should be /usr/i686-w64-mingw32/sys-root/mingw/lib/libQt5Widgets.dll.a. Similarly, in build/CMakeFiles/mingw-cmake-hello.dir/link.txt, the linker command contains the Qt5Widgets.lib file instead of libQt5Widgets.dll.a.
I'm changing the version to Fedora 19, since there is a similar problem there, with mingw32-qt5-qtbase-5.1.0-1.fc19.noarch. However, now it fails running mingw32-cmake (trying to find Qt5Core.dll instead of libQt5Core.dll.a) Here is the output of mingw32-cmake: $ mingw32-cmake .. CMake Error at /usr/i686-w64-mingw32/sys-root/mingw/lib/cmake/Qt5Core/Qt5CoreConfig.cmake:15 (message): The imported target "Qt5::Core" references the file "/usr/i686-w64-mingw32/sys-root/mingw/lib/Qt5Core.dll" but this file does not exist. Possible reasons include: * The file was deleted, renamed, or moved to another location. * An install or uninstall procedure did not complete successfully. * The installation package was faulty and contained "/usr/i686-w64-mingw32/sys-root/mingw/lib/cmake/Qt5Core/Qt5CoreConfig.cmake" but not all the files it references. Call Stack (most recent call first): /usr/i686-w64-mingw32/sys-root/mingw/lib/cmake/Qt5Core/Qt5CoreConfig.cmake:32 (_qt5_Core_check_file_exists) /usr/i686-w64-mingw32/sys-root/mingw/lib/cmake/Qt5Core/Qt5CoreConfig.cmake:119 (_populate_Core_target_properties) /usr/i686-w64-mingw32/sys-root/mingw/lib/cmake/Qt5Gui/Qt5GuiConfig.cmake:83 (find_package) /usr/i686-w64-mingw32/sys-root/mingw/lib/cmake/Qt5Widgets/Qt5WidgetsConfig.cmake:83 (find_package) CMakeLists.txt:3 (find_package) CMake Warning (dev) in CMakeLists.txt: No cmake_minimum_required command is present. A line of code such as cmake_minimum_required(VERSION 2.8) should be added at the top of the file. The version specified may be lower if you wish to support older CMake versions for this project. For more information run "cmake --help-policy CMP0000". This warning is for project developers. Use -Wno-dev to suppress it. -- Configuring incomplete, errors occurred!
I just took a look up the upstream git repository and found some commits which look related to the bug mentioned here: https://qt.gitorious.org/qt/qtbase/commit/703cca8bb7607201aff5a2f833d66dc80a7d0e4d https://qt.gitorious.org/qt/qtbase/commit/e29b35024e3adf3b58770573cb512395bc5fe176 https://qt.gitorious.org/qt/qtbase/commit/e6bade8f87f849c4c155d5f527c94ada596cf193 All these commits are part of the just released Qt 5.2.0 beta1 which I'm currently preparing locally. Once Qt 5.2.0 beta1 is built successfully I'll do more testing here. If CMake support works fine with that version, I'll try to backport the related commits to F18 and F19
I've prepared scratch builds for F18 and F19 with Qt 5.2.0 beta 1: Fedora 18: http://koji.fedoraproject.org/koji/taskinfo?taskID=6088858 Fedora 19: http://koji.fedoraproject.org/koji/taskinfo?taskID=6088891 With this version the CMake test doesn't fail on library errors any more, but on my environment it now fails with this error: CMake Error at /usr/i686-w64-mingw32/sys-root/mingw/lib/cmake/Qt5Core/Qt5CoreConfig.cmake:110 (list): list sub-command REMOVE_DUPLICATES requires list to be present. Call Stack (most recent call first): /usr/i686-w64-mingw32/sys-root/mingw/lib/cmake/Qt5Gui/Qt5GuiConfig.cmake:90 (find_package) /usr/i686-w64-mingw32/sys-root/mingw/lib/cmake/Qt5Widgets/Qt5WidgetsConfig.cmake:90 (find_package) CMakeLists.txt:3 (find_package) I'm not familiar enough with CMake to resolve this issue myself. Perhaps you could take a look at this?
Probably there is a variable after REMOVE_DUPLICATES that is empty. Can you post the file Qt5CoreConfig.cmake? Or you can try this right before the offending line (110): message("Printing variable blah: ${variable_name}") where variable_name gets replaced with whatever follows REMOVE_DUPLICATES.
mingw-qt5-qttranslations-5.1.1-1.fc19,mingw-qt5-qttools-5.1.1-1.fc19,mingw-qt5-qtsensors-5.1.1-1.fc19,mingw-qt5-qtscript-5.1.1-1.fc19,mingw-qt5-qtquick1-5.1.1-1.fc19,mingw-qt5-qtjsbackend-5.1.1-1.fc19,mingw-qt5-qtimageformats-5.1.1-1.fc19,mingw-qt5-qtgraphicaleffects-5.1.1-1.fc19,mingw-qt5-qtdeclarative-5.1.1-1.fc19,mingw-qt5-qtbase-5.1.1-3.fc19,mingw-qt5-qt3d-5.0.0-0.5.git20130510.0158ce78.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/mingw-qt5-qttranslations-5.1.1-1.fc19,mingw-qt5-qttools-5.1.1-1.fc19,mingw-qt5-qtsensors-5.1.1-1.fc19,mingw-qt5-qtscript-5.1.1-1.fc19,mingw-qt5-qtquick1-5.1.1-1.fc19,mingw-qt5-qtjsbackend-5.1.1-1.fc19,mingw-qt5-qtimageformats-5.1.1-1.fc19,mingw-qt5-qtgraphicaleffects-5.1.1-1.fc19,mingw-qt5-qtdeclarative-5.1.1-1.fc19,mingw-qt5-qtbase-5.1.1-3.fc19,mingw-qt5-qt3d-5.0.0-0.5.git20130510.0158ce78.fc19
Package mingw-qt5-qttranslations-5.1.1-1.fc19, mingw-qt5-qttools-5.1.1-1.fc19, mingw-qt5-qtsensors-5.1.1-1.fc19, mingw-qt5-qtscript-5.1.1-1.fc19, mingw-qt5-qtquick1-5.1.1-1.fc19, mingw-qt5-qtjsbackend-5.1.1-1.fc19, mingw-qt5-qtimageformats-5.1.1-1.fc19, mingw-qt5-qtgraphicaleffects-5.1.1-1.fc19, mingw-qt5-qtdeclarative-5.1.1-1.fc19, mingw-qt5-qtbase-5.1.1-3.fc19, mingw-qt5-qt3d-5.0.0-0.5.git20130510.0158ce78.fc19: * should fix your issue, * was pushed to the Fedora 19 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing mingw-qt5-qttranslations-5.1.1-1.fc19 mingw-qt5-qttools-5.1.1-1.fc19 mingw-qt5-qtsensors-5.1.1-1.fc19 mingw-qt5-qtscript-5.1.1-1.fc19 mingw-qt5-qtquick1-5.1.1-1.fc19 mingw-qt5-qtjsbackend-5.1.1-1.fc19 mingw-qt5-qtimageformats-5.1.1-1.fc19 mingw-qt5-qtgraphicaleffects-5.1.1-1.fc19 mingw-qt5-qtdeclarative-5.1.1-1.fc19 mingw-qt5-qtbase-5.1.1-3.fc19 mingw-qt5-qt3d-5.0.0-0.5.git20130510.0158ce78.fc19' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2013-21648/mingw-qt5-qttranslations-5.1.1-1.fc19,mingw-qt5-qttools-5.1.1-1.fc19,mingw-qt5-qtsensors-5.1.1-1.fc19,mingw-qt5-qtscript-5.1.1-1.fc19,mingw-qt5-qtquick1-5.1.1-1.fc19,mingw-qt5-qtjsbackend-5.1.1-1.fc19,mingw-qt5-qtimageformats-5.1.1-1.fc19,mingw-qt5-qtgraphicaleffects-5.1.1-1.fc19,mingw-qt5-qtdeclarative-5.1.1-1.fc19,mingw-qt5-qtbase-5.1.1-3.fc19,mingw-qt5-qt3d-5.0.0-0.5.git20130510.0158ce78.fc19 then log in and leave karma (feedback).
Now it fails looking for uic (I think it should be looking for uic-qt5 instead). Here are the packages I updated (using yum --enablerepo=updates-testing update mingw*): Dependency Installed: mingw32-gettext.noarch 0:0.18.2.1-3.fc19 mingw32-openssl.noarch 0:1.0.1e-3.fc19 mingw32-postgresql.noarch 0:9.2.5-1.fc19 mingw32-termcap.noarch 0:1.3.1-15.fc19 Updated: mingw32-qt5-qmake.x86_64 0:5.1.1-3.fc19 mingw32-qt5-qmldevtools.x86_64 0:5.1.1-1.fc19 mingw32-qt5-qt3d.noarch 0:5.0.0-0.5.git20130510.0158ce78.fc19 mingw32-qt5-qtbase.noarch 0:5.1.1-3.fc19 mingw32-qt5-qtbase-devel.x86_64 0:5.1.1-3.fc19 mingw32-qt5-qtbase-static.noarch 0:5.1.1-3.fc19 mingw32-qt5-qtdeclarative.noarch 0:5.1.1-1.fc19 mingw32-qt5-qtgraphicaleffects.noarch 0:5.1.1-1.fc19 mingw32-qt5-qtimageformats.noarch 0:5.1.1-1.fc19 mingw32-qt5-qtjsbackend.noarch 0:5.1.1-1.fc19 mingw32-qt5-qtquick1.noarch 0:5.1.1-1.fc19 mingw32-qt5-qtscript.noarch 0:5.1.1-1.fc19 mingw32-qt5-qtsensors.noarch 0:5.1.1-1.fc19 mingw32-qt5-qttools.noarch 0:5.1.1-1.fc19 mingw32-qt5-qttools-lrelease.x86_64 0:5.1.1-1.fc19 mingw32-qt5-qttranslations.noarch 0:5.1.1-1.fc19 And here is the output of mingw32-cmake: $ mingw32-cmake .. -- The C compiler identification is GNU 4.8.2 -- The CXX compiler identification is GNU 4.8.2 -- Check for working C compiler: /usr/bin/i686-w64-mingw32-gcc -- Check for working C compiler: /usr/bin/i686-w64-mingw32-gcc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler: /usr/bin/i686-w64-mingw32-g++ -- Check for working CXX compiler: /usr/bin/i686-w64-mingw32-g++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done CMake Error at /usr/i686-w64-mingw32/sys-root/mingw/lib/cmake/Qt5Widgets/Qt5WidgetsConfig.cmake:15 (message): The imported target "Qt5::Widgets" references the file "/usr/i686-w64-mingw32/bin/uic" but this file does not exist. Possible reasons include: * The file was deleted, renamed, or moved to another location. * An install or uninstall procedure did not complete successfully. * The installation package was faulty and contained "/usr/i686-w64-mingw32/sys-root/mingw/lib/cmake/Qt5Widgets/Qt5WidgetsConfigExtras.cmake" but not all the files it references. Call Stack (most recent call first): /usr/i686-w64-mingw32/sys-root/mingw/lib/cmake/Qt5Widgets/Qt5WidgetsConfigExtras.cmake:6 (_qt5_Widgets_check_file_exists) /usr/i686-w64-mingw32/sys-root/mingw/lib/cmake/Qt5Widgets/Qt5WidgetsConfig.cmake:139 (include) CMakeLists.txt:3 (find_package) CMake Warning (dev) in CMakeLists.txt: No cmake_minimum_required command is present. A line of code such as cmake_minimum_required(VERSION 2.8) should be added at the top of the file. The version specified may be lower if you wish to support older CMake versions for this project. For more information run "cmake --help-policy CMP0000". This warning is for project developers. Use -Wno-dev to suppress it. -- Configuring incomplete, errors occurred! See also "/home/pnoffke/tmp/mingw-cmake/mingw-cmake-hello/build/CMakeFiles/CMakeOutput.log".
I just reproduced the issue here. I'll look into it, but a quick workaround is to install the mingw32-qt package (Qt4) which provides /usr/i686-w64-mingw32/bin/uic
Apparently I forgot to patch one file (containing the reference to the uic tool). An updated package is now being built. I'll push the updated package once the build has completed
Package mingw-qt5-qttranslations-5.1.1-1.fc19, mingw-qt5-qttools-5.1.1-1.fc19, mingw-qt5-qtsensors-5.1.1-1.fc19, mingw-qt5-qtscript-5.1.1-1.fc19, mingw-qt5-qtquick1-5.1.1-1.fc19, mingw-qt5-qtjsbackend-5.1.1-1.fc19, mingw-qt5-qtimageformats-5.1.1-1.fc19, mingw-qt5-qtgraphicaleffects-5.1.1-1.fc19, mingw-qt5-qtdeclarative-5.1.1-1.fc19, mingw-qt5-qt3d-5.0.0-0.5.git20130510.0158ce78.fc19, mingw-qt5-qtbase-5.1.1-4.fc19: * should fix your issue, * was pushed to the Fedora 19 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing mingw-qt5-qttranslations-5.1.1-1.fc19 mingw-qt5-qttools-5.1.1-1.fc19 mingw-qt5-qtsensors-5.1.1-1.fc19 mingw-qt5-qtscript-5.1.1-1.fc19 mingw-qt5-qtquick1-5.1.1-1.fc19 mingw-qt5-qtjsbackend-5.1.1-1.fc19 mingw-qt5-qtimageformats-5.1.1-1.fc19 mingw-qt5-qtgraphicaleffects-5.1.1-1.fc19 mingw-qt5-qtdeclarative-5.1.1-1.fc19 mingw-qt5-qt3d-5.0.0-0.5.git20130510.0158ce78.fc19 mingw-qt5-qtbase-5.1.1-4.fc19' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2013-21648/mingw-qt5-qttranslations-5.1.1-1.fc19,mingw-qt5-qttools-5.1.1-1.fc19,mingw-qt5-qtsensors-5.1.1-1.fc19,mingw-qt5-qtscript-5.1.1-1.fc19,mingw-qt5-qtquick1-5.1.1-1.fc19,mingw-qt5-qtjsbackend-5.1.1-1.fc19,mingw-qt5-qtimageformats-5.1.1-1.fc19,mingw-qt5-qtgraphicaleffects-5.1.1-1.fc19,mingw-qt5-qtdeclarative-5.1.1-1.fc19,mingw-qt5-qtbase-5.1.1-4.fc19,mingw-qt5-qt3d-5.0.0-0.5.git20130510.0158ce78.fc19 then log in and leave karma (feedback).
Looks like the same issue. Something other file must be referencing uic. Regarding comment #8, I don't know if Qt4's uic is compatible with Qt5's uic. Updated: mingw32-qt5-qmake.x86_64 0:5.1.1-4.fc19 mingw32-qt5-qtbase.noarch 0:5.1.1-4.fc19 mingw32-qt5-qtbase-devel.x86_64 0:5.1.1-4.fc19 mingw32-qt5-qtbase-static.noarch 0:5.1.1-4.fc19 $ mingw32-cmake .. -- The C compiler identification is GNU 4.8.2 -- The CXX compiler identification is GNU 4.8.2 -- Check for working C compiler: /usr/bin/i686-w64-mingw32-gcc -- Check for working C compiler: /usr/bin/i686-w64-mingw32-gcc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler: /usr/bin/i686-w64-mingw32-g++ -- Check for working CXX compiler: /usr/bin/i686-w64-mingw32-g++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done CMake Error at /usr/i686-w64-mingw32/sys-root/mingw/lib/cmake/Qt5Widgets/Qt5WidgetsConfig.cmake:15 (message): The imported target "Qt5::Widgets" references the file "/usr/i686-w64-mingw32/bin/uic" but this file does not exist. Possible reasons include: * The file was deleted, renamed, or moved to another location. * An install or uninstall procedure did not complete successfully. * The installation package was faulty and contained "/usr/i686-w64-mingw32/sys-root/mingw/lib/cmake/Qt5Widgets/Qt5WidgetsConfigExtras.cmake" but not all the files it references. Call Stack (most recent call first): /usr/i686-w64-mingw32/sys-root/mingw/lib/cmake/Qt5Widgets/Qt5WidgetsConfigExtras.cmake:6 (_qt5_Widgets_check_file_exists) /usr/i686-w64-mingw32/sys-root/mingw/lib/cmake/Qt5Widgets/Qt5WidgetsConfig.cmake:139 (include) CMakeLists.txt:3 (find_package) CMake Warning (dev) in CMakeLists.txt: No cmake_minimum_required command is present. A line of code such as cmake_minimum_required(VERSION 2.8) should be added at the top of the file. The version specified may be lower if you wish to support older CMake versions for this project. For more information run "cmake --help-policy CMP0000". This warning is for project developers. Use -Wno-dev to suppress it. -- Configuring incomplete, errors occurred! See also "/home/pnoffke/tmp/mingw-cmake/mingw-cmake-hello/build/CMakeFiles/CMakeOutput.log".
Package mingw-qt5-qtbase-5.1.1-5.fc19, mingw-qt5-qttranslations-5.1.1-1.fc19, mingw-qt5-qttools-5.1.1-1.fc19, mingw-qt5-qtsensors-5.1.1-1.fc19, mingw-qt5-qtscript-5.1.1-1.fc19, mingw-qt5-qtquick1-5.1.1-1.fc19, mingw-qt5-qtjsbackend-5.1.1-1.fc19, mingw-qt5-qtimageformats-5.1.1-1.fc19, mingw-qt5-qtgraphicaleffects-5.1.1-1.fc19, mingw-qt5-qtdeclarative-5.1.1-1.fc19, mingw-qt5-qt3d-5.0.0-0.5.git20130510.0158ce78.fc19: * should fix your issue, * was pushed to the Fedora 19 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing mingw-qt5-qtbase-5.1.1-5.fc19 mingw-qt5-qttranslations-5.1.1-1.fc19 mingw-qt5-qttools-5.1.1-1.fc19 mingw-qt5-qtsensors-5.1.1-1.fc19 mingw-qt5-qtscript-5.1.1-1.fc19 mingw-qt5-qtquick1-5.1.1-1.fc19 mingw-qt5-qtjsbackend-5.1.1-1.fc19 mingw-qt5-qtimageformats-5.1.1-1.fc19 mingw-qt5-qtgraphicaleffects-5.1.1-1.fc19 mingw-qt5-qtdeclarative-5.1.1-1.fc19 mingw-qt5-qt3d-5.0.0-0.5.git20130510.0158ce78.fc19' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2013-21648/mingw-qt5-qttranslations-5.1.1-1.fc19,mingw-qt5-qttools-5.1.1-1.fc19,mingw-qt5-qtsensors-5.1.1-1.fc19,mingw-qt5-qtscript-5.1.1-1.fc19,mingw-qt5-qtquick1-5.1.1-1.fc19,mingw-qt5-qtjsbackend-5.1.1-1.fc19,mingw-qt5-qtimageformats-5.1.1-1.fc19,mingw-qt5-qtgraphicaleffects-5.1.1-1.fc19,mingw-qt5-qtdeclarative-5.1.1-1.fc19,mingw-qt5-qtbase-5.1.1-5.fc19,mingw-qt5-qt3d-5.0.0-0.5.git20130510.0158ce78.fc19 then log in and leave karma (feedback).
It works now, thanks!
mingw-qt5-qtbase-5.1.1-5.fc19, mingw-qt5-qttranslations-5.1.1-1.fc19, mingw-qt5-qttools-5.1.1-1.fc19, mingw-qt5-qtsensors-5.1.1-1.fc19, mingw-qt5-qtscript-5.1.1-1.fc19, mingw-qt5-qtquick1-5.1.1-1.fc19, mingw-qt5-qtjsbackend-5.1.1-1.fc19, mingw-qt5-qtimageformats-5.1.1-1.fc19, mingw-qt5-qtgraphicaleffects-5.1.1-1.fc19, mingw-qt5-qtdeclarative-5.1.1-1.fc19, mingw-qt5-qt3d-5.0.0-0.5.git20130510.0158ce78.fc19 has been pushed to the Fedora 19 stable repository. If problems still persist, please make note of it in this bug report.