[Paraview] Build errors due to missing OSMesa include directory

Burlen Loring bloring at lbl.gov
Tue Aug 6 13:05:49 EDT 2013


Hi Paul,

Could it be that you didn't set OPENGL_gl_LIBRARY library? At least 
that's one difference I see between your config and mine. See the 
following cmake config, which works for me with 3.98.1.

this maybe unrelated to your current problems, but there's no compelling 
reason to use the MPI compiler wrappers. It should work, but in practice 
sometimes it leads to odd issues. At least that's my experience. So I'd 
say that if you don't want to be debugging wierd issues use an actual 
cxx compiler. Intel's compilers work fine with PV.

#!/bin/bash
MESA=/work/apps/mesa-dev/
cmake \
...
   -DVTK_USE_X=OFF \
   -DVTK_OPENGL_HAS_OSMESA=ON \
   -DOPENGL_INCLUDE_DIR=$MESA/include \
   -DOPENGL_gl_LIBRARY=$MESA/lib/libOSMesa32.so \
   -DOPENGL_glu_LIBRARY="" \
   -DOPENGL_glut_LIBRARY="" \
   -DGLUT_glut_LIBRARY="" \
   -DGLUT_INCLUDE_DIR="" \
   -DGLUT_Xi_LIBRARY="" \
   -DGLUT_Xmu_LIBRARY="" \
   -DGLUT_glut_LIBRARY="" \
   -DOPENGL_xmesa_INCLUDE_DIR=$MESA/include \
   -DOSMESA_INCLUDE_DIR=$MESA/include \
   -DOSMESA_LIBRARY=$MESA/lib/libOSMesa32.so \
...
   $*

On 08/06/2013 08:33 AM, Paul Melis wrote:
> Hi,
>
> I get build errors with 3.98.1 and the following config command:
>
> $HOME/software/cmake-2.8.11.2/bin/cmake \
>     -DCMAKE_C_COMPILER=/opt/intel/impi/4.1.0.024/bin64/mpicc \
>     -DCMAKE_CXX_COMPILER=/opt/intel/impi/4.1.0.024/bin64/mpicxx \
>     -DCMAKE_INSTALL_PREFIX=$HOME/software/paraview-osmesa-3.98.1 \
>     -DCMAKE_BUILD_TYPE=Release \
>     -DPARAVIEW_BUILD_QT_GUI=OFF \
>     -DPARAVIEW_USE_MPI=ON \
>     -DPARAVIEW_ENABLE_PYTHON=ON \
>     -DPARAVIEW_INSTALL_DEVELOPMENT_FILES=ON \
>     -DVTK_USE_MPI=ON \
>     -DVTK_USE_X=OFF \
>     -DVTK_USE_OFFSCREEN=ON \
>     -DVTK_OPENGL_HAS_OSMESA=ON \
> -DVTK_MPIRUN_EXE:FILEPATH=/opt/intel/impi/4.1.0.024/bin64/mpirun \
>     -DOSMESA_INCLUDE_DIR=$HOME/software/osmesa-7.9.2/include \
>     -DOPENGL_INCLUDE_DIR=$HOME/software/osmesa-7.9.2/include \
>     -DOPENGL_gl_LIBRARY="" \
>     -DOPENGL_glu_LIBRARY=$HOME/software/osmesa-7.9.2/lib/libGLU.so \
>     -DOSMESA_LIBRARY=$HOME/software/osmesa-7.9.2/lib/libOSMesa.so \
>     ../ParaView-3.98.1-source
>
> Seems to be due to OPENGL_INCLUDE_DIR not being used in all the right 
> places. The correct include path is present in the cache:
>
> [paulm at int2 t]$ grep osmesa-7.9.2 CMakeCache.txt
> IceTGL_LIB_DEPENDS:STATIC=general;m;general;IceTCore;general;/home/paulm/software/osmesa-7.9.2/lib/libOSMesa.so; 
>
> OPENGL_INCLUDE_DIR:PATH=/home/paulm/software/osmesa-7.9.2/include
> OPENGL_glu_LIBRARY:FILEPATH=/home/paulm/software/osmesa-7.9.2/lib/libGLU.so 
>
> OSMESA_INCLUDE_DIR:UNINITIALIZED=/home/paulm/software/osmesa-7.9.2/include 
>
> OSMESA_LIBRARY:UNINITIALIZED=/home/paulm/software/osmesa-7.9.2/lib/libOSMesa.so 
>
> vtkRenderingOpenGL_LIB_DEPENDS:STATIC=general;vtkImagingHybrid;general;vtkRenderingCore;general;/home/paulm/software/osmesa-7.9.2/lib/libOSMesa.so; 
>
> vtkftgl_LIB_DEPENDS:STATIC=general;/home/paulm/software/osmesa-7.9.2/lib/libOSMesa.so;general;vtkfreetype; 
>
> vtkgl2ps_LIB_DEPENDS:STATIC=general;/home/paulm/software/osmesa-7.9.2/lib/libOSMesa.so;general;m;general;vtkzlib;general;vtkpng;general;m; 
>
> FIND_PACKAGE_MESSAGE_DETAILS_OSMesa:INTERNAL=[/home/paulm/software/osmesa-7.9.2/lib/libOSMesa.so][/home/paulm/software/osmesa-7.9.2/include][v()] 
>
>
> But apparently the correct include path isn't added:
>
> [ 48%] Built target IceTGL
> [ 48%] Built target icetTests_mpi
> [ 48%] Building CXX object 
> ParaViewCore/VTKExtensions/Rendering/CMakeFiles/vtkPVVTKExtensionsRendering.dir/vtkPVDefaultPass.cxx.o
> In file included from /home/paulm/c/t/VTK/Rendering/OpenGL/vtkgl.h:22,
>                  from 
> /home/paulm/c/ParaView-3.98.1-source/ParaViewCore/VTKExtensions/Rendering/vtkPVDefaultPass.cxx:21:
> /home/paulm/c/ParaView-3.98.1-source/VTK/Rendering/OpenGL/vtkOpenGL.h:27:43: 
> error: GL/gl.h: No such file or directory
> In file included from 
> /home/paulm/c/ParaView-3.98.1-source/ParaViewCore/VTKExtensions/Rendering/vtkPVDefaultPass.cxx:21:
> /home/paulm/c/t/VTK/Rendering/OpenGL/vtkgl.h:11277: error: 'GLenum' 
> does not name a type
> /home/paulm/c/t/VTK/Rendering/OpenGL/vtkgl.h:11278: error: 'GLenum' 
> does not name a type
> /home/paulm/c/t/VTK/Rendering/OpenGL/vtkgl.h:11279: error: 'GLenum' 
> does not name a type
> /home/paulm/c/t/VTK/Rendering/OpenGL/vtkgl.h:11280: error: 'GLenum' 
> does not name a type
> /home/paulm/c/t/VTK/Rendering/OpenGL/vtkgl.h:11281: error: 'GLenum' 
> does not name a type
>
>
> [paulm at int2 t]$ make VERBOSE=1 >out 2>&1
> [paulm at int2 t]$ grep mpicxx out
> cd /home/paulm/c/t/ParaViewCore/VTKExtensions/Rendering && 
> /opt/intel/impi/4.1.0.024/bin64/mpicxx   -DMPICH_IGNORE_CXX_SEEK 
> -DVTK_IN_VTK -DvtkPVVTKExtensionsRendering_EXPORTS -O3 -DNDEBUG -fPIC 
> -I/home/paulm/c/t -I/home/paulm/c/t/VTK/Charts/Core 
> -I/home/paulm/c/ParaView-3.98.1-source/VTK/Charts/Core 
> -I/home/paulm/c/t/VTK/Common/Color 
> -I/home/paulm/c/ParaView-3.98.1-source/VTK/Common/Color 
> -I/home/paulm/c/t/VTK/Common/DataModel 
> -I/home/paulm/c/ParaView-3.98.1-source/VTK/Common/DataModel 
> -I/home/paulm/c/t/VTK/Common/Math 
> -I/home/paulm/c/ParaView-3.98.1-source/VTK/Common/Math 
> -I/home/paulm/c/t/VTK/Common/Core 
> -I/home/paulm/c/ParaView-3.98.1-source/VTK/Common/Core 
> -I/home/paulm/c/t/VTK/Utilities/KWSys 
> -I/home/paulm/c/ParaView-3.98.1-source/VTK/Utilities/KWSys 
> -I/home/paulm/c/t/VTK/Common/Misc -I/home/paulm....
> [paulm at int2 t]$ grep mpicxx out | grep osmesa-7.9.2
> [paulm at int2 t]$
>
> Any clues which CMake variables to check to get this compile working?
>
> Thanks,
> Paul
>
> PS I can't try the 4.x version as we want to do a comparison against 
> benchmarks done on a different system with 3.98.1
>
>
>



More information about the ParaView mailing list