Can't build `nveglglessink` from source (missing `nvbufsurface.h`)

Seems there’s either a header missing or an include path not specified.

gsteglglessink.c:99:10: fatal error: nvbufsurface.h: No such file or directory
 #include "nvbufsurface.h"

Would very much appreciate help resolving this quickly as we’ve run into an issue where we need to build the sink.

Is there a debian package for nvbufsurface that needs to be installed like nvbufsurface-1.0-dev or something? The header for does not seem to be on the system and the README does not mention it.

Edit: looks like <cuda.h> is also not found, so the linker and include automake settings likely need fixing.


The issue is known. We are checking it internally.

1 Like

Hi @mdegans ,

I had the same error when trying to rebuild some of the L4T gstreamer packages (e.g., gstegl, gstnvv4lcamera, etc.). It turns out that some of the other packages already contain nvbufsurface.h, and as far as I’ve checked, all of them are identical. The easiest workaround would probably be to copy this file into where your compiler expects. In this particular case, it would be:


It should compile and install as expected afterward. In my case, it turns out that my CUDA installation didn’t agree with the makefile. By the time I installed the gstegl package successfully, this is what I had added to my bashrc file:

export CUDA_HOME=/usr/local/cuda-10.2${CUDA_HOME:+:${CUDA_HOME}}                                                                                                                                            
export PATH=/usr/local/cuda-10.2/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-10.2/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
export CPATH=/usr/local/cuda-10.2/include${CPATH:+:${CPATH}}
export LIBRARY_PATH=/usr/local/cuda-10.2/lib64${LIBRARY_PATH:+:${LIBRARY_PATH}}

I haven’t fully tested the sink, but it at least got me through the installation. Hope it helps.


Please also try this solution:
Memory leak information is observed in case nveglglessink plugin is used - #6 by DaneLLL