Bug 2152738 - vulkan header files being installed to incorrect location
Summary: vulkan header files being installed to incorrect location
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: vulkan-validation-layers
Version: 37
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Dave Airlie
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-12-12 21:50 UTC by Juan Ramos
Modified: 2023-07-07 10:00 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-07-07 09:59:36 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker FC-888 0 None None None 2023-07-07 10:00:55 UTC

Description Juan Ramos 2022-12-12 21:50:32 UTC
Description of problem:

Fedora installing header files inconsistently causing confusion for cross-platform Vulkan developers.

The following confusion was found on Discord.

```
i'm having problems with building a program with vulkan
on windows (in visual studio 2022), cmake fails to find vulkan with find_package(Vulkan REQUIRED), 
even though the Vulkan SDK seems to be properly installed and the VULKAN_SDK environment variable is set to the correct directory

after trying it again on fedora, my cmake file works fine, but the header files from the vulkan-validation-layers-devel package,
such as vk_enum_string_helper.h are in /usr/include/vulkan/vulkan/ instead of in /usr/include/vulkan/ with the other headers, 
so #include <vulkan/vk_enum_string_helper.h> doesn't work
whereas on windows, those headers are all in the same directory (which is C:\VulkanSDK\1.3.231.1\Include\vulkan for me)
i want to make my code portable and idk what to do about this 
```

Currently the fedora packaging is inconsistent with lunarg packaging (Causing confusion on how to build against the SDK).

In our CMake we specify header files being installed to the include/vulkan folder.
https://github.com/KhronosGroup/Vulkan-ValidationLayers/blob/46f343d06003fdbdafa9d5c9d14a11a08006bc1e/layers/CMakeLists.txt#L61

However, the Fedora packaging has this line here:
https://src.fedoraproject.org/rpms/vulkan-validation-layers/blob/a6ebc0c75fb22a469a12c61092fb90b81bb0e20e/f/vulkan-validation-layers.spec#_60

Which results in the `vulkan/vulkan` inconsistency issue. The `LunarG` packages are consistent.

The fix is just a minor adjustment to the cmake configuration:

```
%cmake3 ....
        -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir}/ # Don't specify Vulkan, the code does that already
	
%cmake_build
```

Comment 1 Juan Ramos 2022-12-14 17:13:08 UTC
Looks like this issue can be closed. This commit fixes the issue.
https://src.fedoraproject.org/rpms/vulkan-validation-layers/c/e831166e80cd558f6bf5002632da52611756a2be?branch=rawhide

Comment 2 Juan Ramos 2022-12-14 17:13:52 UTC
Thanks Dave Airlie for the quick turn around.

Comment 3 Niels De Graef 2023-07-07 09:59:36 UTC
Moving to Fedora since that's where the report was from and closing as mentioned above


Note You need to log in before you can comment on or make changes to this bug.