Open SoarCode opened 1 year ago
I'm having the same issue when building vk_raytracing_tutorial_KHR
on the NVIDIA® Jetson Orin™ Nano Developer Kit. Vulkan 1.3 is supported on Jetson Linux 35.1 and the loader is already pre-installed at /usr/lib/aarch64-linux-gnu/tegra/libvulkan.so.1.3.204
. I've also downloaded the Vulkan-Headers and moved them to /usr/include/
. Khronos Group's Vulkan-Samples project automatically links against the pre-installed loader and runs fine without having to install the latest Vulkan® SDK. Here's the error I get:
-- BASE_DIRECTORY = /home/nvidia
-- CMAKE_CURRENT_SOURCE_DIR = /home/nvidia/vk_raytracing_tutorial_KHR
-- Vulkan Library : VULKAN_LIB-NOTFOUND
-- Vulkan ShaderC Library: VULKANSDK_SHADERC_LIB-NOTFOUND
-- VULKANSDK_ROOT_DIR = /usr
CMake Error at /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:146 (message):
Could NOT find VulkanSDK (missing: VULKAN_LIB VULKANSDK_SHADERC_LIB
GLSLANGVALIDATOR)
Call Stack (most recent call first):
/usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:393 (_FPHSA_FAILURE_MESSAGE)
/home/nvidia/nvpro_core/cmake/find/FindVulkanSDK.cmake:175 (find_package_handle_standard_args)
/home/nvidia/nvpro_core/cmake/setup.cmake:375 (find_package)
CMakeLists.txt:34 (_add_package_VulkanSDK)
-- Configuring incomplete, errors occurred!
See also "/home/nvidia/vk_raytracing_tutorial_KHR/build/CMakeFiles/CMakeOutput.log".
Surprisingly, CMakeError.log
isn't generated. As these are official sample projects, it would be great if the CMake scripts fully supported Jetson Linux.
Manually installing Vulkan-Headers and glslang and patching cmake/find/FindVulkanSDK.cmake fixes the issue.
diff --git a/cmake/find/FindVulkanSDK.cmake b/cmake/find/FindVulkanSDK.cmake
index b0fe473..b4e6040 100644
--- a/cmake/find/FindVulkanSDK.cmake
+++ b/cmake/find/FindVulkanSDK.cmake
@@ -128,7 +128,7 @@ if (VULKANSDK_ROOT_DIR)
if (UNIX)
unset(VULKAN_LIB)
- find_library(VULKAN_LIB NAMES vulkan HINTS "$ENV{VULKAN_SDK}/lib")
+ find_library(VULKAN_LIB NAMES libvulkan.so.1.3.204 HINTS "$ENV{VULKAN_SDK}/lib")
get_filename_component(VULKAN_LIB_DIR ${VULKAN_LIB} DIRECTORY)
find_library(VULKANSDK_SHADERC_LIB "libshaderc_combined.a" HINTS ${VULKAN_LIB_DIR})
find_file(GLSLANGVALIDATOR VULKANSDK_ROOT_DIR "glslangValidator" HINTS ${VULKANSDK_ROOT_DIR}"../bin/glslangValidator")
@@ -175,7 +175,6 @@ SET(VULKANSDK_SHADERC_LIB ${VULKANSDK_SHADERC_LIB} CACHE PATH "Path to
find_package_handle_standard_args(VulkanSDK DEFAULT_MSG
VULKANSDK_INCLUDE_DIR
VULKAN_LIB
- VULKANSDK_SHADERC_LIB
GLSLANGVALIDATOR
)
Here's a detailed walkthrough.
Hi all! We wound up replacing our FindVulkanSDK.cmake
script with CMake's built-in find_package(Vulkan)
module in https://github.com/nvpro-samples/nvpro_core/commit/9cf7b4814bd2046d0048c5ed56176ae51c3f5cb5 . Could you delete your CMake cache and try running it again, and let me know if it fixes this issue for you? Thank you!
Hi guys,
I am trying to get started with the raytracing tutorial. I cloned the repos and try to run cmake .. inside of the build dir. I get the following error:
Content of the Error Log:
I installed the latest VulkanSDK and also got it running with some simple triangle demo code.
Kind regards, Oliver