CUDA 9.1 for 3_imaging samples missing helper_gl.h

Nisight on Ubuntu 16.04 (Linux version 4.13.0-38-generic) / CUDA 9.1

Building 3_imaging samples stops on missing helper_gl.h
What needed to be installed or changed? freeglut3 and freeglut3-dev are installed

16:43:02 **** Incremental Build of configuration Debug for project bilateralFilter ****
make all
Building file: …/src/bilateralFilter.cpp
Invoking: NVCC Compiler
/usr/local/cuda-9.1/bin/nvcc -G -g -O0 -gencode arch=compute_61,code=sm_61 -m64 -odir “src” -M -o “src/bilateralFilter.d” “…/src/bilateralFilter.cpp”
…/src/bilateralFilter.cpp:38:23: fatal error: helper_gl.h: No such file or directory
compilation terminated.
src/subdir.mk:31: recipe for target ‘src/bilateralFilter.o’ failed
make: *** [src/bilateralFilter.o] Error 1

Cannot find any solution, please help

This doesn’t look like the makefile is set up correctly.

On a typical linux install, the missing file (helper_gl.h) is installed at:

/usr/local/cuda-9.1/samples/common/inc

That means your compile command should have a switch like this in it:

-I/usr/local/cuda-9.1/samples/common/inc

It does not, which is strange. That should be set up properly by the install process, not sure how you ended up with this:

/usr/local/cuda-9.1/bin/nvcc -G -g -O0 -gencode arch=compute_61,code=sm_61 -m64 -odir “src” -M -o “src/bilateralFilter.d”

If you imported this into nsight EE, it seems that either you did something wrong, or the import did not happen correctly.

Oups! Just found a solution by

installing OpenGL: sudo apt install mesa-utils

and install freeGlut: sudo apt-get install freeglut3-dev

Images samples are now compiling and executing

Checked /usr/local/cuda-9.1/samples/common/inc and it does contain helper_gl.h

Sorry for the inconvenience
Many thanks