# How to build ParaView distribution package with some VTK modules enabled by default

**URL:** https://discourse.paraview.org/t/how-to-build-paraview-distribution-package-with-some-vtk-modules-enabled-by-default/2558
**Category:** ParaView Support
**Created:** [September 13, 2019, 8:03pm UTC](https://discourse.paraview.org/t/how-to-build-paraview-distribution-package-with-some-vtk-modules-enabled-by-default/2558 "2019-09-13T20:03:57Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![Tarun\_Choudhary](https://discourse.paraview.org/user_avatar/discourse.paraview.org/tarun_choudhary/32/2030_2.png) [@Tarun\_Choudhary](https://discourse.paraview.org/u/Tarun_Choudhary)
#### Post date: [September 13, 2019, 8:03pm UTC](https://discourse.paraview.org/t/how-to-build-paraview-distribution-package-with-some-vtk-modules-enabled-by-default/2558/1 "2019-09-13T20:03:57Z")

</div>

Dear ParaView Experts,

I want to build a distribution package of ParaView in Linux for which some VTK modules (listed below) would be enabled because my custom ParaView-plugin depends on these modules.

```
Module_vtkImagingStencil
Module_vtkImagingStatistics
Module_vtkInfovisBoost
Module_vtkInfovisBoostGraphAlgorithms
Module_vtkInfovisLayout

```

I tried to build ParaView-5.6.0 in Ubuntu-14.04 which depends on above modules and my plugin works fine on my Ubuntu-14.04.  
Now when I want to use the same ParaView built package with above VTK modules enabled in Centos-7 linux, ParaView does not run and it gives error message that libOpenGL.so could not be found and some times it says core dump or segmentation fault error.

I want to know what is the best way to build ParaView on Ubuntu-14.04 with above modules enabled which works for other Linux OS (Centos 7, etc.).

Currently, I am building ParaView from superbuild with below options enabled.  
ENABLE\_boost  
ENABLE\_cxx11 (default)  
ENABLE\_mesa  
ENABLE\_mpi  
ENABLE\_numpy  
ENABLE\_ospray  
ENABLE\_paraview  
ENABLE\_python  
ENABLE\_qt5

Any advice or suggestion would be much appreciated and would be a great help.

Kind Regards,  
Tarun

---

<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: [September 16, 2019, 2:35am UTC](https://discourse.paraview.org/t/how-to-build-paraview-distribution-package-with-some-vtk-modules-enabled-by-default/2558/2 "2019-09-16T02:35:23Z")

</div>

Currently, this requires to patch ParaView sources. See here for more info :  
[https://gitlab.kitware.com/paraview/paraview/issues/19320](https://gitlab.kitware.com/paraview/paraview/issues/19320)

---

<div class="post-metadata">

### Author: ![aron.helser](https://discourse.paraview.org/user_avatar/discourse.paraview.org/aron.helser/32/13_2.png) [@aron.helser](https://discourse.paraview.org/u/aron.helser)
#### Post date: [September 16, 2019, 1:19pm UTC](https://discourse.paraview.org/t/how-to-build-paraview-distribution-package-with-some-vtk-modules-enabled-by-default/2558/3 "2019-09-16T13:19:31Z")

</div>

Tarun,  
I’m not sure your crash on CentOS is related to the extra modules you want to enable. Can you run unmodified ParaView 5.6, downloaded as a binary, on that PC? It could be that it does not have enough OpenGL support to run ParaView, which requires OpenGL 3+ support by the graphics driver.

Regards,

Aron

---

<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: [September 17, 2019, 5:44am UTC](https://discourse.paraview.org/t/how-to-build-paraview-distribution-package-with-some-vtk-modules-enabled-by-default/2558/4 "2019-09-17T05:44:22Z")

</div>

Thanks @aron.helser , I should have read that more carefuly.

---

<div class="post-metadata">

### Author: ![Tarun\_Choudhary](https://discourse.paraview.org/user_avatar/discourse.paraview.org/tarun_choudhary/32/2030_2.png) [@Tarun\_Choudhary](https://discourse.paraview.org/u/Tarun_Choudhary)
#### Post date: [September 17, 2019, 7:10pm UTC](https://discourse.paraview.org/t/how-to-build-paraview-distribution-package-with-some-vtk-modules-enabled-by-default/2558/5 "2019-09-17T19:10:48Z")

</div>

Thanks for your reply Aron. Yes, the downloaded unmodified ParaView-5.6 binary works fine on both Centos and Ubuntu linux. The issue is the ParaView-5.6 with enabled VTK modules is compiled in Centos7 and this compiled package is run on Ubuntu linux. The the package compiled in Centos7 does not run in Ubuntu linux and says libOpenGL.so is missing.

---

<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: [September 18, 2019, 1:39am UTC](https://discourse.paraview.org/t/how-to-build-paraview-distribution-package-with-some-vtk-modules-enabled-by-default/2558/6 "2019-09-18T01:39:01Z")

</div>

You need to install libglvnd  
`apt-get install libglvnd`

---

<div class="post-metadata">

### Author: ![Tarun\_Choudhary](https://discourse.paraview.org/user_avatar/discourse.paraview.org/tarun_choudhary/32/2030_2.png) [@Tarun\_Choudhary](https://discourse.paraview.org/u/Tarun_Choudhary)
#### Post date: [September 18, 2019, 4:03pm UTC](https://discourse.paraview.org/t/how-to-build-paraview-distribution-package-with-some-vtk-modules-enabled-by-default/2558/7 "2019-09-18T16:03:08Z")

</div>

Thanks for your reply Mathieu. I installed libglvnd in ubuntu and tried to run paraview.  
Now it gives below error message:

“Fontconfig warning: “/etc/fonts/fonts.conf”, line 146: blank doesn’t take any effect anymore. please remove it from your fonts.conf  
Aborted (core dumped)”

---

<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: [September 19, 2019, 2:24am UTC](https://discourse.paraview.org/t/how-to-build-paraview-distribution-package-with-some-vtk-modules-enabled-by-default/2558/8 "2019-09-19T02:24:37Z")

</div>

The warning is unrelated.

Looks like you have the same issue as this :

> [@Paraview binaries fail to start on CentOS 7.5.1804](https://discourse.paraview.org/t/paraview-binaries-fail-to-start-on-centos-7-5-1804/2487):
>
> Hi, I have installed the ParaView 5.6.2 binaries on our universities HPC cluster. But when trying to start paraview, it only prints out a warning about a fontconfig issue and then abort. The warning does not seem to be related to the crash. [sfux@lo-login-02 ~]$ module load paraview [sfux@lo-login-02 ~]$ paraview Fontconfig warning: "/etc/fonts/fonts.conf", line 146: blank doesn't take any effect anymore. please remove it from your fonts.conf Aborted [sfux@lo-login-02 ~]$ How can such a prob…

Do you have the same problem with ParaView 5.7 ?  
It would be very nice of you to help us debug this issue. Could you build ParaView in debug and generate a backtrace ?

---

<div class="post-metadata">

### Author: ![Tarun\_Choudhary](https://discourse.paraview.org/user_avatar/discourse.paraview.org/tarun_choudhary/32/2030_2.png) [@Tarun\_Choudhary](https://discourse.paraview.org/u/Tarun_Choudhary)
#### Post date: [September 20, 2019, 7:06pm UTC](https://discourse.paraview.org/t/how-to-build-paraview-distribution-package-with-some-vtk-modules-enabled-by-default/2558/9 "2019-09-20T19:06:03Z")

</div>

Below is the GDB backtrace information:

```
(gdb) run
Starting program: /home/tarun/Documents/wip/TransferToViper/ParaView-5.6.0-MPI-OpenGL-VTK-Linux-64bit-UoH/bin/paraview 
process 15197 is executing new program: /home/tarun/Documents/wip/TransferToViper/ParaView-5.6.0-MPI-OpenGL-VTK-Linux-64bit-UoH/lib/paraview
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffc2790700 (LWP 15204)]
Fontconfig warning: "/etc/fonts/fonts.conf", line 146: blank doesn't take any effect anymore. please remove it from your fonts.conf

Program received signal SIGABRT, Aborted.
0x00007fffdb1cec37 in __GI_raise (sig=sig@entry=6)
    at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56	../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.

(gdb) backtrace 
#0 0x00007fffdb1cec37 in __GI_raise (sig=sig@entry=6)
    at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1 0x00007fffdb1d2028 in __GI_abort () at abort.c:89
#2 0x00007fffeaf7bc6a in vtkXOpenGLRenderWindow::CreateAWindow (
    this=0x3087190)
    at /home/u602026/VoxFE/ParaViewPackage2/paraview_build/superbuild/paraview/src/VTK/Rendering/OpenGL2/vtkXOpenGLRenderWindow.cxx:468
#3 0x00007fffeaec68a4 in vtkOpenGLRenderWindow::CreateHardwareOffScreenWindow
    (this=0x3087190, width=300, height=300)
    at /home/u602026/VoxFE/ParaViewPackage2/paraview_build/superbuild/paraview/src/VTK/Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx:1983
#4 0x00007fffeaf7d148 in vtkXOpenGLRenderWindow::CreateOffScreenWindow (
    this=0x3087190, width=300, height=300)
    at /home/u602026/VoxFE/ParaViewPackage2/paraview_build/superbuild/paraview/src/VTK/Rendering/OpenGL2/vtkXOpenGLRenderWindow.cxx:794
#5 0x00007fffeaf7d594 in vtkXOpenGLRenderWindow::Initialize (this=0x3087190)
    at /home/u602026/VoxFE/ParaViewPackage2/paraview_build/superbuild/paraview/src/VTK/Rendering/OpenGL2/vtkXOpenGLRenderWindow.cxx:871
#6 0x00007fffeaec7e65 in vtkOpenGLRenderWindow::SupportsOpenGL (
    this=0x3085660)
    at /home/u602026/VoxFE/ParaViewPackage2/paraview_build/superbuild/paraview/src/VTK/Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx:2427
#7 0x00007ffff2b76ef3 in vtkPVRenderingCapabilitiesInformation::GetLocalCapabil---Type <return> to continue, or q <return> to quit---
ities ()
    at /home/u602026/VoxFE/ParaViewPackage2/paraview_build/superbuild/paraview/src/ParaViewCore/ClientServerCore/Rendering/vtkPVRenderingCapabilitiesInformation.cxx:126
#8 0x00007ffff2b77027 in vtkPVRenderingCapabilitiesInformation::CopyFromObject
    (this=0x3083f00)
    at /home/u602026/VoxFE/ParaViewPackage2/paraview_build/superbuild/paraview/src/ParaViewCore/ClientServerCore/Rendering/vtkPVRenderingCapabilitiesInformation.cxx:178
#9 0x00007ffff17054ca in vtkPVSessionCore::GatherInformationInternal (
    this=0xc9da80, information=0x3083f00, globalid=0)
    at /home/u602026/VoxFE/ParaViewPackage2/paraview_build/superbuild/paraview/src/ParaViewCore/ServerImplementation/Core/vtkPVSessionCore.cxx:783
#10 0x00007ffff17057bd in vtkPVSessionCore::GatherInformation (this=0xc9da80, 
    location=4, information=0x3083f00, globalid=0)
    at /home/u602026/VoxFE/ParaViewPackage2/paraview_build/superbuild/paraview/src/ParaViewCore/ServerImplementation/Core/vtkPVSessionCore.cxx:821
#11 0x00007ffff1701078 in vtkPVSessionBase::GatherInformation (this=0xc9e680, 
    location=4, information=0x3083f00, globalid=0)
    at /home/u602026/VoxFE/ParaViewPackage2/paraview_build/superbuild/paraview/src/ParaViewCore/ServerImplementation/Core/vtkPVSessionBase.cxx:243
#12 0x00007ffff79ce790 in pqDefaultViewBehavior::onServerCreation (
    this=0xc9a290, server=0xe79880)
---Type <return> to continue, or q <return> to quit---
    at /home/u602026/VoxFE/ParaViewPackage2/paraview_build/superbuild/paraview/src/Qt/ApplicationComponents/pqDefaultViewBehavior.cxx:131
#13 0x00007ffff7a8cb64 in pqDefaultViewBehavior::qt_static_metacall (
    _o=0xc9a290, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x7fffffffcd60)
    at /home/u602026/VoxFE/ParaViewPackage2/paraview_build/superbuild/paraview/build/Qt/ApplicationComponents/moc_pqDefaultViewBehavior.cpp:83
#14 0x00007ffff3c3b786 in QMetaObject::activate(QObject*, int, int, void**) ()
   from /home/tarun/Documents/wip/TransferToViper/ParaView-5.6.0-MPI-OpenGL-VTK-Linux-64bit-UoH/lib/libQt5Core.so.5
#15 0x00007ffff6a6a8c7 in pqServerManagerModel::serverAdded (this=0x7d6190, 
    _t1=0xe79880)
    at /home/u602026/VoxFE/ParaViewPackage2/paraview_build/superbuild/paraview/build/Qt/Core/moc_pqServerManagerModel.cpp:566
#16 0x00007ffff6a32634 in pqServerManagerModel::onConnectionCreated (
    this=0x7d6190, id=1)
    at /home/u602026/VoxFE/ParaViewPackage2/paraview_build/superbuild/paraview/src/Qt/Core/pqServerManagerModel.cxx:503
#17 0x00007ffff6a69ec5 in pqServerManagerModel::qt_static_metacall (
    _o=0x7d6190, _c=QMetaObject::InvokeMetaMethod, _id=36, _a=0x7fffffffcfa0)
    at /home/u602026/VoxFE/ParaViewPackage2/paraview_build/superbuild/paraview/build/Qt/Core/moc_pqServerManagerModel.cpp:270
#18 0x00007ffff3c3b786 in QMetaObject::activate(QObject*, int, int, void**) ()
   from /home/tarun/Documents/wip/TransferToViper/ParaView-5.6.0-MPI-OpenGL-VTK----Type <return> to continue, or q <return> to quit---
Linux-64bit-UoH/lib/libQt5Core.so.5
#19 0x00007ffff6a6bc37 in pqServerManagerObserver::connectionCreated (
    this=0x7d3f40, _t1=1)
    at /home/u602026/VoxFE/ParaViewPackage2/paraview_build/superbuild/paraview/build/Qt/Core/moc_pqServerManagerObserver.cpp:280
#20 0x00007ffff6a361be in pqServerManagerObserver::connectionCreated (
    this=0x7d3f40, callData=0x7d20a0)
    at /home/u602026/VoxFE/ParaViewPackage2/paraview_build/superbuild/paraview/src/Qt/Core/pqServerManagerObserver.cxx:110
#21 0x00007ffff6a6b644 in pqServerManagerObserver::qt_static_metacall (
    _o=0x7d3f40, _c=QMetaObject::InvokeMetaMethod, _id=10, _a=0x7fffffffd1e0)
    at /home/u602026/VoxFE/ParaViewPackage2/paraview_build/superbuild/paraview/build/Qt/Core/moc_pqServerManagerObserver.cpp:144
#22 0x00007ffff3c3b786 in QMetaObject::activate(QObject*, int, int, void**) ()
   from /home/tarun/Documents/wip/TransferToViper/ParaView-5.6.0-MPI-OpenGL-VTK-Linux-64bit-UoH/lib/libQt5Core.so.5
#23 0x00007ffff377e415 in vtkQtConnection::EmitExecute (this=0x7eab30, _t1=
    0x7d2060, _t2=68, _t3=0x0, _t4=0x7d20a0, _t5=0x7cb4c0)
    at /home/u602026/VoxFE/ParaViewPackage2/paraview_build/superbuild/paraview/build/VTK/GUISupport/Qt/moc_vtkQtConnection.cpp:141
#24 0x00007ffff3766998 in vtkQtConnection::Execute (this=0x7eab30, 
    caller=0x7d2060, e=68, call_data=0x7d20a0)
    at /home/u602026/VoxFE/ParaViewPackage2/paraview_build/superbuild/paraview/s---Type <return> to continue, or q <return> to quit---
rc/VTK/GUISupport/Qt/vtkQtConnection.cxx:72
#25 0x00007ffff3766938 in vtkQtConnection::DoCallback (vtk_obj=0x7d2060, 
    event=68, client_data=0x7eab30, call_data=0x7d20a0)
    at /home/u602026/VoxFE/ParaViewPackage2/paraview_build/superbuild/paraview/src/VTK/GUISupport/Qt/vtkQtConnection.cxx:62
#26 0x00007fffdc7a504b in vtkCallbackCommand::Execute (this=0x7cb4c0, 
    caller=0x7d2060, event=68, callData=0x7d20a0)
    at /home/u602026/VoxFE/ParaViewPackage2/paraview_build/superbuild/paraview/src/VTK/Common/Core/vtkCallbackCommand.cxx:42
#27 0x00007fffdca58e8e in vtkSubjectHelper::InvokeEvent (this=0x7d5460, 
    event=68, callData=0x7d20a0, self=0x7d2060)
    at /home/u602026/VoxFE/ParaViewPackage2/paraview_build/superbuild/paraview/src/VTK/Common/Core/vtkObject.cxx:616
#28 0x00007fffdca59395 in vtkObject::InvokeEvent (this=0x7d2060, event=68, 
    callData=0x7d20a0)
    at /home/u602026/VoxFE/ParaViewPackage2/paraview_build/superbuild/paraview/src/VTK/Common/Core/vtkObject.cxx:785
#29 0x00007ffff1374cac in vtkProcessModule::RegisterSession (this=0x7d2060, 
    session=0xc9e680)
    at /home/u602026/VoxFE/ParaViewPackage2/paraview_build/superbuild/paraview/src/ParaViewCore/ClientServerCore/Core/vtkProcessModule.cxx:387
#30 0x00007ffff1c2404b in vtkSMSession::ConnectToSelf (timeout=60)
    at /home/u602026/VoxFE/ParaViewPackage2/paraview_build/superbuild/paraview/s---Type <return> to continue, or q <return> to quit---
rc/ParaViewCore/ServerManager/Core/vtkSMSession.cxx:311
#31 0x00007ffff69f0f3c in pqObjectBuilder::createServer (this=0x7d3e20, 
    resource=..., connectionTimeout=60)
    at /home/u602026/VoxFE/ParaViewPackage2/paraview_build/superbuild/paraview/src/Qt/Core/pqObjectBuilder.cxx:671
#32 0x00007ffff796ed69 in pqAlwaysConnectedBehavior::serverCheck (this=
    0xc9bb50)
    at /home/u602026/VoxFE/ParaViewPackage2/paraview_build/superbuild/paraview/src/Qt/ApplicationComponents/pqAlwaysConnectedBehavior.cxx:81
#33 0x00007ffff796ebe4 in pqAlwaysConnectedBehavior::pqAlwaysConnectedBehavior
    (this=0xc9bb50, parentObject=0xc98670)
    at /home/u602026/VoxFE/ParaViewPackage2/paraview_build/superbuild/paraview/src/Qt/ApplicationComponents/pqAlwaysConnectedBehavior.cxx:52
#34 0x00007ffff7a02880 in pqParaViewBehaviors::pqParaViewBehaviors (this=
    0xc98670, mainWindow=0x806c20, parentObject=0x806c20)
    at /home/u602026/VoxFE/ParaViewPackage2/paraview_build/superbuild/paraview/src/Qt/ApplicationComponents/pqParaViewBehaviors.cxx:221
#35 0x0000000000412faa in ParaViewMainWindow::ParaViewMainWindow (this=
    0x806c20)
    at /home/u602026/VoxFE/ParaViewPackage2/paraview_build/superbuild/paraview/src/Applications/ParaView/ParaViewMainWindow.cxx:295
#36 0x0000000000410a41 in pqparaviewInitializer::Initialize (
    this=0x7fffffffdcb0, argc=1, argv=0x7fffffffde18)
---Type <return> to continue, or q <return> to quit---
    at /home/u602026/VoxFE/ParaViewPackage2/paraview_build/superbuild/paraview/build/Applications/ParaView/pqparaviewInitializer.cxx:124
#37 0x000000000041040e in main (argc=1, argv=0x7fffffffde18)
    at /home/u602026/VoxFE/ParaViewPackage2/paraview_build/superbuild/paraview/build/Applications/ParaView/paraview_main.cxx:113
(gdb)
```

---

<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: [September 30, 2019, 5:24am UTC](https://discourse.paraview.org/t/how-to-build-paraview-distribution-package-with-some-vtk-modules-enabled-by-default/2558/10 "2019-09-30T05:24:34Z")

</div>

Here is the failing code which actually fails to raise the error correctly.

```
  // get the default display connection
  if (!this->DisplayId)
  {
    this->DisplayId = XOpenDisplay(static_cast<char *>(nullptr));
    if (this->DisplayId == nullptr)
    {   
      vtkErrorMacro(<< "bad X server connection. DISPLAY="
        << vtksys::SystemTools::GetEnv("DISPLAY") << ". Aborting.\n");
      abort();
    }   
    this->OwnDisplay = 1;
  }

```

What is the output of `xrandr` from a terminal ?

---

<div class="post-metadata">

### Author: ![Tarun\_Choudhary](https://discourse.paraview.org/user_avatar/discourse.paraview.org/tarun_choudhary/32/2030_2.png) [@Tarun\_Choudhary](https://discourse.paraview.org/u/Tarun_Choudhary)
#### Post date: [September 30, 2019, 6:09pm UTC](https://discourse.paraview.org/t/how-to-build-paraview-distribution-package-with-some-vtk-modules-enabled-by-default/2558/11 "2019-09-30T18:09:15Z")

</div>

Here is the output of xrandr command -

$ xrandr  
Screen 0: minimum 8 x 8, current 1366 x 768, maximum 32767 x 32767  
LVDS1 connected primary 1366x768+0+0 (normal left inverted right x axis y axis) 344mm x 194mm  
1366x768 60.0\*+  
1360x768 59.8 60.0  
1024x768 60.0  
800x600 60.3 56.2  
640x480 59.9  
VGA1 disconnected (normal left inverted right x axis y axis)  
HDMI1 disconnected (normal left inverted right x axis y axis)  
DP1 disconnected (normal left inverted right x axis y axis)  
VIRTUAL1 disconnected (normal left inverted right x axis y axis)

---

<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: [October 1, 2019, 1:50am UTC](https://discourse.paraview.org/t/how-to-build-paraview-distribution-package-with-some-vtk-modules-enabled-by-default/2558/12 "2019-10-01T01:50:55Z")

</div>

What is the output of :  
`echo $DISPLAY`

and `glxinfo`
