# VTK compilation errors building 5.10.0 and 5.10.1

**URL:** https://discourse.paraview.org/t/vtk-compilation-errors-building-5-10-0-and-5-10-1/9461
**Category:** ParaView Support
**Created:** [April 19, 2022, 10:14am UTC](https://discourse.paraview.org/t/vtk-compilation-errors-building-5-10-0-and-5-10-1/9461 "2022-04-19T10:14:28Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![aerogt3](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/a/3bc359/32.png) [@aerogt3](https://discourse.paraview.org/u/aerogt3)
#### Post date: [April 19, 2022, 10:14am UTC](https://discourse.paraview.org/t/vtk-compilation-errors-building-5-10-0-and-5-10-1/9461/1 "2022-04-19T10:14:28Z")

</div>

I’m building the paraview superbuild, with osmesa, on ubuntu1804. I’ve used the superbuild successfully for paraview versions back to 5.4, but for 5.10 I can’t get it to work.

There are no issues with LLVM, gallium, or osmesa, but I come across the following VTK errors both with 5.10.0 and 5.10.1. Any ideas?

```auto
[15%] Building CXX object VTK/Common/DataModel/CMakeFiles/CommonDataModel.dir/vtkExtractStructuredGridHelper.cxx.o
[15%] Building CXX object VTK/Common/DataModel/CMakeFiles/CommonDataModel.dir/vtkFieldData.cxx.o
[15%] Building CXX object VTK/Common/DataModel/CMakeFiles/CommonDataModel.dir/vtkFindCellStrategy.cxx.o
[15%] Building CXX object VTK/Common/DataModel/CMakeFiles/CommonDataModel.dir/vtkGenericAdaptorCell.cxx.o
[15%] Building CXX object VTK/Common/DataModel/CMakeFiles/CommonDataModel.dir/vtkGenericAttribute.cxx.o
[15%] Building CXX object VTK/Common/DataModel/CMakeFiles/CommonDataModel.dir/vtkGenericAttributeCollection.cxx.o
In file included from /usr/include/c++/7/bits/unique_ptr.h:37:0,
                 from /usr/include/c++/7/bits/locale_conv.h:41,
                 from /usr/include/c++/7/locale:43,
                 from /usr/include/c++/7/iomanip:43,
                 from /data/paraview/sb_5.10.1/superbuild/paraview/src/VTK/Common/Core/vtkIOStream.h:30,
                 from /data/paraview/sb_5.10.1/superbuild/paraview/src/VTK/Common/Core/vtkSystemIncludes.h:39,
                 from /data/paraview/sb_5.10.1/superbuild/paraview/src/VTK/Common/Core/vtkIndent.h:28,
                 from /data/paraview/sb_5.10.1/superbuild/paraview/src/VTK/Common/Core/vtkObjectBase.h:53,
                 from /data/paraview/sb_5.10.1/superbuild/paraview/src/VTK/Common/Core/vtkObject.h:45,
                 from /data/paraview/sb_5.10.1/superbuild/paraview/src/VTK/Common/DataModel/vtkFieldData.h:47,
                 from /data/paraview/sb_5.10.1/superbuild/paraview/src/VTK/Common/DataModel/vtkFieldData.cxx:15:
/usr/include/c++/7/tuple: In instantiation of ‘constexpr std::_Head_base<_Idx, _Head, false>::_Head_base(_UHead&&) [with _UHead = double [2]; long unsigned int _Idx = 2; _Head = double [2]]’:
/usr/include/c++/7/tuple:373:49: required from ‘constexpr std::_Tuple_impl<_Idx, _Head>::_Tuple_impl(std::_Tuple_impl<_Idx, _Head>&&) [with long unsigned int _Idx = 2; _Head = double [2]]’
/usr/include/c++/7/type_traits:1202:12: required from ‘struct std::__is_nt_constructible_impl<std::_Tuple_impl<2, double [2]>, std::_Tuple_impl<2, double [2]>&&>’
/usr/include/c++/7/type_traits:143:12: required from ‘struct std::__and_<std::is_constructible<std::_Tuple_impl<2, double [2]>, std::_Tuple_impl<2, double [2]>&&>, std::__is_nt_constructible_impl<std::_Tuple_impl<2, double [2]>, std::_Tuple_impl<2, double [2]>&&> >’
/usr/include/c++/7/type_traits:1214:12: required from ‘struct std::is_nothrow_constructible<std::_Tuple_impl<2, double [2]>, std::_Tuple_impl<2, double [2]>&&>’
/usr/include/c++/7/type_traits:1245:12: required from ‘struct std::__is_nothrow_move_constructible_impl<std::_Tuple_impl<2, double [2]>, true>’
/usr/include/c++/7/type_traits:1251:12: [skipping 31 instantiation contexts, use -ftemplate-backtrace-limit=0 to disable]
/usr/include/c++/7/bits/move.h:103:12: required from ‘struct std::__move_if_noexcept_cond<std::tuple<long unsigned int, long unsigned int, double [2]> >’
/usr/include/c++/7/bits/stl_iterator.h:1220:26: required by substitution of ‘template<class _Tp, class _ReturnType> _ReturnType std::__make_move_if_noexcept_iterator(_Tp*) [with _Tp = std::tuple<long unsigned int, long unsigned int, double [2]>; _ReturnType = <missing>]’
/usr/include/c++/7/bits/stl_uninitialized.h:311:3: required from ‘_ForwardIterator std::__uninitialized_move_if_noexcept_a(_InputIterator, _InputIterator, _ForwardIterator, _Allocator&) [with _InputIterator = std::tuple<long unsigned int, long unsigned int, double [2]>*; _ForwardIterator = std::tuple<long unsigned int, long unsigned int, double [2]>*; _Allocator = std::allocator<std::tuple<long unsigned int, long unsigned int, double [2]> >]’
/usr/include/c++/7/bits/vector.tcc:578:44: required from ‘void std::vector<_Tp, _Alloc>::_M_default_append(std::vector<_Tp, _Alloc>::size_type) [with _Tp = std::tuple<long unsigned int, long unsigned int, double [2]>; _Alloc = std::allocator<std::tuple<long unsigned int, long unsigned int, double [2]> >; std::vector<_Tp, _Alloc>::size_type = long unsigned int]’
/usr/include/c++/7/bits/stl_vector.h:692:21: required from ‘void std::vector<_Tp, _Alloc>::resize(std::vector<_Tp, _Alloc>::size_type) [with _Tp = std::tuple<long unsigned int, long unsigned int, double [2]>; _Alloc = std::allocator<std::tuple<long unsigned int, long unsigned int, double [2]> >; std::vector<_Tp, _Alloc>::size_type = long unsigned int]’
/data/paraview/sb_5.10.1/superbuild/paraview/src/VTK/Common/DataModel/vtkFieldData.cxx:456:59: required from here
/usr/include/c++/7/tuple:133:42: error: array used as initializer
  : _M_head_impl(std::forward<_UHead>(__h)) { }
                                          ^
[15%] Building CXX object VTK/Common/DataModel/CMakeFiles/CommonDataModel.dir/vtkGenericCell.cxx.o
VTK/Common/DataModel/CMakeFiles/CommonDataModel.dir/build.make:965: recipe for target 'VTK/Common/DataModel/CMakeFiles/CommonDataModel.dir/vtkFieldData.cxx.o' failed
make[5]: *** [VTK/Common/DataModel/CMakeFiles/CommonDataModel.dir/vtkFieldData.cxx.o] Error 1
make[5]: *** Waiting for unfinished jobs....
CMakeFiles/Makefile2:22414: recipe for target 'VTK/Common/DataModel/CMakeFiles/CommonDataModel.dir/all' failed
make[4]: *** [VTK/Common/DataModel/CMakeFiles/CommonDataModel.dir/all] Error 2
Makefile:159: recipe for target 'all' failed
make[3]: *** [all] Error 2

```

---

<div class="post-metadata">

### Author: ![timothee.chabat](https://discourse.paraview.org/user_avatar/discourse.paraview.org/timothee.chabat/32/5729_2.png) [@timothee.chabat](https://discourse.paraview.org/u/timothee.chabat)
#### Post date: [April 19, 2022, 11:58am UTC](https://discourse.paraview.org/t/vtk-compilation-errors-building-5-10-0-and-5-10-1/9461/2 "2022-04-19T11:58:14Z")

</div>

Hey @aerogt3 ,

what is your compiler version ?

---

<div class="post-metadata">

### Author: ![jaswantp](https://discourse.paraview.org/user_avatar/discourse.paraview.org/jaswantp/32/11456_2.png) [@jaswantp](https://discourse.paraview.org/u/jaswantp)
#### Post date: [April 19, 2022, 12:57pm UTC](https://discourse.paraview.org/t/vtk-compilation-errors-building-5-10-0-and-5-10-1/9461/3 "2022-04-19T12:57:28Z")

</div>

Hi @aerogt3

This is a [known issue](https://gitlab.kitware.com/vtk/vtk/-/issues/18515) for VTK with gcc 7. The [fix](https://gitlab.kitware.com/vtk/vtk/-/merge_requests/9075) is merged in VTK-master branch.

Your best bet is to try a newer compiler or wait till ParaView is updated with the fix from VTK.

---

<div class="post-metadata">

### Author: ![aerogt3](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/a/3bc359/32.png) [@aerogt3](https://discourse.paraview.org/u/aerogt3)
#### Post date: [April 19, 2022, 1:12pm UTC](https://discourse.paraview.org/t/vtk-compilation-errors-building-5-10-0-and-5-10-1/9461/4 "2022-04-19T13:12:16Z")

</div>

Thanks for the replies! So should I go with gcc \> 7.5? Or lower?

Alternatively, how would I get this VTK fix with the superbuild?

---

<div class="post-metadata">

### Author: ![jaswantp](https://discourse.paraview.org/user_avatar/discourse.paraview.org/jaswantp/32/11456_2.png) [@jaswantp](https://discourse.paraview.org/u/jaswantp)
#### Post date: [April 19, 2022, 1:51pm UTC](https://discourse.paraview.org/t/vtk-compilation-errors-building-5-10-0-and-5-10-1/9461/5 "2022-04-19T13:51:46Z")

</div>

Please try gcc 9.

---

<div class="post-metadata">

### Author: ![aerogt3](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/a/3bc359/32.png) [@aerogt3](https://discourse.paraview.org/u/aerogt3)
#### Post date: [April 19, 2022, 5:08pm UTC](https://discourse.paraview.org/t/vtk-compilation-errors-building-5-10-0-and-5-10-1/9461/6 "2022-04-19T17:08:39Z")

</div>

gcc 9 worked, thanks! For anyone who reads this thread in the future: gcc 8.4 did not work.
