I try to compile vtk 9 rc1 with osmesa support. It seems that although I set the include and library path, those variables are not used by CMake in the build process. I configure as follows:
OSMESA_INCLUDE_DIR /home/angainor/mesa/install/include OSMESA_LIBRARY /home/angainor/mesa/install/lib/x86_64-linux-gnu/libOSMesa.so VTK_OPENGL_HAS_OSMESA = ON
When I compile, very early on I get the following error:
vtk/vtk-release/ThirdParty/glew/vtkglew/src/glew.c:41:12: fatal error: GL/osmesa.h: No such file or directory 41 | # include <GL/osmesa.h> | ^~~~~~~~~~~~~
When I run
make VERBOSE=1 I do not see the configured OSMESA include dir in the command line. I tried to explicitly add
-I... to CXX and C flags. That works, but then I experience linker errors and unresolved symbols.
The same works with vtk 8.2. Is this a problem with v9?