ingowald / optix7course

Apache License 2.0
452 stars 80 forks source link

OptiX headers (optix.h and friends) not found. #29

Closed bipul-mohanto closed 2 years ago

bipul-mohanto commented 2 years ago

Hello,

I am using the following configuration:

During installing OptiX 7.4, I have defined the OptiX_DIR with the command: export OptiX_INSTALL_DIR=/home/computer-name/Downloads/NVIDIA-OptiX-SDK-7.4.0-linux64-x86_64

Problem:

bipul-mohanto commented 2 years ago

Screenshot from 2022-04-27 12-06-36


CMake Error at common/gdt/cmake/FindOptiX.cmake:103 (message):
  OptiX headers (optix.h and friends) not found.  Please locate before
  proceeding.
Call Stack (most recent call first):
  common/gdt/cmake/FindOptiX.cmake:115 (OptiX_report_error)
  common/gdt/cmake/configure_optix.cmake:24 (find_package)
  CMakeLists.txt:37 (include)
bipul-mohanto commented 2 years ago

Okay, I found the solution.

  1. Update the FindOptiX.cmake with set(OptiX_INSTALL_DIR "/home/name-computer/Downloads/NVIDIA-OptiX-SDK-7.4.0-linux64-x86_64"). This solved the first problem, but lead to another BIN2CC not found, although I have defined bin2cc in cmake build.
  2. This previous issue helped me, I have manually modified the CMakeCache.txt and configure_optix.cmake with set(BIN2C /usr/local/cuda-11.6/bin/bin2c). This solved the BIN2CC problem, but lead me to another compile time error.
  3. So finally I deleted all the CMakeCache.txt files, but kept the configure_optix.cmake with set(BIN2C /usr/local/cuda-11.6/bin/bin2c) and made a fresh cmake build.
  4. And finally it is working.