Created attachment 813065 [details] Simple hello example that uses moc. Description of problem: When using mingw32-cmake (or mingw64-cmake) with a Qt5 application that uses moc, uic, or rcc, the path to the corresponding program will be /usr/i686-w64-mingw32/sys-root/mingw/bin/ instead of /usr/i686-w64-mingw32/bin 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. Extract attached archive and place files hello.cpp, hellomoc.h, and CMakeLists.txt in a test directory. 2. cd to the test directory. 3. mkdir build && cd build 4. mingw32-cmake .. 5. VERBOSE=1 make Actual results: Generating moc_hellomoc.cpp /usr/i686-w64-mingw32/sys-root/mingw/bin/moc -I/usr/i686-w64-mingw32/sys-root/mingw/include/qt5/QtWidgets -I/usr/i686-w64-mingw32/sys-root/mingw/include/qt5/QtGui -I/usr/i686-w64-mingw32/sys-root/mingw/include/qt5/QtCore -I/usr/i686-w64-mingw32/sys-root/mingw/include/qt5 -I/usr/i686-w64-mingw32/sys-root/mingw/share/qt5/mkspecs/win32-g++-cross -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -o /home/pnoffke/accucam/trunk/build/mingw-cmake-hello-moc/build/moc_hellomoc.cpp /home/pnoffke/accucam/trunk/build/mingw-cmake-hello-moc/hellomoc.h No such file or directory AUTOMOC: error: process for /home/pnoffke/accucam/trunk/build/mingw-cmake-hello-moc/build/moc_hellomoc.cpp failed: No such file or directory moc failed... make[2]: *** [CMakeFiles/mingw-cmake-hello_automoc] Error 1 make[2]: Leaving directory `/home/pnoffke/accucam/trunk/build/mingw-cmake-hello-moc/build' make[1]: *** [CMakeFiles/mingw-cmake-hello_automoc.dir/all] Error 2 make[1]: Leaving directory `/home/pnoffke/accucam/trunk/build/mingw-cmake-hello-moc/build' make: *** [all] Error 2 Expected results: Run /usr/i686-w64-mingw32/bin/moc-qt5 instead of /usr/i686-w64-mingw32/sys-root/mingw/bin/moc. Additional info: If I run mingw32-cmake as a rule in a makefile, then I can run a set of "fixup" rules as follows before running make. This corrects this problem for me, but it is not ideal because the whole build needs to be redone every time a CMakeLists.txt file is modified. find $(PRODUCT_BUILD_DIR) -name AutomocInfo.cmake | xargs sed -i 's;AM_QT_MOC_EXECUTABLE .*;AM_QT_MOC_EXECUTABLE "/usr/i686-w64-mingw32/bin/moc-qt5");' find $(PRODUCT_BUILD_DIR) -name build.make | xargs sed -i 's;/usr/i686-w64-mingw32/sys-root/mingw/bin/moc;/usr/i686-w64-mingw32/bin/moc-qt5;' find $(PRODUCT_BUILD_DIR) -name build.make | xargs sed -i 's;/usr/i686-w64-mingw32/sys-root/mingw/bin/uic;/usr/i686-w64-mingw32/bin/uic-qt5;' find $(PRODUCT_BUILD_DIR) -name build.make | xargs sed -i 's;/usr/i686-w64-mingw32/sys-root/mingw/bin/rcc;/usr/i686-w64-mingw32/bin/rcc-qt5;'
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). $ 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-moc/build/CMakeFiles/CMakeOutput.log".
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).
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.