This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 1019952 - mingw[32/64]-cmake sets incorrect path to moc, uic, and rcc
mingw[32/64]-cmake sets incorrect path to moc, uic, and rcc
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: mingw-qt5-qtbase (Show other bugs)
18
x86_64 Linux
unspecified Severity high
: ---
: ---
Assigned To: Erik van Pienbroek
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-16 12:53 EDT by Patrick Noffke
Modified: 2013-12-03 05:39 EST (History)
1 user (show)

See Also:
Fixed In Version: mingw-qt5-qtbase-5.1.1-5.fc19
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-12-03 05:39:39 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Simple hello example that uses moc. (91.33 KB, application/x-xz)
2013-10-16 12:53 EDT, Patrick Noffke
no flags Details

  None (edit)
Description Patrick Noffke 2013-10-16 12:53:49 EDT
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;'
Comment 1 Fedora Update System 2013-11-17 19:39:20 EST
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
Comment 2 Fedora Update System 2013-11-19 00:23:35 EST
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).
Comment 3 Patrick Noffke 2013-11-26 10:23:26 EST
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".
Comment 4 Fedora Update System 2013-11-26 23:31:08 EST
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).
Comment 5 Fedora Update System 2013-12-01 04:39:21 EST
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).
Comment 6 Patrick Noffke 2013-12-02 10:47:12 EST
It works now, thanks!
Comment 7 Fedora Update System 2013-12-03 05:39:39 EST
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.

Note You need to log in before you can comment on or make changes to this bug.