[Mesa-dev] VTK Offscreen Segfaults

tom fogal tfogal at sci.utah.edu
Wed Aug 4 12:29:20 PDT 2010

"Kevin H. Hobbs" <hobbsk at ohiou.edu> writes:
> On 08/04/2010 03:01 PM, tom fogal wrote:
> > 2) Make sure to switch the Mesa libraries in VTK's CMake step.  The
> > critical component is that your link lines must put "OSMesa" and
> > "MesaGL" in the 'correct' ordering, where 'correct' depends on
> > which you want to use (sounds like OSMesa in your case, so OSMesa
> > should come first).
> This VTK dashboard build has :
> OPENGL_INCLUDE_DIR:PATH=3D/home/kevin/mesa/include/
> OPENGL_gl_LIBRARY:FILEPATH=3D/home/kevin/mesa/lib/libGL.so
> OPENGL_glu_LIBRARY:FILEPATH=3D/home/kevin/mesa/lib/libGLU.so
> OPENGL_xmesa_INCLUDE_DIR:PATH=3D/home/kevin/mesa/include/
> OSMESA_INCLUDE_DIR:PATH=3D/home/kevin/mesa/include/
> OSMESA_LIBRARY:FILEPATH=3D/home/kevin/mesa/lib/libOSMesa.so
> If anything else is required to get passing tests then I'll file a bug
> against VTK.

I have found that VTK gets this wrong; basically it links in:


which will mean:

  /path/to/libGL.so /path/to/libOSMesa.so

in your case, which is wrong; it needs to be:

  /path/to/libOSMesa.so /path/to/libGL.so

To workaround it, we tell VTK that the OpenGL library is OSMesa and the
OSMesa library is libGL.  I would test that the above workaround works
(i.e. you're hitting the same issue I did) before filing a bug.


More information about the mesa-dev mailing list