[Paraview] Compiling without X11 libraries

Moreland, Kenneth kmorel at sandia.gov
Thu Feb 25 11:16:19 EST 2010


Thanks everyone for your help.  I'm pretty sure I got past this issue.

I did have to "hack" VTK/CMake/vtkUseX.cmake as you mentioned.  That said, is there a reason not to check in a change that allows you to set VTK_USE_X (that is, set VTK_USE_X_OPTIONAL) in the case that VTK_OPENGL_HAS_OSMESA is ON?  The system would by default behave the same but would allow you to turn of X in this case when you have OSMesa but no X.

-Ken


On 2/25/10 8:08 AM, "pat marion" <pat.marion at kitware.com> wrote:

I think the latest release of MesaLib using a configure script, but older versions just provided makefiles.  I still use the older releases and run 'make linux-osmesa' to get libOSMesa.so and libGLU.so without any dependencies on Xlib.

Unfortunately you can't just set libOSMesa.so in place of libGL.so (setting OPENGL_gl_LIBRARY in cmake) because cmake uses the OPENGL_gl_LIBRARY variable to check for the existance of real opengl versus osmesa.  So that's why I said to set OPENGL_gl_LIBRARY to the empty string.

I ran a new build and didn't get any of the link errors I described previously, so you probably don't have to worry about the other hacks I mentioned.  The steps should just be:

Edit VTK/CMake/vtkUseX.cmake and set VTK_USE_X_OPTIONAL to 1 instead of 0 (then VTK_USE_X will automatically default to OFF).  Create a new build folder and configure with -DOPENGL_gl_LIBRARY="".  Set OSMESA_LIBRARY and OSMESA_INCLUDE_DIR.  Now you should be able to build a pvserver that has no dependencies on X11 or libGL.

Pat

On Thu, Feb 25, 2010 at 8:39 AM, Biddiscombe, John A. <biddisco at cscs.ch> wrote:
Ken



More information about the ParaView mailing list