# cannot render when using the osmesa build

**URL:** https://discourse.paraview.org/t/cannot-render-when-using-the-osmesa-build/7830
**Category:** ParaView Support
**Created:** [August 17, 2021, 2:09pm UTC](https://discourse.paraview.org/t/cannot-render-when-using-the-osmesa-build/7830 "2021-08-17T14:09:37Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![pcrepier](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/p/f4b2a3/32.png) [@pcrepier](https://discourse.paraview.org/u/pcrepier)
#### Post date: [August 17, 2021, 2:09pm UTC](https://discourse.paraview.org/t/cannot-render-when-using-the-osmesa-build/7830/1 "2021-08-17T14:09:37Z")

</div>

Hello everyone,

I use a set of scripts to export a standard set of pictures for specific simulation types. The scripts run just fine and produce the expected pictures, which is as intended (so great job on that to devs!)

The number of simulations has recently increased, so I tought I would try to include the post-processing inside the job running on our cluster by using the osmesa build available from the downloads page.

Unfortunately, that did not give the expected result. It produces a SIGSEGV when the script creates a new render view, with the message

```auto
[pvbatch]vtkOpenGLRenderWindow.c:458 ERR| vtkOSOpenGLRenderWindow (0x16807780): GLEW could not be initialized: Missing GL version

```

I tried on a compute node (so no x server I guess), but also on another node with a x server present, where the regular paraview version works.

Not sure what I am missing. I thought the osmesa build was supposed to be made for such cases ?

Can anyone give a clue to what I am doing wrong ?

Thanks.

---

<div class="post-metadata">

### Author: ![pcrepier](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/p/f4b2a3/32.png) [@pcrepier](https://discourse.paraview.org/u/pcrepier)
#### Post date: [August 23, 2021, 6:53am UTC](https://discourse.paraview.org/t/cannot-render-when-using-the-osmesa-build/7830/2 "2021-08-23T06:53:11Z")

</div>

Is there a subtility about the osmesa build that I am missing that could help fix this issue ?

Thanks.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [August 23, 2021, 7:14am UTC](https://discourse.paraview.org/t/cannot-render-when-using-the-osmesa-build/7830/3 "2021-08-23T07:14:07Z")

</div>

I just tried ParaView 5.9.1 osmesa binary release without X server and it is working great.

Please share how you run it ?

---

<div class="post-metadata">

### Author: ![pcrepier](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/p/f4b2a3/32.png) [@pcrepier](https://discourse.paraview.org/u/pcrepier)
#### Post date: [August 23, 2021, 7:26am UTC](https://discourse.paraview.org/t/cannot-render-when-using-the-osmesa-build/7830/4 "2021-08-23T07:26:29Z")

</div>

I am not really doing anything special:

1. Download osmesa build.
2. Unzip on the cluster I use.
3. run the pvbatch binary from the bin folder with my python script.

I do not know if it is of interest, but here is the the output of ldd:

```auto
ldd /cm/shared/apps/paraview/5.9.0-osmesa/bin/pvbatch
	linux-vdso.so.1 (0x0000155555551000)
	/usr/NX/scripts/vgl/libdlfaker.so (0x0000155555129000)
	/usr/NX/scripts/vgl/libvglfaker.so (0x0000155554db3000)
	libvtksys-pv5.9.so.1 => /cm/shared/apps/paraview/5.9.0-osmesa/bin/../lib/libvtksys-pv5.9.so.1 (0x0000155554b58000)
	libdl.so.2 => /lib64/libdl.so.2 (0x0000155554954000)
	libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00001555545bf000)
	libm.so.6 => /lib64/libm.so.6 (0x000015555423d000)
	libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x0000155554025000)
	libc.so.6 => /lib64/libc.so.6 (0x0000155553c63000)
	libGL.so.1 => /lib64/libGL.so.1 (0x00001555539d0000)
	libX11.so.6 => /lib64/libX11.so.6 (0x000015555368c000)
	libXext.so.6 => /lib64/libXext.so.6 (0x0000155553479000)
	libpthread.so.0 => /lib64/libpthread.so.0 (0x0000155553259000)
	/lib64/ld-linux-x86-64.so.2 (0x000015555532b000)
	libGLX.so.0 => /lib64/libGLX.so.0 (0x0000155553027000)
	libGLdispatch.so.0 => /lib64/libGLdispatch.so.0 (0x0000155552d6b000)
	libxcb.so.1 => /lib64/libxcb.so.1 (0x0000155552b42000)
	libXau.so.6 => /lib64/libXau.so.6 (0x000015555293e000)

```

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [August 23, 2021, 7:30am UTC](https://discourse.paraview.org/t/cannot-render-when-using-the-osmesa-build/7830/5 "2021-08-23T07:30:25Z")

</div>

Definitely not the right binary:

```auto
[glow@arch ~/work/paraview/others/ParaView-5.9.1-osmesa-MPI-Linux-Python3.8-64bit/bin]$ ldd pvbatch
        linux-vdso.so.1 (0x00007fff0f927000)
        libvtksys-pv5.9.so.1 => /home/glow/work/paraview/others/ParaView-5.9.1-osmesa-MPI-Linux-Python3.8-64bit/bin/./../lib/libvtksys-pv5.9.so.1 (0x00007f343ba0b000)
        libdl.so.2 => /usr/lib/libdl.so.2 (0x00007f343b9e5000)
        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f343b7cf000)
        libm.so.6 => /usr/lib/libm.so.6 (0x00007f343b68b000)
        libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f343b670000)
        libc.so.6 => /usr/lib/libc.so.6 (0x00007f343b4a4000)
        /lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007f343bc68000)

[glow@arch ~/work/paraview/others/ParaView-5.9.0-osmesa-MPI-Linux-Python3.8-64bit/bin]$ ldd pvbatch
        linux-vdso.so.1 (0x00007ffdc373a000)
        libvtksys-pv5.9.so.1 => /home/glow/work/paraview/others/ParaView-5.9.0-osmesa-MPI-Linux-Python3.8-64bit/bin/./../lib/libvtksys-pv5.9.so.1 (0x00007f6b163f3000)
        libdl.so.2 => /usr/lib/libdl.so.2 (0x00007f6b163cd000)
        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f6b161b7000)
        libm.so.6 => /usr/lib/libm.so.6 (0x00007f6b16073000)
        libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f6b16058000)
        libc.so.6 => /usr/lib/libc.so.6 (0x00007f6b15e8c000)
        /lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007f6b16650000)

```

Did you download it from the headless section here:  
[https://www.paraview.org/download/](https://www.paraview.org/download/)

---

<div class="post-metadata">

### Author: ![pcrepier](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/p/f4b2a3/32.png) [@pcrepier](https://discourse.paraview.org/u/pcrepier)
#### Post date: [August 23, 2021, 7:38am UTC](https://discourse.paraview.org/t/cannot-render-when-using-the-osmesa-build/7830/6 "2021-08-23T07:38:54Z")

</div>

That’s supposed to be the case.

I just checked the md5sum so the archive I used:

```auto
md5sum ParaView-5.9.0-osmesa-MPI-Linux-Python3.8-64bit.tar.gz 
6a9cb14c0ef33f21468e85fb5141052b ParaView-5.9.0-osmesa-MPI-Linux-Python3.8-64bit.tar.gz

```

that’s the same as the one available from the downloads:

```auto
md5sum ParaView-5.9.0-osmesa-MPI-Linux-Python3.8-64bit.tar.gz 
6a9cb14c0ef33f21468e85fb5141052b ParaView-5.9.0-osmesa-MPI-Linux-Python3.8-64bit.tar.gz

```

The output I copied came from a machine with an xserver installed. could it be that that’s the cause of the different ldd output ?

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [August 23, 2021, 7:41am UTC](https://discourse.paraview.org/t/cannot-render-when-using-the-osmesa-build/7830/7 "2021-08-23T07:41:43Z")

</div>

Can you try downloading and extracting again ?

I’ve also have a Xorg server running when running ldd.

---

<div class="post-metadata">

### Author: ![pcrepier](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/p/f4b2a3/32.png) [@pcrepier](https://discourse.paraview.org/u/pcrepier)
#### Post date: [August 23, 2021, 8:21am UTC](https://discourse.paraview.org/t/cannot-render-when-using-the-osmesa-build/7830/8 "2021-08-23T08:21:48Z")

</div>

I’ve re-downloaded 5.9.0 and 5.9.1. Checked the md5sums, extracted all, but the ldd still shows the same libraries. I do not know why.

the md5sums of pvbatch itself:  
5.9.0

```auto
9049f5f9582801cf59d613ecc1239605 pvbatch

```

5.9.1

```auto
a04ddd2e879db2645e625d944db1ef33 pvbatch

```

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [August 23, 2021, 9:10am UTC](https://discourse.paraview.org/t/cannot-render-when-using-the-osmesa-build/7830/9 "2021-08-23T09:10:07Z")

</div>

I have the same md5sum, checked on another computer and I have the same ldd output. No idea what is happening. Please try on anothere computer.

---

<div class="post-metadata">

### Author: ![pcrepier](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/p/f4b2a3/32.png) [@pcrepier](https://discourse.paraview.org/u/pcrepier)
#### Post date: [August 24, 2021, 7:00am UTC](https://discourse.paraview.org/t/cannot-render-when-using-the-osmesa-build/7830/10 "2021-08-24T07:00:30Z")

</div>

I tried again a couple things this morning to get this to work and succeeded!

VirtualGL is used on our cluster to accelerate 3D rendering.  
Two librairies

```auto
/usr/NX/scripts/vgl/libdlfaker.so
/usr/NX/scripts/vgl/libvglfaker.so

```

are explicitely given declared in the LD\_PRELOAD variables.  
by using

```auto
unset LD_PRELOAD

```

before starting pvbatch, that fixed the ldd output, and the binary too!  
so fixed!

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [August 24, 2021, 8:09am UTC](https://discourse.paraview.org/t/cannot-render-when-using-the-osmesa-build/7830/11 "2021-08-24T08:09:25Z")

</div>

> [@pcrepier](#):
>
> LD\_PRELOAD

Right, I should have though of it.
