VTK 9.2.2 build aborts

I’m trying to build 9.2.2 with GCC 4.8.5 where I’m taking all of the defaults except that I select a RELASE build and I set VTK_GUISupportQtQuick to NO. All selections are made with ccmake.

This is what I see:

In file included from /home/user1/Downloads/Vtk/VTK-9.2.2/Common/Core/SMP/Common/vtkSMPToolsAPI.h:26:0,
from /home/user1/Downloads/Vtk/VTK-9.2.2/Common/Core/SMP/Common/vtkSMPToolsAPI.cxx:16:
/home/user1/Downloads/Vtk/VTK-9.2.2/Common/Core/SMP/Common/vtkSMPToolsImpl.h: In constructor \u2018constexpr vtk::detail::smp::vtkSMPToolsImpl<(vtk::detail::smp::BackendType)0>::vtkSMPToolsImpl()\u2019:
/home/user1/Downloads/Vtk/VTK-9.2.2/Common/Core/SMP/Common/vtkSMPToolsImpl.h:58:28: error: use of deleted function \u2018std::atomic::atomic(const std::atomic&)\u2019
class VTKCOMMONCORE_EXPORT vtkSMPToolsImpl
^
In file included from /home/user1/Downloads/Vtk/VTK-9.2.2/Common/Core/vtkObjectBase.h:57:0,
from /home/user1/Downloads/Vtk/VTK-9.2.2/Common/Core/vtkObject.h:45,
from /home/user1/Downloads/Vtk/VTK-9.2.2/Common/Core/SMP/Common/vtkSMPToolsAPI.h:21,
from /home/user1/Downloads/Vtk/VTK-9.2.2/Common/Core/SMP/Common/vtkSMPToolsAPI.cxx:16:
/usr/include/c++/4.8.2/atomic:487:7: error: declared here
atomic(const atomic&) = delete;
^

Any ideas what caused this?

I wonder why it is finding it in this 4.8.2 directory.

Because /usr/include/c++/4.8.5 points (links) to it.

Understood. We’re taking a look at the gcc 4.8.5 build failure.

Okay. Will be happy to try again if there is a solution.

There were two MRs recently to fix 4.8.5 compilation:

I’ll look at getting them into 9.2.3.

Cc: @spyridon97

Has this been fixed in version 9.2.5?

I think so yes.

I tried building version 9.2.5 in release mode with gcc 4.8.5 and once again ran into problems. The following is just a small sample of the messages that appear:


[ 96%] Building CXX object IO/Cesium3DTiles/CMakeFiles/IOCesium3DTiles.dir/TreeInformation.cxx.o
/home/Downloads/Vtk/VTK-9.2.5/IO/Cesium3DTiles/TreeInformation.cxx: In member function ‘void TreeInformation::Compute()’:
/home/Downloads/Vtk/VTK-9.2.5/IO/Cesium3DTiles/TreeInformation.cxx:406:50: warning: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second: [enabled by default]
   if (this->InputType == vtkCesium3DTilesWriter::Mesh)
.
.
.
/home/Downloads/Vtk/VTK-9.2.5/IO/Cesium3DTiles/TreeInformation.cxx:593:49: note:   no known conversion for argument 2 from ‘const RegionCellId’ to ‘RegionCellId&’
In file included from /usr/include/c++/4.8.2/algorithm:62:0,
                 from /home/Downloads/Vtk/VTK-9.2.5/ThirdParty/nlohmannjson/vtknlohmannjson/include/vtknlohmann/json.hpp:37,
                 from /home/Downloads/Vtk/VTK-9.2.5/IO/Cesium3DTiles/TreeInformation.h:29,
                 from /home/Downloads/Vtk/VTK-9.2.5/IO/Cesium3DTiles/TreeInformation.cxx:15:
/usr/include/c++/4.8.2/bits/stl_algo.h:2266:34: error: no match for call to ‘(TreeInformation::ComputeTileMeshTexture(vtkPolyData*, vtkImageData*)::__lambda20) (const RegionCellId&, RegionCellId&)’
    while (__comp(__pivot, *__last))
                                  ^
/home/Downloads/Vtk/VTK-9.2.5/IO/Cesium3DTiles/TreeInformation.cxx:593:6: note: candidates are:
     [](RegionCellId& first, RegionCellId& second) {
      ^
In file included from /usr/include/c++/4.8.2/algorithm:62:0,
                 from /home/Downloads/Vtk/VTK-9.2.5/ThirdParty/nlohmannjson/vtknlohmannjson/include/vtknlohmann/json.hpp:37,
                 from /home/Downloads/Vtk/VTK-9.2.5/IO/Cesium3DTiles/TreeInformation.h:29,
                 from /home/Downloads/Vtk/VTK-9.2.5/IO/Cesium3DTiles/TreeInformation.cxx:15:
/usr/include/c++/4.8.2/bits/stl_algo.h:2266:34: note: bool (*)(RegionCellId&, RegionCellId&) <conversion>
    while (__comp(__pivot, *__last))
                                  ^
/usr/include/c++/4.8.2/bits/stl_algo.h:2266:34: note:   candidate expects 3 arguments, 3 provided
/home/Downloads/Vtk/VTK-9.2.5/IO/Cesium3DTiles/TreeInformation.cxx:593:49: note: TreeInformation::ComputeTileMeshTexture(vtkPolyData*, vtkImageData*)::__lambda20
     [](RegionCellId& first, RegionCellId& second) {
                                                 ^
/home/Downloads/Vtk/VTK-9.2.5/IO/Cesium3DTiles/TreeInformation.cxx:593:49: note:   no known conversion for argument 1 from ‘const RegionCellId’ to ‘RegionCellId&’
gmake[2]: *** [IO/Cesium3DTiles/CMakeFiles/IOCesium3DTiles.dir/TreeInformation.cxx.o] Error 1
gmake[1]: *** [IO/Cesium3DTiles/CMakeFiles/IOCesium3DTiles.dir/all] Error 2
gmake: *** [all] Error 2

Please try release branch

And where would that be? I do to vtk.org, click on downloads, and download what is there. I don’t see anything else except for past releases.

Use git to clone https://gitlab.kitware.com/vtk/vtk/ and checkout the release branch.

I did this. Cloned and checked out the repo. Switched to the release branch. Same result. Does not build as a showed before.

Can you try master branch for completness ?

I’ll give it a go later today.

Okay. Checked out the master branch. It was worse. Didn’t even complete 1% of the build!

master and release should be compatible with GCC 4.8.5

Please open appropriate issues: https://gitlab.kitware.com/vtk/vtk/-/issues

@Yohann_Bearzi @spyridon97