Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[vulkan] Fix SDK detection fails for official debian packages #30783

Merged
merged 2 commits into from
Apr 21, 2023
Merged

[vulkan] Fix SDK detection fails for official debian packages #30783

merged 2 commits into from
Apr 21, 2023

Conversation

juan-lunarg
Copy link
Contributor

Fixes #13331

  • Changes comply with the maintainer guide
  • SHA512s are updated for each updated download
  • The "supports" clause reflects platforms that may be fixed by this new version
  • Any fixed CI baseline entries are removed from that file.
  • Any patches that are no longer applied are deleted from the port's directory.
  • The version database is fixed by rerunning ./vcpkg x-add-version --all and committing the result.
  • Only one version is added to each modified port's versions file.

ports/vulkan/vcpkg.json Show resolved Hide resolved
ports/vulkan/portfile.cmake Outdated Show resolved Hide resolved
ports/vulkan/portfile.cmake Outdated Show resolved Hide resolved
@Osyotr
Copy link
Contributor

Osyotr commented Apr 11, 2023

You've just completely disabled the check on non-windows. Maybe add a dummy CMakeLists.txt which does a find_package(Vulkan REQUIRED) call?

ports/vulkan/CMakeLists.txt Outdated Show resolved Hide resolved
ports/vulkan/CMakeLists.txt Show resolved Hide resolved
@JonLiu1993 JonLiu1993 changed the title Fixes #13331 [vulkan] Fix SDK detection fails for official debian packages Apr 12, 2023
@JonLiu1993 JonLiu1993 added the category:port-bug The issue is with a library, which is something the port should already support label Apr 12, 2023
ports/vulkan/vcpkg.json Outdated Show resolved Hide resolved
ports/vulkan/CMakeLists.txt Outdated Show resolved Hide resolved
ports/vulkan/CMakeLists.txt Outdated Show resolved Hide resolved
ports/vulkan/portfile.cmake Outdated Show resolved Hide resolved
ports/vulkan/vcpkg.json Show resolved Hide resolved
ports/vulkan/vcpkg.json Outdated Show resolved Hide resolved
@JonLiu1993
Copy link
Member

JonLiu1993 commented Apr 13, 2023

@juan-lunarg, I installed VulkanSDK version 1.3.243 locally, and then cloned your library to install Vulkan locally, and it appeared the log you set:

Call Stack (most recent call first):
  F:/Feature-test/vulkan/vcpkg/scripts/buildsystems/vcpkg.cmake:852 (_find_package)
  CMakeLists.txt:10 (find_package)


-- Could NOT find Vulkan (missing: Vulkan_LIBRARY) (found version "1.3.243")
CMake Debug Log at F:/Feature-test/vulkan/vcpkg/scripts/buildsystems/vcpkg.cmake:852 (_find_package):
  find_package considered the following paths for FindVulkan.cmake:

  The file was found at

    F:/Feature-test/vulkan/vcpkg/downloads/tools/cmake-3.25.1-windows/cmake-3.25.1-windows-i386/share/cmake-3.25/Modules/FindVulkan.cmake

  The module is considered not found due to Vulkan_FOUND being FALSE.
Call Stack (most recent call first):
  CMakeLists.txt:10 (find_package)


CMake Error at CMakeLists.txt:16 (message):
  Unable to find Vulkan!

At present, only the version 1.1.82 of Vulkan will be installed successfully. Install Vulkan successfully, right?

@juan-lunarg
Copy link
Contributor Author

juan-lunarg commented Apr 13, 2023

At present, only the version 1.1.82 of Vulkan will be installed successfully. Install Vulkan successfully, right?

Hmm. My guess is your environment didn't have the VULKAN_SDK environment variable set.

Can you restart your terminal session and ensure you have it set?

If that's the case perhaps an explicit VULKAN_SDK environment variable check for WIN32 only could be helpful.

@juan-lunarg
Copy link
Contributor Author

Okay I believe the logic is sound now @JonLiu1993

JonLiu1993
JonLiu1993 previously approved these changes Apr 19, 2023
@JonLiu1993
Copy link
Member

@juan-lunarg, Thanks for your contribution.

PS E:\vulkan> ./vcpkg install vulkan:x64-windows
Computing installation plan...
A suitable version of cmake was not found (required v3.25.1) Downloading portable cmake 3.25.1...
Downloading cmake...
https://github.com/Kitware/CMake/releases/download/v3.25.1/cmake-3.25.1-windows-i386.zip->E:\vulkan\downloads\cmake-3.25.1-windows-i386.zip
Downloading https://github.com/Kitware/CMake/releases/download/v3.25.1/cmake-3.25.1-windows-i386.zip
Extracting cmake...
The following packages will be built and installed:
  * vcpkg-cmake[core]:x64-windows -> 2022-12-22
    vulkan[core]:x64-windows -> 1.1.82.1#6
Additional packages (*) will be modified to complete this operation.
Detecting compiler hash for triplet x64-windows...
A suitable version of powershell-core was not found (required v7.2.8) Downloading portable powershell-core 7.2.8...
Downloading powershell-core...
https://github.com/PowerShell/PowerShell/releases/download/v7.2.8/PowerShell-7.2.8-win-x86.zip->E:\vulkan\downloads\PowerShell-7.2.8-win-x86.zip
Downloading https://github.com/PowerShell/PowerShell/releases/download/v7.2.8/PowerShell-7.2.8-win-x86.zip
Extracting powershell-core...
A suitable version of 7zip was not found (required v21.7.0) Downloading portable 7zip 21.7.0...
Downloading 7zip...
https://www.7-zip.org/a/7z2107-extra.7z->E:\vulkan\downloads\7z2107-extra.7z
Downloading https://www.7-zip.org/a/7z2107-extra.7z
Extracting 7zip...
Restored 1 package(s) from C:\Users\test\AppData\Local\vcpkg\archives in 2.2 s. Use --debug to see more details.
Installing 1/2 vcpkg-cmake:x64-windows...
Elapsed time to handle vcpkg-cmake:x64-windows: 11.6 ms
Installing 2/2 vulkan:x64-windows...
Building vulkan[core]:x64-windows...
-- Found external ninja('1.11.0').
-- Configuring x64-windows
-- Installing: E:/vulkan/packages/vulkan_x64-windows/share/vulkan/usage
-- Performing post-build validation
Stored binaries in 1 destinations.
Elapsed time to handle vulkan:x64-windows: 2 s
Total install time: 22 s
Visual Studio users can reference the VULKAN_SDK environment variable

 

    Ex: Add $(VULKAN_SDK)/include to your include directories.

 

CMake provides built in support to find Vulkan:

 

    # https://cmake.org/cmake/help/latest/module/FindVulkan.html
    find_package(Vulkan REQUIRED)
    target_link_libraries(main PRIVATE Vulkan::Vulkan)

@JonLiu1993 JonLiu1993 added info:reviewed Pull Request changes follow basic guidelines and removed requires:author-response labels Apr 19, 2023
ports/vulkan/CMakeLists.txt Outdated Show resolved Hide resolved
ports/vulkan/CMakeLists.txt Outdated Show resolved Hide resolved
ports/vulkan/usage Outdated Show resolved Hide resolved
@BillyONeal BillyONeal added requires:author-response and removed info:reviewed Pull Request changes follow basic guidelines labels Apr 19, 2023
@JonLiu1993 JonLiu1993 added the info:reviewed Pull Request changes follow basic guidelines label Apr 21, 2023
@BillyONeal BillyONeal merged commit a403a65 into microsoft:master Apr 21, 2023
@BillyONeal
Copy link
Member

Thanks for the fix!

@juan-lunarg juan-lunarg deleted the juaramos/13331 branch April 21, 2023 23:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-bug The issue is with a library, which is something the port should already support info:reviewed Pull Request changes follow basic guidelines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[vulkan] SDK detection fails for official debian packages
5 participants