CNA-BUG-196: CNA_X11_HAVE_VULKAN_HEADERS is defined by the X11 CMake but read by no source, so the dependency summary implies a Vulkan-header gate that does not exist

CNA snapshot 009d40f5  ·  Known Issues › Current bugs  ·  source links pinned to 009d40f5

✓

Evidence basis: source-verified at the pinned commit. Claims on this page were checked by reading the CNA source at commit 009d40f5; unless a sentence says otherwise, nothing here was built or executed. Nothing on this page was executed unless the Evidence section says so.

PlatformX11.cmake defines CNA_X11_HAVE_VULKAN_HEADERS and lists Vulkan headers as an optional dependency, but no X11 source reads the macro; the X11 Vulkan surface is created unconditionally and resolves its entry point at run time.

Identifier
CNA-BUG-196
Category
Bug
Subsystem
Build & CI
Status
Open
Verified against
CNA 009d40f5 (009d40f5dd085c4e674d3479675fac84b12b3e0a)
Severity
Low (a triage suggestion, not a project priority)
Evidence basis
Source-verified: read at TARGET, not executed
Tests touching this area
None
Affected contract
cmake/PlatformX11.cmake's CNA_X11_HAVE_VULKAN_HEADERS definition and the X11 dependency summary

Expected behaviour

A compile definition that a CMake file publishes, and that its dependency summary presents as an optional Vulkan-header dependency, should gate something -- as the Wayland backend's CNA_WAYLAND_HAVE_VULKAN_HEADERS does, guarding WaylandVulkanSurface's construction.

Actual behaviour at TARGET

PlatformX11.cmake sets CNA_X11_HAVE_VULKAN_HEADERS=1 when find_package(Vulkan) finds headers and lists “Vulkan headers” as present/absent in the X11 dependency summary. No source reads CNA_X11_HAVE_VULKAN_HEADERS (only the Wayland macro is read, in WaylandPlatform.cpp): X11Platform::OpenConnection always constructs X11VulkanSurface, and capabilities.vulkanSurface is true whenever that object exists, because X11VulkanSurface restates the Vulkan structs locally and resolves vkCreateXlibSurfaceKHR at run time. So the X11 Vulkan surface does not depend on the headers at build time, and the summary's “Vulkan headers: present/absent” line implies a gate that does not exist.

Source locations

Evidence

Checked by reading PlatformX11.cmake and searching the whole tree for CNA_X11_HAVE_VULKAN_HEADERS (defined once, read nowhere; only CNA_WAYLAND_HAVE_VULKAN_HEADERS is consumed, in WaylandPlatform.cpp and cmake/Harnesses.cmake) at 009d40f5. Not executed. The Native Platforms guide already states that no X11 source reads the macro.

Focused reproduction

No focused reproduction is known. Nothing has been invented here; the evidence above is what exists.

Current tests

No test or gate checks that a published platform compile definition is consumed.

Regression test

Remove CNA_X11_HAVE_VULKAN_HEADERS (and, if desired, drop “Vulkan headers” from the X11 summary or relabel it as build-time-optional-only), or make an X11 source consume it. A definition-usage lint would prevent the recurrence.

Blast radius

Maintainers reading the X11 dependency summary, who may conclude the X11 Vulkan surface needs the Vulkan headers at build time (it does not). The Wayland backend's equivalent macro is genuinely consumed and is unaffected.

Workaround

No workaround is known.

The same subject is explained at several altitudes. These are the neighbouring pages at each one.

Maintainer workflow
Modify a platform backend
Known issues
Bug index