Problems using CMake to build optix_advanced_samples

Hello,

I am following the build steps: https://github.com/nvpro-samples/optix_advanced_samples/blob/master/INSTALL-WIN.txt but having trouble.

When I set the OptiX_INSTALL_DIR and press configure a second time, I receive this error:

CMake Error at CMake/FindOptiX.cmake:117 (message):
  OptiX library not found.  Please set OptiX_INSTALL_DIR to locate it
  automatically.
Call Stack (most recent call first):
  CMake/FindOptiX.cmake:126 (OptiX_report_error)
  CMakeLists.txt:203 (find_package)

My CMake output looks like this:
Imgur
pretty confused on what it means, the CMAKE_INSTALL_PREFIX directory doesn’t exist and I’m not sure what the optix_DLL should be pointed at.

Full CMake output:

CMake Warning (dev) at CMake/Macros.cmake:103 (SET):
  implicitly converting 'CACHE' to 'STRING' type.
Call Stack (most recent call first):
  CMake/ConfigCompilerFlags.cmake:57 (first_time_set)
  CMake/ConfigCompilerFlags.cmake:66 (set_flags)
  CMake/ConfigCompilerFlags.cmake:182 (append_and_set)
  CMakeLists.txt:119 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at CMake/Macros.cmake:103 (SET):
  implicitly converting 'CACHE' to 'STRING' type.
Call Stack (most recent call first):
  CMake/ConfigCompilerFlags.cmake:57 (first_time_set)
  CMake/ConfigCompilerFlags.cmake:66 (set_flags)
  CMake/ConfigCompilerFlags.cmake:183 (append_and_set)
  CMakeLists.txt:119 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at CMake/Macros.cmake:103 (SET):
  implicitly converting 'CACHE' to 'STRING' type.
Call Stack (most recent call first):
  CMake/ConfigCompilerFlags.cmake:57 (first_time_set)
  CMake/ConfigCompilerFlags.cmake:385 (set_flags)
  CMakeLists.txt:119 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at CMake/Macros.cmake:103 (SET):
  implicitly converting 'CACHE' to 'STRING' type.
Call Stack (most recent call first):
  CMake/ConfigCompilerFlags.cmake:57 (first_time_set)
  CMake/ConfigCompilerFlags.cmake:389 (set_flags)
  CMakeLists.txt:119 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

Could NOT find DevIL (missing: IL_LIBRARIES ILU_LIBRARIES IL_INCLUDE_DIR) 
CMake Error at CMake/FindOptiX.cmake:117 (message):
  OptiX library not found.  Please set OptiX_INSTALL_DIR to locate it
  automatically.
Call Stack (most recent call first):
  CMake/FindOptiX.cmake:126 (OptiX_report_error)
  CMakeLists.txt:203 (find_package)


Configuring incomplete, errors occurred!

I was able to build and run through this tutorial without any issues so I know optix is working on my machine if that helps: Ingo Wald / optix7course · GitLab

Thanks for any help

Hi johanS,

I expect one of the issues you’re running into is because the advanced samples are using OptiX 6, and Ingo’s course is using OptiX 7. The DLL you need is from the OptiX 6 SDK.

In the 2nd cmake log you included, the main issue is you’re missing the DevIL library, or you just need to set your IL* paths that point to your DevIL installation.


David.

Thanks for the reply.

I added the DeviL paths in a prior attempt but ran into the same issue of missing the OptiX 6 dlls.
I didn’t realize the advanced samples were for OptiX 6 but this makes more sense now as I read 7 is pretty different than 6.

If I want to keep using OptiX 7, would it be possible to download and attach the OptiX 6 dlls or would I be better off working from the advanced sample code and trying to get it working in my working OptiX 7 environment from Ingo’s course?

My goal is to get some of the advanced sample code running in OptiX 7

You can install the OptiX 6 SDK separately from OptiX 7; it will work to use both at the same time. You will need the complete OptiX 6 SDK, not just the DLLs.

I’d recommend getting the advanced samples to build & run with OptiX 6 before trying to port it over to OptiX 7. Detlef is planning to post the OptiX 7 version of these samples at some point in the near future. Just keep in mind that porting OptiX 6 examples to OptiX 7 is typically a complete rewrite, so getting the advanced samples to run in OptiX 7 on your own is not a trivial undertaking.


David.

Makes sense. I will try downloading the OptiX 6 SDK to run them.

I am mainly interested in learning to work with OptiX 7 though, so I will continue to build off of the tutorial from Ingo’s course.
Trying to port some samples from 6 to 7 sounds like a fun challenge, looking forward to seeing the ports from Detlef which I’m sure will be better than my attempts!

Thanks again for the help

I believe these advanced sample codes are based on OptiX6.5 and CUDA 10.1 extension 2.

These legacy examples are based on Optix 5. I made them compile with up to OptiX 6.5.0 but they are not using built-in triangle primitives because these did not exist in OptiX 5 and as such are not running at the maximum possible performance on RTX boards.
They will work with CUDA toolkit major versions up to 10.x when using OptiX 6 because later CUDA toolkits are not supported by that. This is described inside the OptiX SDK release notes for each individual OptiX release.

Please don’t use these legacy examples for new developments anymore. It’s not worth spending time on them today given that there are four releases of the OptiX 7 SDK available already. That modern OptiX API is explicit, more flexible and always faster than the ten year old OptiX API in versions 1 to 6.

1 Like