@matterhorn, @gflegar, thanks! This is due to the X11 macro conflict and the new Enum that appeared in this version of Qt. I will fix it, stay tuned for updates.
Search Criteria
Package Details: optimus-manager-qt 1.6.9-2
Package Actions
Git Clone URL: | https://aur.archlinux.org/optimus-manager-qt.git (read-only, click to copy) |
---|---|
Package Base: | optimus-manager-qt |
Description: | A Qt interface for Optimus Manager that allows to configure and switch GPUs on Optimus laptops using the tray menu |
Upstream URL: | https://github.com/Shatur/optimus-manager-qt |
Keywords: | Intel Nvidia Optimus Qt |
Licenses: | GPL3 |
Submitter: | Shatur |
Maintainer: | Shatur |
Last Packager: | Shatur |
Votes: | 69 |
Popularity: | 0.59 |
First Submitted: | 2019-02-27 10:13 (UTC) |
Last Updated: | 2023-10-20 10:51 (UTC) |
Dependencies (6)
- optimus-managerAUR (optimus-managerAUR, optimus-manager-gitAUR)
- qt5-base (qt5-base-gitAUR, qt5-base-headlessAUR)
- qt5-svg (qt5-svg-gitAUR)
- qt5-x11extras (qt5-x11extras-gitAUR)
- extra-cmake-modules (extra-cmake-modules-gitAUR) (make)
- qt5-tools (qt5-tools-gitAUR) (make)
Required by (0)
Sources (1)
Shatur commented on 2019-12-25 21:19 (UTC)
matterhorn commented on 2019-12-25 20:37 (UTC)
@gflegar I too ran into this problem:
g++ -c -pipe -O2 -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -std=gnu++1z -Wall -Wextra -D_REENTRANT -fPIC -DQAPPLICATION_CLASS=QApplication -DQT_DEPRECATED_WARNINGS -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_X11EXTRAS_LIB -DQT_GUI_LIB -DQT_DBUS_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -Isrc/third-party/singleapplication -isystem /usr/include/qt -isystem /usr/include/qt/QtWidgets -isystem /usr/include/qt/QtX11Extras -isystem /usr/include/qt/QtGui -isystem /usr/include/qt/QtDBus -isystem /usr/include/qt/QtNetwork -isystem /usr/include/qt/QtCore -I. -I. -I/usr/lib/qt/mkspecs/linux-g++ -o optimusmanager.o src/optimusmanager.cpp
In file included from /usr/include/X11/Xlib.h:44,
from /usr/include/X11/extensions/Xrender.h:28,
from /usr/include/X11/extensions/Xrandr.h:33,
from src/x11deleters.h:4,
from src/optimusmanager.cpp:26:
/usr/include/qt/QtWidgets/qactiongroup.h:64:9: error: expected identifier before numeric constant
64 | None,
| ^~~~
It seems to be a conflict between the X11 headers (Xlib.h
) and QT headers triggered by the order they are included. I managed to work around it with a patch to include all QT headers first, then the project headers that pull in X11, though it might only be necessary to move x11deleters.h
:
--- a/src/optimusmanager.cpp 2019-12-25 15:26:34.768692953 -0500
+++ b/src/optimusmanager.cpp 2019-12-25 15:26:56.472464833 -0500
@@ -18,14 +18,6 @@
*
*/
-#include "optimusmanager.h"
-#include "appsettings.h"
-#include "settingsdialog.h"
-#include "singleapplication.h"
-#include "optimussettings.h"
-#include "x11deleters.h"
-#include "session.h"
-
#include <QX11Info>
#include <QProcess>
#include <QFileInfo>
@@ -40,6 +32,14 @@
#include <QSystemTrayIcon>
#endif
+#include "optimusmanager.h"
+#include "appsettings.h"
+#include "settingsdialog.h"
+#include "singleapplication.h"
+#include "optimussettings.h"
+#include "x11deleters.h"
+#include "session.h"
+
OptimusManager::OptimusManager(QObject *parent)
: QObject(parent)
, m_contextMenu(new QMenu)
gflegar commented on 2019-12-25 10:44 (UTC)
I'm getting build errors when trying to update this:
/usr/include/qt/QtWidgets/qactiongroup.h:64:9: error: expected identifier before numeric constant
64 | None,
| ^~~~
Probably has something to do with the new QT 5.14 release.
dartheian commented on 2019-12-05 17:46 (UTC)
@Shatur I know, maybe something went wrong or those were added after my first try... Now everything works fine :)
Shatur commented on 2019-12-05 12:28 (UTC)
@dartheian, this package already has these dependencies.
dartheian commented on 2019-12-05 11:43 (UTC) (edited on 2019-12-05 11:45 (UTC) by dartheian)
I solved it by installing the 'qt5-base' package explicitly. Same for 'qt5-svg'.
Shatur commented on 2019-12-01 01:30 (UTC)
@indarian, could you open an issue on GitHub with more information about your setup?
indarian commented on 2019-11-30 21:47 (UTC)
@Shatur no, the only application so far is optimus-manager-qt.
Shatur commented on 2019-11-30 17:54 (UTC)
@indarian, Do you have this problem in other Qt applications?
indarian commented on 2019-11-30 14:00 (UTC)
Can confirm missing icons (not only intel and nvidia, but all icons in app)
Pinned Comments
Shatur commented on 2019-02-27 10:15 (UTC) (edited on 2019-05-12 15:02 (UTC) by Shatur)
If you are using Plasma, it is recommended to replace in PKGBUILD
_plasma=false
with_plasma=true
to use additional KDE API feautures (this also adds additional dependencies).