Error: Building CXX object VTK/GUISupport/Qt/CMakeFiles/vtkGUISupportQt.dir/QVTKOpenGLNativeWidget.cxx.o


#1

When I building my paraview, the following errors happened, I can’t solve it. Anybody else have met the similar errors? Could you give me some suggestions? Thank you very much.
zhou@zhou-virtual-machine:~$ cd paraview_build/
zhou@zhou-virtual-machine:~/paraview_build$ make
[ 8%] Built target ParaViewData
[ 19%] Built target VTKData
[ 19%] Built target kwiml_test
[ 19%] Built target vtksys
[ 19%] Built target vtkWrappingTools
[ 19%] Built target vtkWrapHierarchy
[ 19%] Built target vtkCommonCoreHierarchy
[ 20%] Built target vtkCommonCore
[ 20%] Built target vtkCommonMathHierarchy
[ 20%] Built target vtkCommonMath
[ 20%] Built target vtkCommonMiscHierarchy
[ 20%] Built target vtkCommonMisc
[ 20%] Built target vtkCommonSystemHierarchy
[ 20%] Built target vtkCommonSystem
[ 20%] Built target vtkCommonTransformsHierarchy
[ 20%] Built target vtkCommonTransforms
[ 20%] Built target vtkCommonDataModelHierarchy
[ 21%] Built target vtkCommonDataModel
[ 21%] Built target vtkCommonExecutionModelHierarchy
[ 21%] Built target vtkCommonExecutionModel
[ 21%] Built target vtkFiltersCoreHierarchy
[ 22%] Built target vtkFiltersCore
[ 22%] Built target vtkCommonComputationalGeometryHierarchy
[ 22%] Built target vtkCommonComputationalGeometry
[ 22%] Built target vtkFiltersGeneralHierarchy
[ 23%] Built target vtkFiltersGeneral
[ 23%] Built target vtkImagingCoreHierarchy
[ 23%] Built target vtkImagingCore
[ 23%] Built target vtkImagingFourierHierarchy
[ 23%] Built target vtkImagingFourier
[ 23%] Built target vtkFiltersStatisticsHierarchy
[ 23%] Built target vtkFiltersStatistics
[ 23%] Built target vtkFiltersExtractionHierarchy
[ 23%] Built target vtkFiltersExtraction
[ 23%] Built target vtkFiltersSourcesHierarchy
[ 23%] Built target vtkFiltersSources
[ 23%] Built target vtkCommonColorHierarchy
[ 23%] Built target vtkCommonColor
[ 23%] Built target vtkFiltersGeometryHierarchy
[ 23%] Built target vtkFiltersGeometry
[ 23%] Built target vtkRenderingCoreHierarchy
[ 24%] Built target vtkRenderingCore
[ 24%] Built target vtkInteractionStyleHierarchy
[ 25%] Built target vtkInteractionStyle
[ 25%] Built target vtkglew
[ 25%] Built target vtkRenderingOpenGL2Hierarchy
[ 25%] Built target vtkRenderingOpenGL2
[ 25%] Built target vtkProbeOpenGLVersion
[ 25%] Built target vtkProbeOpenGLVersion-launcher
Scanning dependencies of target vtkGUISupportQt
[ 25%] Building CXX object VTK/GUISupport/Qt/CMakeFiles/vtkGUISupportQt.dir/QVTKOpenGLNativeWidget.cxx.o
/home/zhou/paraview/VTK/GUISupport/Qt/QVTKOpenGLNativeWidget.cxx: In member function ‘void QVTKOpenGLNativeWidget::recreateFBO()’:
/home/zhou/paraview/VTK/GUISupport/Qt/QVTKOpenGLNativeWidget.cxx:386:52: error: ‘GL_RENDERBUFFER_SAMPLES’ was not declared in this scope
f->glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_SAMPLES, &samples);
^
/home/zhou/paraview/VTK/GUISupport/Qt/QVTKOpenGLNativeWidget.cxx: In member function ‘virtual void QVTKOpenGLNativeWidget::paintGL()’:
/home/zhou/paraview/VTK/GUISupport/Qt/QVTKOpenGLNativeWidget.cxx:526:3: error: ‘QOpenGLFunctions_3_2_Core’ was not declared in this scope
QOpenGLFunctions_3_2_Core* f =
^
/home/zhou/paraview/VTK/GUISupport/Qt/QVTKOpenGLNativeWidget.cxx:526:30: error: ‘f’ was not declared in this scope
QOpenGLFunctions_3_2_Core* f =
^
/home/zhou/paraview/VTK/GUISupport/Qt/QVTKOpenGLNativeWidget.cxx:527:56: error: the value of ‘QOpenGLFunctions_3_2_Core’ is not usable in a constant expression
QOpenGLContext::currentContext()->versionFunctions<QOpenGLFunctions_3_2_Core>();
^
/home/zhou/paraview/VTK/GUISupport/Qt/QVTKOpenGLNativeWidget.cxx:526:3: note: ‘QOpenGLFunctions_3_2_Core’ was not declared ‘constexpr’
QOpenGLFunctions_3_2_Core* f =
^
/home/zhou/paraview/VTK/GUISupport/Qt/QVTKOpenGLNativeWidget.cxx:527:83: error: no matching function for call to ‘QOpenGLContext::versionFunctions()’
QOpenGLContext::currentContext()->versionFunctions<QOpenGLFunctions_3_2_Core>();
^
/home/zhou/paraview/VTK/GUISupport/Qt/QVTKOpenGLNativeWidget.cxx:527:83: note: candidate is:
In file included from /home/zhou/Qt/5.11.2/android_armv7/include/QtGui/QOpenGLContext:1:0,
from /home/zhou/paraview/VTK/GUISupport/Qt/QVTKOpenGLNativeWidget.cxx:20:
/home/zhou/Qt/5.11.2/android_armv7/include/QtGui/qopenglcontext.h:194:11: note: template TYPE* QOpenGLContext::versionFunctions() const
TYPE *versionFunctions() const
^
/home/zhou/Qt/5.11.2/android_armv7/include/QtGui/qopenglcontext.h:194:11: note: template argument deduction/substitution failed:
/home/zhou/paraview/VTK/GUISupport/Qt/QVTKOpenGLNativeWidget.cxx:532:26: error: ‘GL_DRAW_FRAMEBUFFER’ was not declared in this scope
f->glBindFramebuffer(GL_DRAW_FRAMEBUFFER, this->defaultFramebufferObject());
^
/home/zhou/paraview/VTK/GUISupport/Qt/QVTKOpenGLNativeWidget.cxx:535:26: error: ‘GL_READ_FRAMEBUFFER’ was not declared in this scope
f->glBindFramebuffer(GL_READ_FRAMEBUFFER, this->FBO->handle());
^
make[2]: *** [VTK/GUISupport/Qt/CMakeFiles/vtkGUISupportQt.dir/QVTKOpenGLNativeWidget.cxx.o] Error 1
make[1]: *** [VTK/GUISupport/Qt/CMakeFiles/vtkGUISupportQt.dir/all] Error 2
make: *** [all] Error 2


(Cory Quammen (Kitware)) #2

Against which version of Qt are you building ParaView?


#3

Qt 5.11.2


(Mathieu Westphal) #4

Did you build Qt yourself ?


#5

yes, I built Qt myself.


(Mathieu Westphal) #6

You are impacted by this bug :
https://gitlab.kitware.com/paraview/paraview-superbuild/issues/94

You can either rebuild qt with -opengl dynamic or simply download a qt package and install it to build ParaView with.

Unless you have specific needs, I would suggest the later.


#7

Thank you, I have solved this issue.