Compile Paraview with EGL support for NVIDIA GLVND drivers
We are struggling to compile Paraview with the EGL support using the nvidia (GLVND) libraries. On various internet pages/forums I noticed more people are struggling with this. But I could not find the real solution for this. I have the idea the issue is related to the fact that on Centos 7, there was also a switch to use GLVND.
I tried the following with various results:
- When I compile Paraview with EGL support, force cmake to use GLVND by setting the variable: OpenGL_GL_PREFERENCE to GLVND, I'm able to compile Paraview. But I get the error from EGL that GLEW could not be initialized. Also the client/server setup is unstable and I assume due to the same error, because it is also displayed when a try to run a demo using pvserver and pvpython.
- When I compile Paraview with EGL support, force cmake to use the LATENCY driver and set the following variable:
//Path to a library.
OPENGL_egl_LIBRARY:FILEPATH=/usr/lib64/libEGL_nvidia.so.390.116
//Path to a library.
OPENGL_gl_LIBRARY:FILEPATH=/usr/lib64/libGL.so
//Path to a library.
OPENGL_glu_LIBRARY:FILEPATH=/usr/lib64/libGLU.so
//Path to a library.
OPENGL_glx_LIBRARY:FILEPATH=/usr/lib64/libGLX.so
//Path to a library.
OPENGL_opengl_LIBRARY:FILEPATH=/usr/lib64/libOpenGL.so
The compilation stops because libEGL due to the same undefined references like e.g.: undefined reference to `eglQueryString'..... These only seem to part of the Mesa OpenEGL.so 3. When I compiled Paraview with EGL support, force CMAKE to use the latency driver and do NOT change the references to the nvidia libraries I'm also able to compile. But during the run I get all kind of OpenGL errors. Most likely because it is using the wrong EGL libraries and Paraview is probably aware of the GLVND support due to the fact that Open_GL_PREFERENCES is set to LEGACY. If I remembered it correctly it was displaying that no OpenGL 3.1 support could be found.
I could not find any instruction how to compile EGL support for NVIDIA when a GLVND version of the driver is used. From what I understood this also be the future for most OSes. Could anybody clarify how we should be able to compile this?
I'm running Centos 7.6 I'm using the NVIDIA 390.x driver, which is currently the latest available for my GPU. But also more recent drivers still not seem to include methods like eglQueryString (Checked this with nm -D /path/to/lib) I tried to compile the latest stable release (at time of writing): Paraview 5.6.1
Thank you in advance for any help!