Created attachment 1297785 [details] cmake project Description of problem: Error when compiling Qt4/CMake project. Version-Release number of selected component (if applicable): mingw32-qt-4.8.7-3.fc26.noarch How reproducible: Always Steps to Reproduce: Try compile attached project with mingw32-cmake make Actual results: $ make -j5 Scanning dependencies of target helloworld [ 50%] Building CXX object CMakeFiles/helloworld.dir/main.cpp.obj In file included from /usr/i686-w64-mingw32/sys-root/mingw/include/c++/bits/stl_algo.h:59:0, from /usr/i686-w64-mingw32/sys-root/mingw/include/c++/algorithm:62, from /usr/i686-w64-mingw32/sys-root/mingw/include/QtCore/qglobal.h:68, from /usr/i686-w64-mingw32/sys-root/mingw/include/QtCore/qnamespace.h:45, from /usr/i686-w64-mingw32/sys-root/mingw/include/QtCore/qobjectdefs.h:45, from /usr/i686-w64-mingw32/sys-root/mingw/include/QtGui/qwindowdefs.h:45, from /usr/i686-w64-mingw32/sys-root/mingw/include/QtGui/qwidget.h:46, from /usr/i686-w64-mingw32/sys-root/mingw/include/QtGui/qmainwindow.h:45, from /usr/i686-w64-mingw32/sys-root/mingw/include/QtGui/QMainWindow:1, from /home/taurus/tmp/helloworld/main.cpp:1: /usr/i686-w64-mingw32/sys-root/mingw/include/c++/cstdlib:75:15: fatal error: stdlib.h: No such file or directory #include_next <stdlib.h> ^~~~~~~~~~ compilation terminated. make[2]: *** [CMakeFiles/helloworld.dir/build.make:64: CMakeFiles/helloworld.dir/main.cpp.obj] Error 1 make[1]: *** [CMakeFiles/Makefile2:68: CMakeFiles/helloworld.dir/all] Error 2 make: *** [Makefile:84: all] Error 2 Expected results: No compilation error Additional info: Project can be compiled with mingw-qt5 without problem.
Created attachment 1297791 [details] cmake project
Workaround: [PluginManager] DisabledPlugins=/usr/lib64/qt5/plugins/designer/kf5deprecatedwidgets.so, /usr/lib64/qt5/plugins/designer/kf5widgets.so, /usr/lib64/qt5/plugins/designer/kdewebkit5widgets.so works for me.
Previous comment is wrong. I sent to wrong tab.
Include directories: $ cat CMakeFiles/helloworld.dir/includes_CXX.rsp -isystem /usr/i686-w64-mingw32/sys-root/mingw/include -isystem /usr/i686-w64-mingw32/sys-root/mingw/include/QtGui -isystem /usr/i686-w64-mingw32/sys-root/mingw/include/QtCore So first include -isystem /usr/i686-w64-mingw32/sys-root/mingw/include produce this error. If compile with non cross-compiling environment includes are -isystem /usr/include/QtGui -isystem /usr/include/QtCore. Without -isystem /usr/include. If add -isystem /usr/include manually then we get the same error. $ /usr/bin/g++ -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NO_DEBUG -isystem /usr/include -isystem /usr/include/QtGui -isystem /usr/include/QtCore -o CMakeFiles/helloworld.dir/main.cpp.o -c /home/taurus/tmp/helloworld/main.cpp In file included from /usr/include/c++/7/bits/stl_algo.h:59:0, from /usr/include/c++/7/algorithm:62, from /usr/include/QtCore/qglobal.h:68, from /usr/include/QtCore/qnamespace.h:45, from /usr/include/QtCore/qobjectdefs.h:45, from /usr/include/QtGui/qwindowdefs.h:45, from /usr/include/QtGui/qwidget.h:46, from /usr/include/QtGui/qmainwindow.h:45, from /usr/include/QtGui/QMainWindow:1, from /home/taurus/tmp/helloworld/main.cpp:1: /usr/include/c++/7/cstdlib:75:15: fatal error: stdlib.h: No such file or directory #include_next <stdlib.h> ^~~~~~~~~~ compilation terminated. Include directories added in begining of /usr/share/cmake/Modules/UseQt4.cmake. if(QT_INCLUDE_DIRS_NO_SYSTEM) include_directories(${QT_INCLUDE_DIR}) else(QT_INCLUDE_DIRS_NO_SYSTEM) include_directories(SYSTEM ${QT_INCLUDE_DIR}) # Here added -isystem endif(QT_INCLUDE_DIRS_NO_SYSTEM) For cross-compiling ${QT_INCLUDE_DIR} == /usr/i686-w64-mingw32/sys-root/mingw/include. For non cross-compiling ${QT_INCLUDE_DIR} == /usr/include. But for non cross-compiling /usr/include do not produce any -isystem /usr/include. Thats strange for me. So -DQT_INCLUDE_DIRS_NO_SYSTEM=ON can be used as workaround for this problem.
This bug appears to have been reported against 'rawhide' during the Fedora 27 development cycle. Changing version to '27'.
This message is a reminder that Fedora 27 is nearing its end of life. On 2018-Nov-30 Fedora will stop maintaining and issuing updates for Fedora 27. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '27'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 27 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Fedora 27 changed to end-of-life (EOL) status on 2018-11-30. Fedora 27 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.