https://bugs.kde.org/show_bug.cgi?id=501325
Bug ID: 501325 Summary: kinfocenter has a compile-time dependency on QTVulkanInstance, but Qt6 may be built without Vulkan support, handle this gracefully Classification: Applications Product: kinfocenter Version: 6.3.2 Platform: Gentoo Packages OS: Linux Status: REPORTED Severity: normal Priority: NOR Component: general Assignee: plasma-b...@kde.org Reporter: fl...@chello.at CC: sit...@kde.org Target Milestone: --- Created attachment 179276 --> https://bugs.kde.org/attachment.cgi?id=179276&action=edit Incomplete patch, simply makes the code compile (to find all affected locations), but won't link nor work as expected! kinfocenter 6.3.2 currently doesn't build on my (~amd64) Gentoo box (sandybridge with integrated graphics and NO vulkan support). I consequently disable vulkan globally with the -vulkan use flag. Thus my Qt6 is build without Vulkan support (i. e. QT_CONFIG(vulkan) is not defined during the Qt6 build). This causes <QVulkanInstance>, <QVulkanFunctions> and some VK_* constants (VK_PHYSICAL_DEVICE_TYPE_*) to be unavailable. At least the following files have hard dependencies on one or more of the aforementioned classes / constants. kcms/about-distro/src/GPUEntry.h kcms/about-distro/src/GPUEntry.cpp kcms/about-distro/src/GPUEntryFactory.cpp kcms/about-distro/src/main.cpp Since not every system will have Qt6 with Vulkan support compiled in, kinfocenter should not depend on these optional classes at compile time. I'll attach a patch draft, which makes the code compile, but not link, as a starting point. It's basically my work in progess to get an working ebuild locally (where I don't care about breaking any of the vulkan-related stuff) Note that the pattern ```c++ QVulkanInstance inst; bool ok = inst.create(); if (!ok) { // ... Vulkan not available } ``` does not work -- it *also* requires that QT6 was built with Vulkan support (with -feature-vulkan). Thus dependent code should test if QVulkanInstance is available at all, using the preprocessor, e. g. #if __has_include(<QVulkanInstance>) #define QT_VULKAN #endif It appears that kinfocenter 6.2.5 was the last version that compiled on a non-vulkan enabled Qt6. -- You are receiving this mail because: You are watching all bug changes.