Is headless mode not working or am I missing something?

I confirm that the ParaView 5.12.0 osmesa NEEDS libglapi.so.0 and other OpenGL related libraries:

 ldd ./bin/pvpython-real
   [...]
   libglapi.so.0 => /usr/lib/libglapi.so.0 (0x0000779869e24000)
   [...]
   libGLdispatch.so.0 => /usr/lib/libGLdispatch.so.0 (0x0000779864fc0000)
   libGLX.so.0 => /usr/lib/libGLX.so.0 (0x0000779864f8e000)
   libxcb.so.1 => /usr/lib/libxcb.so.1 (0x0000779864f63000)

This is definitely unexpected, my suspicion is that one of our dependency links to it.

According to libtree:

libglapi is needed by osmesa (!!!):

│   │   │   ├── libOSMesa.so.8 [runpath]
│   │   │   │   ├── libz.so.1 [rpath]
│   │   │   │   ├── libglapi.so.0 [default path]
│   │   │   │   └── libpthread.so.0 [default path]

And libGL* and libx* are linked by open cascade:

│   │   │   │   │   │   ├── libTKService.so.7.7 [rpath]
│   │   │   │   │   │   │   └── libX11.so.6 [default path]
│   │   │   │   │   │   │       └── libxcb.so.1 [default path]
│   │   │   │   │   │   │           ├── libXau.so.6 [default path]
│   │   │   │   │   │   │           └── libXdmcp.so.6 [default path]

│   │   │   │   │   ├── libTKV3d.so.7.7 [rpath]
│   │   │   │   │   │   ├── libGL.so.1 [default path]
│   │   │   │   │   │   │   ├── libGLdispatch.so.0 [default path]
│   │   │   │   │   │   │   └── libGLX.so.0 [default path]
│   │   │   │   │   │   │       ├── libGLdispatch.so.0 [default path]
│   │   │   │   │   │   │       └── libX11.so.6 [default path]
│   │   │   │   │   │   ├── libX11.so.6 [default path]

To work around this, one simply needs to install the packages but it would be better to not need them at all.

So libglapi links seems to be intentional (?) and the rest should be carved out of the opencascade lib by patching it. @Dave_DeMarle , please open an issue on https://gitlab.kitware.com/paraview/paraview-superbuild/.