"If you want to use EGL context management instead, link against libOpenGL.so and libEGL.so."
After installing the nvidia-410 package, as reported in the original post, the EGL test program from the original post doesn't work if linking against libGL.so:
With installing via a runfile as mentioned by mmatl in post #8, the test program works when linking against either libGL.so or libOpenGL.so.
The difference between the packaged and runfile drivers may be due to the dependencies linked into libGL.so (I included a comparison in the stackoverflow post).
The final solution is therefore to link against libOpenGL.so instead of libGL.so.
I've been documenting my attempt to work around this problem here: https:/ /stackoverflow. com/questions/ 47415198/ missing- gl-version- from-glewinit- using-egl/ 54668271# 54668271
I discovered an nvidia blog post - https:/ /devblogs. nvidia. com/linking- opengl- server- side-rendering/ - which says:
"If you want to use EGL context management instead, link against libOpenGL.so and libEGL.so."
After installing the nvidia-410 package, as reported in the original post, the EGL test program from the original post doesn't work if linking against libGL.so:
$ wget https:/ /gist.githubuse rcontent. com/funchal/ bff0a8d6dae5b3a ce1a88c392416b5 bc/raw/ 1427821a2390a30 779881ab59c55b5 550a468919/ main.c
$ gcc main.c -lGL -lEGL
$ ./a.out
egl 1.5
a.out: main.c:53: main: Assertion `renderer' failed.
Aborted (core dumped)
However it does work if linking against libOpenGL.so:
$ wget https:/ /gist.githubuse rcontent. com/funchal/ bff0a8d6dae5b3a ce1a88c392416b5 bc/raw/ 1427821a2390a30 779881ab59c55b5 550a468919/ main.c lib/nvidia- 410 -lOpenGL -lEGL
$ gcc main.c -L/usr/
$ ./a.out
egl 1.5
renderer: Tesla K80/PCIe/SSE2
version: 4.6.0 NVIDIA 410.78
With installing via a runfile as mentioned by mmatl in post #8, the test program works when linking against either libGL.so or libOpenGL.so.
The difference between the packaged and runfile drivers may be due to the dependencies linked into libGL.so (I included a comparison in the stackoverflow post).
The final solution is therefore to link against libOpenGL.so instead of libGL.so.