# Cylinder example segv's with VTK-9.1, Mesa-17.3.9, LLVM-6.0.1

**URL:** https://discourse.vtk.org/t/cylinder-example-segvs-with-vtk-9-1-mesa-17-3-9-llvm-6-0-1/7423
**Category:** Support
**Created:** [December 16, 2021, 8:49pm UTC](https://discourse.vtk.org/t/cylinder-example-segvs-with-vtk-9-1-mesa-17-3-9-llvm-6-0-1/7423 "2021-12-16T20:49:40Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![biagas](https://discourse.vtk.org/user_avatar/discourse.vtk.org/biagas/32/7380_2.png) [@biagas](https://discourse.vtk.org/u/biagas)
#### Post date: [December 16, 2021, 8:49pm UTC](https://discourse.vtk.org/t/cylinder-example-segvs-with-vtk-9-1-mesa-17-3-9-llvm-6-0-1/7423/1 "2021-12-16T20:49:40Z")

</div>

On RHEL system, I compiled LLVM (6.0.1) and Mesa (17.3.9) and VTK-9.1.0 (release).  
I compiled the Cylinder example using the source and CMakeLists.txt from  
the [Examples page](https://kitware.github.io/vtk-examples/site/Cxx/GeometricObjects/CylinderExample/)  
When I try to run the Cylinder example I get this error:

```auto
2021-12-16 10:46:34.096 ( 0.130s) [AFF2FDC0]vtkOpenGLRenderWindow.c:499
 ERR| vtkXOpenGLRenderWindow (0x44f960): Unable to find a valid OpenGL 3.2 or later 
implementation. Please update your video card driver to the latest version. If you are using
 Mesa please make sure you have version 11.2 or later and make sure your driver in Mesa
 supports OpenGL 3.2 such as llvmpipe or openswr. If you are on windows and using Microsoft
 remote desktop note that it only supports OpenGL 3.2 with nvidia quadro cards. You can use 
other remoting software such as nomachine to avoid this issue.                    
2021-12-16 10:46:34.096 ( 0.130s) [AFF2FDC0] vtkOpenGLState.cxx:1795 WARN| 
Hardware does not support the number of textures defined.    
...
2021-12-16 10:46:34.103 ( 0.136s) [AFF2FDC0] vtkShaderProgram.cxx:438 ERR| 
vtkShaderProgram (0x766260): 0:1(10): error: GLSL 1.50 is not supported. Supported versions
 are: 1.10, 1.20, 1.00 ES, and 3.00 ES 

```

Output of glxinfo | grep OpenGL:

```auto
OpenGL vendor string: VMware, Inc.
OpenGL renderer string: llvmpipe (LLVM 6.0, 256 bits)
OpenGL core profile version string: 3.3 (Core Profile) Mesa 17.3.9
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 17.3.9
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.0 Mesa 17.3.9
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00
OpenGL ES profile extensions:

```

I cmake-configured VTK-9.1 with these flags:

```auto
-DCMAKE_BUILD_TYPE:STRING=Release 
-DBUILD_SHARED_LIBS:BOOL=ON 
-DVTK_DEBUG_LEAKS:BOOL=false 
-DVTK_LEGACY_REMOVE:BOOL=true 
-DVTK_BUILD_TESTING:BOOL=false 
-DBUILD_TESTING:BOOL=false 
-DVTK_BUILD_DOCUMENTATION:BOOL=false  
-DVTK_FORBID_DOWNLOADS:BOOL=true 
-DVTK_USE_X:BOOL=ON 
-DOPENGL_INCLUDE_DIR:PATH=/path/to/mesa/17.3.9/include 
-DOPENGL_gl_LIBRARY:STRING=/path/to/mesa/17.3.9/lib/libGL.so 
-DOPENGL_opengl_LIBRARY:STRING= 
-DOPENGL_glu_LIBRARY:FILEPATH=/path/to/mesa/17.3.9/lib/libGLU.so 
-DOpenGL_GL_PREFERENCE:STRING=LEGACY 

```

Cylinder example works with VTK-8.1.0 compiled against same versions of LLVM/Mesa.

Is a different Mesa or LLVM version required? The VTK message indicates minimum Mesa version of 11, is that message incorrect?

Or is there something else I am missing that prevents this example from running?

I am setting LD\_LIBRARY\_PATH to point to mesa and llvm prior to running the example.

---

<div class="post-metadata">

### Author: ![amaclean](https://discourse.vtk.org/user_avatar/discourse.vtk.org/amaclean/32/224_2.png) [@amaclean](https://discourse.vtk.org/u/amaclean)
#### Post date: [December 17, 2021, 10:46pm UTC](https://discourse.vtk.org/t/cylinder-example-segvs-with-vtk-9-1-mesa-17-3-9-llvm-6-0-1/7423/2 "2021-12-17T22:46:07Z")

</div>

Works fine for me using Windows, Visual Studio 2020 and Kubuntu with gcc.

This:

> [@biagas](#):
>
> `error: GLSL 1.50 is not supported`

makes me think there is something wrong in your paths since it seems you have `OpenGL ES GLSL ES 3.00`, it is picking up the wrong version.

---

<div class="post-metadata">

### Author: ![biagas](https://discourse.vtk.org/user_avatar/discourse.vtk.org/biagas/32/7380_2.png) [@biagas](https://discourse.vtk.org/u/biagas)
#### Post date: [December 17, 2021, 11:15pm UTC](https://discourse.vtk.org/t/cylinder-example-segvs-with-vtk-9-1-mesa-17-3-9-llvm-6-0-1/7423/3 "2021-12-17T23:15:50Z")

</div>

Thanks, I thought those entries were strange, but didn’t dig further.  
My build of the example was linking with system libOpenGL. I modified the CMakeLists.txt to link with Mesa.  
Rookie mistake, my apologies for the noise. Must be the holidays!
