CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -march=native -fPIC -pipe -fomit-frame-pointer" CHOST="x86_64-pc-linux-gnu" ----------------------------------------------------------- 83%] Building CXX object CMakeFiles/kwin.dir/logind.cpp.o /usr/bin/x86_64-pc-linux-gnu-g++ -DKCOREADDONS_LIB -DQT_CONCURRENT_LIB -DQT_CORE_LIB -DQT_DBUS_LIB -DQT_DISABLE_DEPRECATED_BEFORE=0 -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_NO_DEBUG -DQT_QML_LIB -DQT_QUICK_LIB -DQT_SCRIPT_LIB -DQT_USE_QSTRINGBUILDER -DQT_WIDGETS_LIB -DQT_X11EXTRAS_LIB -DQT_XML_LIB -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -Dkwin_EXPORTS -I/home/portage/portage/kde-plasma/kwin-5.9.2/work/kwin-5.9.2_build -I/home/portage/portage/kde-plasma/kwin-5.9.2/work/kwin-5.9.2 -I/home/portage/portage/kde-plasma/kwin-5.9.2/work/kwin-5.9.2/tabbox -I/home/portage/portage/kde-plasma/kwin-5.9.2/work/kwin-5.9.2/effects -I/home/portage/portage/kde-plasma/kwin-5.9.2/work/kwin-5.9.2/libkwineffects -I/home/portage/portage/kde-plasma/kwin-5.9.2/work/kwin-5.9.2_build/libkwineffects -I/home/portage/portage/kde-plasma/kwin-5.9.2/work/kwin-5.9.2_build/effects -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore -isystem /usr/lib64/qt5/mkspecs/linux-g++ -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui -isystem /usr/include/KF5/KConfigCore -isystem /usr/include/KF5 -isystem /usr/include/KF5/KCoreAddons -isystem /usr/include/KF5/KWindowSystem -isystem /usr/include/KF5/KWayland/Server -isystem /usr/include/qt5/QtConcurrent -isystem /usr/include/qt5/QtQuick -isystem /usr/include/qt5/QtQml -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtX11Extras -isystem /usr/include/KF5/KConfigWidgets -isystem /usr/include/KF5/KCodecs -isystem /usr/include/KF5/KWidgetsAddons -isystem /usr/include/KF5/KConfigGui -isystem /usr/include/qt5/QtXml -isystem /usr/include/KF5/KAuth -isystem /usr/include/KF5/KGlobalAccel -isystem /usr/include/KF5/KService -isystem /usr/include/KF5/KI18n -isystem /usr/include/KF5/KNotifications -isystem /usr/include/KF5/KPackage -isystem /usr/include/KF5/Plasma -isystem /usr/include/KDecoration2 -isystem /usr/include/KScreenLocker -isystem /usr/include/KF5/KActivities -isystem /usr/include/KF5/KWayland/Client -DQT_NO_DEBUG -DNDEBUG -O2 -march=native -fPIC -pipe -fomit-frame-pointer -std=c++0x -fno-operator-names -fno-exceptions -Wall -Wextra -Wcast-align -Wchar-subscripts -Wformat-security -Wno-long-long -Wpointer-arith -Wundef -Wnon-virtual-dtor -Woverloaded-virtual -Werror=return-type -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -fPIC -std=gnu++11 -o CMakeFiles/kwin.dir/logind.cpp.o -c /home/portage/portage/kde-plasma/kwin-5.9.2/work/kwin-5.9.2/logind.cpp /home/portage/portage/kde-plasma/kwin-5.9.2/work/kwin-5.9.2/logind.cpp: In member function ‘int KWin::LogindIntegration::takeDevice(const char*)’: /home/portage/portage/kde-plasma/kwin-5.9.2/work/kwin-5.9.2/logind.cpp:315:65: error: ‘major’ was not declared in this scope message.setArguments(QVariantList({QVariant(major(st.st_rdev)), QVariant(minor(st.st_rdev))})); ^ /home/portage/portage/kde-plasma/kwin-5.9.2/work/kwin-5.9.2/logind.cpp:315:94: error: ‘minor’ was not declared in this scope message.setArguments(QVariantList({QVariant(major(st.st_rdev)), QVariant(minor(st.st_rdev))})); ^ /home/portage/portage/kde-plasma/kwin-5.9.2/work/kwin-5.9.2/logind.cpp:315:97: error: no matching function for call to ‘QList<QVariant>::QList(<brace-enclosed initializer list>)’ message.setArguments(QVariantList({QVariant(major(st.st_rdev)), QVariant(minor(st.st_rdev))})); ^ In file included from /usr/include/qt5/QtCore/qobject.h:49:0, from /usr/include/qt5/QtCore/qcoreapplication.h:46, from /usr/include/qt5/QtCore/QCoreApplication:1, from /home/portage/portage/kde-plasma/kwin-5.9.2/work/kwin-5.9.2/libkwineffects/kwinglobals.h:24, from /home/portage/portage/kde-plasma/kwin-5.9.2/work/kwin-5.9.2/logind.h:23, from /home/portage/portage/kde-plasma/kwin-5.9.2/work/kwin-5.9.2/logind.cpp:20: /usr/include/qt5/QtCore/qlist.h:159:12: note: candidate: QList<T>::QList(std::initializer_list<_Tp>) [with T = QVariant] inline QList(std::initializer_list<T> args) ^~~~~ /usr/include/qt5/QtCore/qlist.h:159:12: note: no known conversion for argument 1 from ‘<brace-enclosed initializer list>’ to ‘std::initializer_list<QVariant>’ /usr/include/qt5/QtCore/qlist.h:152:12: note: candidate: QList<T>::QList(QList<T>&&) [with T = QVariant] inline QList(QList<T> &&other) Q_DECL_NOTHROW ^~~~~ /usr/include/qt5/QtCore/qlist.h:152:12: note: no known conversion for argument 1 from ‘<brace-enclosed initializer list>’ to ‘QList<QVariant>&&’ /usr/include/qt5/QtCore/qlist.h:802:22: note: candidate: QList<T>::QList(const QList<T>&) [with T = QVariant] Q_OUTOFLINE_TEMPLATE QList<T>::QList(const QList<T> &l) ^~~~~~~~ /usr/include/qt5/QtCore/qlist.h:802:22: note: no known conversion for argument 1 from ‘<brace-enclosed initializer list>’ to ‘const QList<QVariant>&’ /usr/include/qt5/QtCore/qlist.h:147:12: note: candidate: QList<T>::QList() [with T = QVariant] inline QList() Q_DECL_NOTHROW : d(const_cast<QListData::Data *>(&QListData::shared_null)) { } ^~~~~ /usr/include/qt5/QtCore/qlist.h:147:12: note: candidate expects 0 arguments, 1 provided /home/portage/portage/kde-plasma/kwin-5.9.2/work/kwin-5.9.2/logind.cpp: In member function ‘void KWin::LogindIntegration::releaseDevice(int)’: /home/portage/portage/kde-plasma/kwin-5.9.2/work/kwin-5.9.2/logind.cpp:336:65: error: ‘major’ was not declared in this scope message.setArguments(QVariantList({QVariant(major(st.st_rdev)), QVariant(minor(st.st_rdev))})); ^ /home/portage/portage/kde-plasma/kwin-5.9.2/work/kwin-5.9.2/logind.cpp:336:94: error: ‘minor’ was not declared in this scope message.setArguments(QVariantList({QVariant(major(st.st_rdev)), QVariant(minor(st.st_rdev))})); ^ /home/portage/portage/kde-plasma/kwin-5.9.2/work/kwin-5.9.2/logind.cpp:336:97: error: no matching function for call to ‘QList<QVariant>::QList(<brace-enclosed initializer list>)’ message.setArguments(QVariantList({QVariant(major(st.st_rdev)), QVariant(minor(st.st_rdev))})); ^ In file included from /usr/include/qt5/QtCore/qobject.h:49:0, from /usr/include/qt5/QtCore/qcoreapplication.h:46, from /usr/include/qt5/QtCore/QCoreApplication:1, from /home/portage/portage/kde-plasma/kwin-5.9.2/work/kwin-5.9.2/libkwineffects/kwinglobals.h:24, from /home/portage/portage/kde-plasma/kwin-5.9.2/work/kwin-5.9.2/logind.h:23, from /home/portage/portage/kde-plasma/kwin-5.9.2/work/kwin-5.9.2/logind.cpp:20: /usr/include/qt5/QtCore/qlist.h:159:12: note: candidate: QList<T>::QList(std::initializer_list<_Tp>) [with T = QVariant] inline QList(std::initializer_list<T> args) ^~~~~ /usr/include/qt5/QtCore/qlist.h:159:12: note: no known conversion for argument 1 from ‘<brace-enclosed initializer list>’ to ‘std::initializer_list<QVariant>’ /usr/include/qt5/QtCore/qlist.h:152:12: note: candidate: QList<T>::QList(QList<T>&&) [with T = QVariant] inline QList(QList<T> &&other) Q_DECL_NOTHROW ^~~~~ /usr/include/qt5/QtCore/qlist.h:152:12: note: no known conversion for argument 1 from ‘<brace-enclosed initializer list>’ to ‘QList<QVariant>&&’ /usr/include/qt5/QtCore/qlist.h:802:22: note: candidate: QList<T>::QList(const QList<T>&) [with T = QVariant] Q_OUTOFLINE_TEMPLATE QList<T>::QList(const QList<T> &l) ^~~~~~~~ /usr/include/qt5/QtCore/qlist.h:802:22: note: no known conversion for argument 1 from ‘<brace-enclosed initializer list>’ to ‘const QList<QVariant>&’ /usr/include/qt5/QtCore/qlist.h:147:12: note: candidate: QList<T>::QList() [with T = QVariant] inline QList() Q_DECL_NOTHROW : d(const_cast<QListData::Data *>(&QListData::shared_null)) { } ^~~~~ /usr/include/qt5/QtCore/qlist.h:147:12: note: candidate expects 0 arguments, 1 provided make[2]: *** [CMakeFiles/kwin.dir/build.make:1412: CMakeFiles/kwin.dir/logind.cpp.o] Error 1 make[2]: Leaving directory '/home/portage/portage/kde-plasma/kwin-5.9.2/work/kwin-5.9.2_build' make[1]: *** [CMakeFiles/Makefile2:199: CMakeFiles/kwin.dir/all] Error 2 make[1]: Leaving directory '/home/portage/portage/kde-plasma/kwin-5.9.2/work/kwin-5.9.2_build' make: *** [Makefile:128: all] Error 2 * ERROR: kde-plasma/kwin-5.9.2::gentoo failed (compile phase): * emake failed With glibc-2.23 no compile problems.
Please figure out which header file needs to be included for major and include that in logind.cpp. It compiles on my system, thus I cannot help there.
Created attachment 104110 [details] for Gentoo
(In reply to Martin Gräßlin from comment #1) > Please figure out which header file needs to be included for major and > include that in logind.cpp. It compiles on my system, thus I cannot help > there. Well thank you. * The inclusion of <sys/sysmacros.h> by <sys/types.h> is deprecated. This means that in a future release, the macros “major”, “minor”, and “makedev” will only be available from <sys/sysmacros.h>.
This one was already fixed by commit 03f4f972d6c3ed03eab04c889248d089d317d370 but reverted later with commit a1f21f3ceac5315f2bfed8e9fa739d71ae2c6f10
> This one was already fixed by commit > 03f4f972d6c3ed03eab04c889248d089d317d370 > but reverted later with commit > a1f21f3ceac5315f2bfed8e9fa739d71ae2c6f10 Yay, I love it if we can pick between compile failure on Linux and BSD. I would appreciate if the devs who thought it needed to move the macros go to all depending software and fix it.
Git commit 35c278e525377723028a1417a705d28517fa183f by Andreas Sturmlechner. Committed on 25/07/2017 at 20:16. Pushed by asturmlechner into branch 'master'. Fix build with future glibc (major/minor macros), BSD compatible Summary: Also adding sys/types.h which is not implicitly included from all over. Thanks-to: [ade] in #kde-devel See also: https://sourceware.org/ml/libc-alpha/2015-11/msg00452.html https://git.reviewboard.kde.org/r/127662/ Reviewers: #plasma, graesslin Reviewed By: #plasma, graesslin Subscribers: graesslin, plasma-devel, kwin, #kwin, adridg Tags: #plasma Differential Revision: https://phabricator.kde.org/D6175 M +4 -0 logind.cpp https://commits.kde.org/kwin/35c278e525377723028a1417a705d28517fa183f