Build issues / segfaulting with OptiX 8.0 SDK


I’m interested in using ray tracing in a personal project and wanted to check out OptiX 8.0. My machine configuration is:

ubuntu 22.04
cuda 12.2
cmake 3.22
NVIDIA TITAN V (535.113.01)

When I try to build the SDK, one of the examples produces an error during cmake configuration:

> cd /path/to/optix8/SDK
> cmake . -Bbuild


CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
    linked by target "optixOpticalFlow"

This isn’t a big issue, but it would be good to get that fixed – was it meant to link against ${CUDA_LIBRARIES} like all the other examples?

The bigger problem is that, after building the examples, none of them seem to work!

> cd build && make -j
> cd bin
> ./optixConsole
Segmentation fault (core dumped)
> ./optixWhitted
Segmentation fault (core dumped)
> ./optixTriangle
Segmentation fault (core dumped)

after rebuilding with debug flags enabled, I get the following backtrace:

Thread 1 "optixConsole" received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(cuda-gdb) bt
#0  0x0000000000000000 in ?? ()
#1  0x00007fffb29dd2cd in ?? () from /lib/x86_64-linux-gnu/
#2  0x000055555556ffda in optixDeviceContextCreate (fromContext=0x0, options=0x7fffffffdaa0, context=0x7fffffffda90)
    at /home/sam/code/optix8/include/optix_stubs.h:330
#3  0x000055555556ec93 in createContext (state=...) at /home/sam/code/optix8/SDK/optixConsole/optixConsole.cpp:675
#4  0x000055555556fa74 in main (argc=1, argv=0x7fffffffdfd8) at /home/sam/code/optix8/SDK/optixConsole/optixConsole.cpp:795

I’m looking for help figuring out how to get these examples to run.

edit: this is just a duplicate of Segmentation fault in Optix7.1 examples

I initially thought that solution didn’t apply, as I had a fresh CUDA installation. But sure enough, I was also missing this symlink.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.