I am on Ubuntu 16.04. When I attempt to compile the CUDA samples here is the error message
cd NVIDIA_CUDA-9.0_Samples
make
make[1]: Entering directory '/home/jasjuang/NVIDIA_CUDA-9.0_Samples/3_Imaging/EGLStream_CUDA_CrossGPU'
"/usr/local/cuda-9.0"/bin/nvcc -ccbin g++ -I../../common/inc -m64 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_37,code=sm_37 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_52,code=sm_52 -gencode arch=compute_60,code=sm_60 -gencode arch=compute_70,code=sm_70 -gencode arch=compute_70,code=compute_70 -o eglstrm_common.c.o -c eglstrm_common.c
eglstrm_common.c: In function ‘EGLStreamInit’:
eglstrm_common.c:85:81: error: ‘EGL_SUPPORT_REUSE_NV’ undeclared (first use in this function)
static const EGLint streamAttrFIFOMode[] = { EGL_STREAM_FIFO_LENGTH_KHR, 5, EGL_SUPPORT_REUSE_NV, EGL_FALSE, EGL_NONE };
^
eglstrm_common.c:85:81: note: each undeclared identifier is reported only once for each function it appears in
Makefile:339: recipe for target 'eglstrm_common.c.o' failed
make[1]: *** [eglstrm_common.c.o] Error 1
make[1]: Leaving directory '/home/jasjuang/NVIDIA_CUDA-9.0_Samples/3_Imaging/EGLStream_CUDA_CrossGPU'
Makefile:52: recipe for target '3_Imaging/EGLStream_CUDA_CrossGPU/Makefile.ph_build' failed
make: *** [3_Imaging/EGLStream_CUDA_CrossGPU/Makefile.ph_build] Error 2
and then I googled the keyword EGL_SUPPORT_REUSE_NV
and realize this keyword is part of eglext.h as indicated in https://www.khronos.org/registry/EGL/api/EGL/eglext.h. In my machine, there is a eglext.h at /usr/include/EGL/eglext.h, however when I inspect it, it appears to be an older version of eglext.h that does not have the keyword EGL_SUPPORT_REUSE_NV. In line 8 it shows Copyright (c) 2013-2016 The Khronos Group Inc
, whereas in the line 8 of https://www.khronos.org/registry/EGL/api/EGL/eglext.h it shows Copyright (c) 2013-2017 The Khronos Group Inc
.
I further research and discovered that eglext.h is part of the libegl1-mesa-dev package in Ubuntu 16.04. However, there isn’t a way for me to upgrade it. How can I compile the CUDA 9.0 samples on Ubuntu 16.04?