During compilation of gcompris-qt there's a number of warnings with differents level of severity. Full log of 0.9.1 build https://build.opensuse.org/build/Education/openSUSE_Tumbleweed/x86_64/gcompris-qt/_log During configure + /usr/bin/cmake /home/abuild/rpmbuild/BUILD/gcompris-qt-0.91/. '-GUnix Makefiles' -DCMAKE_INSTALL_PREFIX:PATH=/usr -DINCLUDE_INSTALL_DIR:PATH=/usr/include -DLIB_INSTALL_DIR:PATH=/usr/lib64 -DSYSCONF_INSTALL_DIR:PATH=/etc -DSHARE_INSTALL_PREFIX:PATH=/usr/share -DCMAKE_INSTALL_LIBDIR:PATH=/usr/lib64 -DCMAKE_BUILD_TYPE=RelWithDebInfo '-DCMAKE_C_FLAGS=-fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -g -fPIE -pie -fno-strict-aliasing -DNDEBUG -DNDEBUG' '-DCMAKE_CXX_FLAGS=-fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -g -fPIE -pie -fno-strict-aliasing -DNDEBUG -DNDEBUG' '-DCMAKE_Fortran_FLAGS=-fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -g -DNDEBUG' '-DCMAKE_EXE_LINKER_FLAGS=-Wl,--as-needed -Wl,--no-undefined -Wl,-z,now' -DCMAKE_MODULE_LINKER_FLAGS=-Wl,--as-needed '-DCMAKE_SHARED_LINKER_FLAGS=-Wl,--as-needed -Wl,--no-undefined -Wl,-z,now' -DLIB_SUFFIX=64 -DCMAKE_SKIP_RPATH:BOOL=ON -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DBUILD_SHARED_LIBS:BOOL=ON -DBUILD_STATIC_LIBS:BOOL=OFF -DCMAKE_COLOR_MAKEFILE:BOOL=OFF -DCMAKE_INSTALL_DO_STRIP:BOOL=OFF -DCMAKE_MODULES_INSTALL_DIR=/usr/share/cmake/Modules -- The C compiler identification is GNU 7.3.1 -- The CXX compiler identification is GNU 7.3.1 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Performing Test COMPILER_SUPPORTS_CXX11 -- Performing Test COMPILER_SUPPORTS_CXX11 - Success -- Performing Test COMPILER_SUPPORTS_CXX0X -- Performing Test COMPILER_SUPPORTS_CXX0X - Success -- Could NOT find KF5DocTools: found neither KF5DocToolsConfig.cmake nor kf5doctools-config.cmake CMake Deprecation Warning at /usr/share/ECM/kde-modules/KDEInstallDirs.cmake:343 (message): LIB_INSTALL_DIR is deprecated, use KDE_INSTALL_LIBDIR instead. Call Stack (most recent call first): /usr/share/ECM/kde-modules/KDEInstallDirs.cmake:437 (_define_relative) CMakeLists.txt:96 (include) -- Installing in the same prefix as Qt, adopting their path scheme. CMake Deprecation Warning at /usr/share/ECM/kde-modules/KDEInstallDirs.cmake:343 (message): INCLUDE_INSTALL_DIR is deprecated, use KDE_INSTALL_INCLUDEDIR instead. Call Stack (most recent call first): /usr/share/ECM/kde-modules/KDEInstallDirs.cmake:398 (_define_relative) /usr/share/ECM/kde-modules/KDEInstallDirs.cmake:513 (_define_absolute) CMakeLists.txt:96 (include) CMake Deprecation Warning at /usr/share/ECM/kde-modules/KDEInstallDirs.cmake:343 (message): SHARE_INSTALL_PREFIX is deprecated, use KDE_INSTALL_DATAROOTDIR instead. Call Stack (most recent call first): /usr/share/ECM/kde-modules/KDEInstallDirs.cmake:398 (_define_relative) /usr/share/ECM/kde-modules/KDEInstallDirs.cmake:534 (_define_absolute) CMakeLists.txt:96 (include) CMake Deprecation Warning at /usr/share/ECM/kde-modules/KDEInstallDirs.cmake:343 (message): SYSCONF_INSTALL_DIR is deprecated, use KDE_INSTALL_SYSCONFDIR instead. Call Stack (most recent call first): /usr/share/ECM/kde-modules/KDEInstallDirs.cmake:398 (_define_relative) /usr/share/ECM/kde-modules/KDEInstallDirs.cmake:639 (_define_absolute) CMakeLists.txt:96 (include) CMake Warning at /usr/share/ECM/kde-modules/KDEInstallDirs.cmake:660 (message): KDE_INSTALL_BINDIR, KDE_INSTALL_LIBDIR and KDE_INSTALL_INCLUDEDIR should either all be absolute paths or all be relative paths. Call Stack (most recent call first): CMakeLists.txt:96 (include) -- Using system qml-box2d plugin at /usr/lib64/qt5/qml/Box2D.2.0/libBox2D.so -- Configuring done CMake Warning (dev) in src/core/CMakeLists.txt: Policy CMP0043 is not set: Ignore COMPILE_DEFINITIONS_<Config> properties. Run "cmake --help-policy CMP0043" for policy details. Use the cmake_policy command to set the policy and suppress this warning. This warning is for project developers. Use -Wno-dev to suppress it. CMake Warning (dev) in src/core/CMakeLists.txt: Policy CMP0043 is not set: Ignore COMPILE_DEFINITIONS_<Config> properties. Run "cmake --help-policy CMP0043" for policy details. Use the cmake_policy command to set the policy and suppress this warning. This warning is for project developers. Use -Wno-dev to suppress it. -- Generating done
During build core/ActivityInfo.cpp & ApplicationSettings.h warning: comparison between signed and unsigned integer expressions [-Wsign-compare] cd /home/abuild/rpmbuild/BUILD/gcompris-qt-0.91/build/src/core && /usr/bin/c++ -DQT_CORE_LIB -DQT_GUI_LIB -DQT_MULTIMEDIA_LIB -DQT_NETWORK_LIB -DQT_NO_DEBUG -DQT_QML_LIB -DQT_QUICK_LIB -DQT_SENSORS_LIB -DQT_SVG_LIB -DQT_WIDGETS_LIB -DQT_XMLPATTERNS_LIB -DQT_XML_LIB -I/home/abuild/rpmbuild/BUILD/gcompris-qt-0.91/build/src/core -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtQml -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtCore -isystem /usr/lib64/qt5/mkspecs/linux-g++ -isystem /usr/include/qt5/QtQuick -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtMultimedia -isystem /usr/include/qt5/QtXmlPatterns -isystem /usr/include/qt5/QtSvg -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtSensors -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -g -fPIE -pie -fno-strict-aliasing -DNDEBUG -DNDEBUG -std=c++11 -O2 -g -DNDEBUG -fPIC -std=gnu++11 -o CMakeFiles/gcompris-qt.dir/ActivityInfo.cpp.o -c /home/abuild/rpmbuild/BUILD/gcompris-qt-0.91/src/core/ActivityInfo.cpp In file included from /home/abuild/rpmbuild/BUILD/gcompris-qt-0.91/src/core/ActivityInfo.cpp:28:0: /home/abuild/rpmbuild/BUILD/gcompris-qt-0.91/src/core/ApplicationSettings.h: In member function 'void ApplicationSettings::setPreviousHeight(qint32)': /home/abuild/rpmbuild/BUILD/gcompris-qt-0.91/src/core/ApplicationSettings.h:298:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if(m_previousHeight != height) { ~~~~~~~~~~~~~~~~~^~~~~~~~~ /home/abuild/rpmbuild/BUILD/gcompris-qt-0.91/src/core/ApplicationSettings.h: In member function 'void ApplicationSettings::setPreviousWidth(qint32)': /home/abuild/rpmbuild/BUILD/gcompris-qt-0.91/src/core/ApplicationSettings.h:306:28: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if(m_previousWidth != width) { ~~~~~~~~~~~~~~~~^~~~~~~~ make[2]: Leaving directory '/home/abuild/rpmbuild/BUILD/gcompris-qt-0.91/build' ---- /home/abuild/rpmbuild/BUILD/gcompris-qt-0.91/src/core/ActivityInfoTree.cpp: In lambda function: /home/abuild/rpmbuild/BUILD/gcompris-qt-0.91/src/core/ActivityInfoTree.cpp:161:64: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] return activity->difficulty() < levelMin || activity->difficulty() > levelMax; ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ /home/abuild/rpmbuild/BUILD/gcompris-qt-0.91/src/core/ActivityInfoTree.cpp:161:101: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] return activity->difficulty() < levelMin || activity->difficulty() > levelMax; ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ ---- /home/abuild/rpmbuild/BUILD/gcompris-qt-0.91/src/core/ApplicationSettingsDefault.cpp: In member function 'uint ApplicationSettings::checkActivationCode(const QString&)': /home/abuild/rpmbuild/BUILD/gcompris-qt-0.91/src/core/ApplicationSettingsDefault.cpp:55:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] ok = year * 100 + month + 200 >= atoi(BUILD_DATE); ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
Thanks Bruno for the report. For the configure part, I don't have those warnings on any of my build setups, so I guess they come from a newer cmake version than the ones we use to do the pacakges. So, not sure if we should change that already in our sources for now. For the build warnings, I never noticed those, but I know we have other warnings coming from our external-embedded dependency qml-box2d, so they might have hidden between those making me not notice them. We will check.
Hi Timothé the expanded result of our %cmake macros is the following rpm --eval %cmake find . -name CMakeLists.txt \ -exec sed -i -re '/^[[:blank:]]*[sS][eE][tT][[:blank:]]*\([[:blank:]]*(CMAKE_BUILD_TYPE|CMAKE_COLOR_MAKEFILE|CMAKE_INSTALL_PREFIX|CMAKE_VERBOSE_MAKEFILE).*\)/{s/^/#IGNORE /}' {} + mkdir -p build cd build /usr/bin/cmake $OLDPWD/. \ %if "/usr/bin/make" == "/usr/bin/make" -G"Unix Makefiles" \ %else -GNinja \ %endif -DCMAKE_INSTALL_PREFIX:PATH=/usr \ -DINCLUDE_INSTALL_DIR:PATH=/usr/include \ -DLIB_INSTALL_DIR:PATH=/usr/lib64 \ -DSYSCONF_INSTALL_DIR:PATH=/etc \ -DSHARE_INSTALL_PREFIX:PATH=/usr/share \ -DCMAKE_INSTALL_LIBDIR:PATH=/usr/lib64 \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DCMAKE_C_FLAGS="${CFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables} -DNDEBUG" \ -DCMAKE_CXX_FLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables} -DNDEBUG" \ -DCMAKE_Fortran_FLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables} -DNDEBUG" \ -DCMAKE_EXE_LINKER_FLAGS="-Wl,--as-needed -Wl,--no-undefined -Wl,-z,now" \ -DCMAKE_MODULE_LINKER_FLAGS="-Wl,--as-needed" \ -DCMAKE_SHARED_LINKER_FLAGS="-Wl,--as-needed -Wl,--no-undefined -Wl,-z,now" \ %if "lib64" == "lib64" -DLIB_SUFFIX=64 \ %endif -DCMAKE_SKIP_RPATH:BOOL=ON \ -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \ -DBUILD_SHARED_LIBS:BOOL=ON \ -DBUILD_STATIC_LIBS:BOOL=OFF \ -DCMAKE_COLOR_MAKEFILE:BOOL=OFF \ -DCMAKE_INSTALL_DO_STRIP:BOOL=OFF \ -DCMAKE_MODULES_INSTALL_DIR=/usr/share/cmake/Modules I'm not using GNinja. Hope this can help a bit more. At anytime you can go back to the build log it has all the details.
Hi, for cmake the issues come from the parameters you give to the command line: "-DINCLUDE_INSTALL_DIR:PATH=/usr/include" and the related warning: "INCLUDE_INSTALL_DIR is deprecated, use KDE_INSTALL_INCLUDEDIR instead." Can you try to change the cmake line with the not deprecated variables? According to the documentation (https://api.kde.org/ecm/kde-module/KDEInstallDirs.html#kde-module:KDEInstallDirs), it should work the same. For the build, I'll check the warnings, they only appear when adding some options to the compiler flags (-Wall). It's "just" comparisons between unsigned and signed integer but will be still better to remove them. Johnny
Code warnings fixed on https://phabricator.kde.org/R2:459b7df47a95b56bb4e94ff971eaa0cf3a37568f + cmake policy set