# errors compiling ParaView 5.6.1 for offscreen GPU rendering

**URL:** https://discourse.paraview.org/t/errors-compiling-paraview-5-6-1-for-offscreen-gpu-rendering/2049
**Category:** ParaView Support
**Created:** [June 14, 2019, 7:07pm UTC](https://discourse.paraview.org/t/errors-compiling-paraview-5-6-1-for-offscreen-gpu-rendering/2049 "2019-06-14T19:07:34Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![razoumov](https://discourse.paraview.org/user_avatar/discourse.paraview.org/razoumov/32/1589_2.png) [@razoumov](https://discourse.paraview.org/u/razoumov)
#### Post date: [June 14, 2019, 7:07pm UTC](https://discourse.paraview.org/t/errors-compiling-paraview-5-6-1-for-offscreen-gpu-rendering/2049/1 "2019-06-14T19:07:34Z")

</div>

Hello,

I am trying to compile ParaView 5.6.1 server to run offscreen on cluster GPU nodes, using the following flags:

-DCMAKE\_SKIP\_RPATH=ON  
-DPARAVIEW\_INSTALL\_DEVELOPMENT\_FILES=ON  
-DVTK\_OPENGL\_HAS\_OSMESA=ON  
-DPARAVIEW\_USE\_MPI=ON  
-DPARAVIEW\_BUILD\_QT\_GUI=OFF  
-DPARAVIEW\_USE\_OSPRAY=ON  
-DOSPRAY\_INSTALL\_DIR=$NIXUSER\_PROFILE  
-DVTK\_USE\_SYSTEM\_HDF5=ON  
-DPARAVIEW\_ENABLE\_PYTHON=ON  
-DBUILD\_SHARED\_LIBS=ON  
-DVTK\_USE\_X=OFF  
-DVTK\_OPENGL\_HAS\_EGL=ON  
-DBUILD\_TESTING=OFF  
-DEGL\_INCLUDE\_DIR=/usr/include  
-DEGL\_LIBRARY=/usr/lib64/nvidia/libEGL.so  
-DEGL\_opengl\_LIBRARY=/usr/lib64/nvidia/libOpenGL.so  
-DVTK\_RENDERING\_BACKEND=OpenGL2

The compiler is gcc/5.4.0 (tried other gcc versions too), and I am getting the following error:

[13%] Linking CXX shared library …/…/…/lib/libvtkDomainsChemistry-pv5.6.so  
[13%] Built target vtkDomainsChemistry  
Scanning dependencies of target vtkglew  
[13%] Building C object VTK/ThirdParty/glew/vtkglew/CMakeFiles/vtkglew.dir/src/glew.c.o  
/tmp/pv/ParaView-v5.6.1/VTK/ThirdParty/glew/vtkglew/src/glew.c: In function ‘vtkglew\_glewInit’:  
/tmp/pv/ParaView-v5.6.1/VTK/ThirdParty/glew/vtkglew/src/glew.c:20864:3: error: unknown type name ‘PFNEGLGETCURRENTDISPLAYPROC’  
PFNEGLGETCURRENTDISPLAYPROC getCurrentDisplay = NULL;  
^  
/tmp/pv/ParaView-v5.6.1/VTK/ThirdParty/glew/vtkglew/src/glew.c:20869:24: error: ‘PFNEGLGETCURRENTDISPLAYPROC’ undeclared (first use in this function)  
getCurrentDisplay = (PFNEGLGETCURRENTDISPLAYPROC) glewGetProcAddress(“eglGetCurrentDisplay”);  
^  
/tmp/pv/ParaView-v5.6.1/VTK/ThirdParty/glew/vtkglew/src/glew.c:20869:24: note: each undeclared identifier is reported only once for each function it appears in  
/tmp/pv/ParaView-v5.6.1/VTK/ThirdParty/glew/vtkglew/src/glew.c:164:36: error: expected ‘;’ before ‘OSMesaGetProcAddress’  
define glewGetProcAddress(name) OSMesaGetProcAddress((const char \*)name)  
^  
/tmp/pv/ParaView-v5.6.1/VTK/ThirdParty/glew/vtkglew/src/glew.c:20869:53: note: in expansion of macro ‘glewGetProcAddress’  
getCurrentDisplay = (PFNEGLGETCURRENTDISPLAYPROC) glewGetProcAddress(“eglGetCurrentDisplay”);  
^  
/tmp/pv/ParaView-v5.6.1/VTK/ThirdParty/glew/vtkglew/src/glew.c:20870:20: error: called object ‘getCurrentDisplay’ is not a function or function pointer  
return eglewInit(getCurrentDisplay());  
^  
/tmp/pv/ParaView-v5.6.1/VTK/ThirdParty/glew/vtkglew/src/glew.c:20864:31: note: declared here  
PFNEGLGETCURRENTDISPLAYPROC getCurrentDisplay = NULL;  
^  
make[2]: \*\*\* [VTK/ThirdParty/glew/vtkglew/CMakeFiles/vtkglew.dir/build.make:63: VTK/ThirdParty/glew/vtkglew/CMakeFiles/vtkglew.dir/src/glew.c.o] Error 1  
make[1]: \*\*\* [CMakeFiles/Makefile2:6466: VTK/ThirdParty/glew/vtkglew/CMakeFiles/vtkglew.dir/all] Error 2  
make: \*\*\* [Makefile:152: all] Error 2

Any suggestions on how I could solve this?

Thank you.

---

<div class="post-metadata">

### Author: ![cory.quammen](https://discourse.paraview.org/user_avatar/discourse.paraview.org/cory.quammen/32/11193_2.png) [@cory.quammen](https://discourse.paraview.org/u/cory.quammen)
#### Post date: [June 19, 2019, 2:46pm UTC](https://discourse.paraview.org/t/errors-compiling-paraview-5-6-1-for-offscreen-gpu-rendering/2049/2 "2019-06-19T14:46:31Z")

</div>

Welcome to ParaView, @razoumov.

It looks to me like you are trying to use OSMesa and EGL. You can enable only one of those in a build.

Since you have EGL, I suggest setting `-DVTK_OPENGL_HAS_OSMESA=OFF` instead of on.

---

<div class="post-metadata">

### Author: ![razoumov](https://discourse.paraview.org/user_avatar/discourse.paraview.org/razoumov/32/1589_2.png) [@razoumov](https://discourse.paraview.org/u/razoumov)
#### Post date: [July 9, 2019, 10:05pm UTC](https://discourse.paraview.org/t/errors-compiling-paraview-5-6-1-for-offscreen-gpu-rendering/2049/3 "2019-07-09T22:05:31Z")

</div>

Thank you, Cory – that worked.
