I am attempting to build headless paraview on a remote machine for client/server and pvbatch usage. This machine does not have a lot of the required dependencies, thus the choice of superbuild (specifically v5.11.1 as the machine does not have new enough cmake versions for 5.12.x).
My understanding is that for headless operation, I need to build with the osmesa flag on, but when I do, I am getting the following error:
– Could NOT find OpenGL (missing: OPENGL_opengl_LIBRARY OPENGL_glx_LIBRARY OpenGL)
CMake Error at VTK/CMake/vtkModule.cmake:4579 (message):
Could not find the OpenGL external dependency.
Call Stack (most recent call first):
VTK/CMake/vtkModule.cmake:5173 (vtk_module_find_package)
VTK/Utilities/OpenGL/CMakeLists.txt:58 (vtk_module_third_party_external)
This seems to imply that I already need an OpenGL backend despite the fact that I am using the superbuild because I do not have that already and for headless I should only need the provided osmesa. Am I missing a flag or is there a larger misunderstanding happening here?
Sure, I am using a cmake script setup. (I have a few extra options included but turned off that may be useful in the future assuming I understand them correctly).
So for the build script the relevant lines are:
cmake
-DCMAKE_C_COMPILER=gcc
-DCMAKE_CXX_COMPILER=g++
-CbuildPV_settings.cmake
and buildPV_settings.cmake contains: #General build settings
set(CMAKE_BUILD_TYPE Release CACHE STRING “”)
set(BUILD_SHARED_LIBS ON CACHE BOOL “”)
#Enable the appropriate packages
set(ENABLE_ffmpeg OFF CACHE BOOL “”)
set(ENABLE_hdf5 ON CACHE BOOL “”)
set(ENABLE_matplotlib OFF CACHE BOOL “”)
set(ENABLE_mpi ON CACHE BOOL “”)
set(ENABLE_numpy OFF CACHE BOOL “”)
set(ENABLE_mesa OFF CACHE BOOL “”)
set(ENABLE_osmesa ON CACHE BOOL “”)
set(ENABLE_paraview ON CACHE BOOL “”)
set(ENABLE_png OFF CACHE BOOL “”)
set(ENABLE_python ON CACHE BOOL “”)
set(ENABLE_xdmf3 OFF CACHE BOOL “”)
set(ENABLE_zlib OFF CACHE BOOL “”)
set(USE_SYSTEM_hdf5 ON CACHE BOOL “”)
set(USE_SYSTEM_matplotlib OFF CACHE BOOL “”)
set(USE_SYSTEM_mpi ON CACHE BOOL “”)
set(USE_SYSTEM_numpy OFF CACHE BOOL “”)
set(USE_SYSTEM_osmesa OFF CACHE BOOL “”)
set(USE_SYSTEM_python OFF CACHE BOOL “”)