Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automoc fails on MSYS2/Qt5 #4508

Closed
dmikushin opened this issue Oct 4, 2018 · 3 comments

Comments

Projects
None yet
2 participants
@dmikushin
Copy link

commented Oct 4, 2018

Dear all,

I came across an error from Automoc below, which gives no clue about the cause of failure (Output is empty). The mechanics of Automoc in CMake is not clear. Looks like "cmake_autogen" only launches a command described in variables. But where the command return value is checked? What places should I look at to debug cmake_autogen/automoc in CMake?

Thanks & Kind regards,

  • Dmitry Mikushin.
$ make
[  0%] Automatic MOC for target glazomer
Start

AutoMoc subprocess error
------------------------
The content generation command for "moc_predefs.h" failed.

Command
-------
/mingw64/bin/x86_64-w64-mingw32-g++.exe -dM -E -c /usr/share/cmake-3.12.2/Modules/CMakeCXXCompilerABI.cpp -I/c/Users/dmikushin/glazomer/glazomer/build/glazomer_autogen/include -I/mingw64/include/QtDBus -I/mingw64/include/QtNetwork -I/mingw64/include/QtTest -I/mingw64/include/qwt -I/mingw64/include/libusb-1.0 -I/c/Users/dmikushin/glazomer/glazomer/ThirdParty/eigen -I/c/Users/dmikushin/glazomer/glazomer/src -I/mingw64/include -I/mingw64/include/QtCore -I/mingw64/share/qt5/mkspecs/win32-g++ -I/mingw64/include/QtGui -I/mingw64/include/QtWidgets -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB

Output
------

make[2]: *** [CMakeFiles/glazomer_autogen.dir/build.make:58: CMakeFiles/glazomer_autogen] Error 1
make[1]: *** [CMakeFiles/Makefile2:180: CMakeFiles/glazomer_autogen.dir/all] Error 2
make: *** [Makefile:130: all] Error 2

@mingwandroid

This comment has been minimized.

Copy link
Member

commented Oct 4, 2018

-c /usr/share/cmake-3.12.2

it seems you are using the MSYS2/cmake program here, which should only be used for compiling msys2 dll linked software. Instead of installing cmake you should install mingw-w64-x86_64-cmake or mingw-w64-i686-cmake.

@dmikushin

This comment has been minimized.

Copy link
Author

commented Oct 4, 2018

This is an awesome catch! Now it works, many thanks, Ray.

@dmikushin dmikushin closed this Oct 4, 2018

@mingwandroid

This comment has been minimized.

Copy link
Member

commented Oct 4, 2018

No problem, glad I could help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.