Bug 469181 - KWallet fails to compile on Linux without X11
Summary: KWallet fails to compile on Linux without X11
Status: REPORTED
Alias: None
Product: frameworks-kwallet
Classification: Frameworks and Libraries
Component: general (other bugs)
Version First Reported In: 5.105.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Valentin Rusu
URL:
Keywords: X11-only
Depends on:
Blocks:
 
Reported: 2023-04-30 08:56 UTC by Rinigus
Modified: 2025-02-24 17:59 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rinigus 2023-04-30 08:56:09 UTC
SUMMARY

On Sailfish OS, we use Wayland only and there are no X11 installed by default. In this environment, KWalletd fails to compile and requires disabling X11 by a patch. I presume that CMake check for X11 should be added and used to enable/disable X11 support.

Used patch:

```
diff --git a/src/runtime/kwalletd/kwalletd.cpp b/src/runtime/kwalletd/kwalletd.cpp
index 5914be9..bdbe172 100644
--- a/src/runtime/kwalletd/kwalletd.cpp
+++ b/src/runtime/kwalletd/kwalletd.cpp
@@ -35,12 +35,12 @@
 #include <kwalletentry.h>
 #include <kwindowsystem.h>
 
-#if !defined(Q_OS_WIN) && !defined(Q_OS_MAC)
-#define HAVE_X11 1
-#include <KX11Extras>
-#else
+// #if !defined(Q_OS_WIN) && !defined(Q_OS_MAC)
+// #define HAVE_X11 1
+// #include <KX11Extras>
+// #else
 #define HAVE_X11 0
-#endif
+// #endif
 
 #ifdef HAVE_GPGMEPP
 #include <gpgme++/key.h>
-- 
2.39.2
```

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Sailfish OS 4.5
(available in About System)
KDE Plasma Version: -
KDE Frameworks Version: 5.105.0 
Qt Version: 5.15

ADDITIONAL INFORMATION
Comment 1 TraceyC 2025-02-24 17:59:11 UTC
Adding the x11-only keyword