Twinklebear/ChameleonRT

Explain build process ("Could NOT find Vulkan (missing: Vulkan_LIBRARY Vulkan_INCLUDE_DIR GLSLC)")

Abdull opened this issue · 3 comments

I cannot figure out how to build ChameleonRT under Debian 12.

cd /opt/build/
git clone https://github.com/Twinklebear/ChameleonRT.git
# commit a148d2e4ee5906fb7e9b5d8023d64bba29ff3529
# Date:   Wed Mar 13 17:16:20 2024 -0700
#  fix macos brew issue for CI

cd /opt/build/ChameleonRT/

# LunarG vulkan-sdk is set up as per https://vulkan.lunarg.com/doc/sdk/1.3.283.0/linux/getting_started.html
source /opt/build/vulkansdk-linux-x86_64-1.3.283.0/setup-env.sh

echo $VULKAN_SDK
# /opt/build/vulkansdk-linux-x86_64-1.3.283.0/x86_64

echo $PATH
# /opt/build/vulkansdk-linux-x86_64-1.3.283.0/x86_64/bin:$REST_OF_MY_ORIGINAL_PATH

echo $LD_LIBRARY_PATH
# /opt/build/vulkansdk-linux-x86_64-1.3.283.0/x86_64/lib

echo $VK_ADD_LAYER_PATH
# /opt/build/vulkansdk-linux-x86_64-1.3.283.0/x86_64/share/vulkan/explicit_layer.d

cmake . -DCMAKE_INSTALL_PREFIX=./install -DCMAKE_BUILD_TYPE=Release -DENABLE_VULKAN=ON --fresh
-- The C compiler identification is GNU 12.2.0
-- The CXX compiler identification is GNU 12.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
CMake Warning (dev) at /usr/share/cmake-3.25/Modules/ExternalProject.cmake:3075 (message):
  The DOWNLOAD_EXTRACT_TIMESTAMP option was not given and policy CMP0135 is
  not set.  The policy's OLD behavior will be used.  When using a URL
  download, the timestamps of extracted files should preferably be that of
  the time of extraction, otherwise code that depends on the extracted
  contents might not be rebuilt if the URL changes.  The OLD behavior
  preserves the timestamps from the archive instead, but this is usually not
  what you want.  Update your project to the NEW behavior or specify the
  DOWNLOAD_EXTRACT_TIMESTAMP option with a value of true to avoid this
  robustness issue.
Call Stack (most recent call first):
  /usr/share/cmake-3.25/Modules/ExternalProject.cmake:4185 (_ep_add_download_command)
  cmake/glm.cmake:3 (ExternalProject_Add)
  CMakeLists.txt:21 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libOpenGL.so
CMake Error at /usr/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find Vulkan (missing: Vulkan_LIBRARY Vulkan_INCLUDE_DIR GLSLC)
Call Stack (most recent call first):
  /usr/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
  backends/vulkan/cmake/FindVulkan.cmake:184 (find_package_handle_standard_args)
  backends/vulkan/CMakeLists.txt:10 (find_package)

It looks like the CMake scripts expects the VULKAN_SDK path to not contain x86_64 (https://github.com/Twinklebear/ChameleonRT/blob/master/backends/vulkan/cmake/FindVulkan.cmake#L76), so could you try setting:

export VULKAN_SDK=/opt/build/vulkansdk-linux-x86_64-1.3.283.0/

and see if it's able to find it then?