could not open source file "GL/gl.h" compiling vtkIceTSynchronizedRenderers.cxx
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
Copy-paste from http://www.paraview.org/pipermail/paraview/2011-November/023168.html :
I tried to build the 3.12.0 RC3 with MesaLib-7.11 (OSMesa) on a RHEL 5.1 headless cluster and got an error:
/nfs/work2/v14/v14006/src/ParaView-3.12.0-RC3/VTK/Rendering/vtkOpenGL.h(26): catastrophic error: could not open source file "GL/gl.h"
include <GL/gl.h> // Include OpenGL API.
^
compilation aborted for /nfs/work2/v14/v14006/src/ParaView-3.12.0-RC3/ParaViewCore/ClientServerCore/vtkIceTSynchronizedRenderers.cxx (code 4) make[2]: *** [ParaViewCore/ClientServerCore/CMakeFiles/vtkPVClientServerCore.dir/vtkIceTSynchronizedRenderers.cxx.o] Error 4
Looking into ParaViewCore/ClientServerCore/CMakeLists.txt I found nothing that specifies ${OPENGL_INCLUDE_DIR} as opposed to the old ParaView-3.10.1/Servers/Filters/CMakeLists.txt (where vtkIceTSynchronizedRenderers.cxx had been in) having
The following was copy/paste from vtkIncludeDirectories.cmake
OpenGL include directories.
IF(APPLE) IF(VTK_USE_X OR VTK_OPENGL_HAS_OSMESA) INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR}) ENDIF(VTK_USE_X OR VTK_OPENGL_HAS_OSMESA) ELSE(APPLE) INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR}) ENDIF(APPLE)
so perhaps we need something similar around (line 116)
IF (PARAVIEW_USE_ICE_T AND VTK_USE_MPI) SET (Kit_SRCS ${Kit_SRCS} vtkIceTSynchronizedRenderers.cxx) ..... ENDIF (PARAVIEW_USE_ICE_T AND VTK_USE_MPI)
of ParaViewCore/ClientServerCore/CMakeLists.txt ?