ParaView installation crashes at 92% due to errors (=Fehler) originating from "class QHeaderView"

I tried to install ParaView-5.4.0 using the OpenFoam ThirdParty package of OpenFOAM 6, on Solus Linux. The installed Qt version is 5.11.1-26. I first reported the bug at OpenFOAM, and was asked to report the bug here as it’s ParaView & Qt version related. The latter is rather likely, as I installed the same version successfully some time ago when an earlier version of Qt was installed.

Error messages are (Fehler = Error):

[ 92%] Building CXX object Qt/Components/CMakeFiles/pqComponents.dir/pqCommandPropertyWidget.cxx.o
/home/klaus/OpenFOAM/ThirdParty-6/ParaView-5.4.0/Qt/Components/pqChangeInputDialog.cxx: In Konstruktor »pqChangeInputDialog::pqChangeInputDialog(vtkSMProxy*, QWidget*)«:
/home/klaus/OpenFOAM/ThirdParty-6/ParaView-5.4.0/Qt/Components/pqChangeInputDialog.cxx:81:45: Fehler: falsche Verwendung des unvollständigen Typs »class QHeaderView«
this->Internals->pipelineView->getHeader()->hide();
^~
In file included from /home/klaus/OpenFOAM/ThirdParty-6/build/linux64Gcc/ParaView-5.4.0/Qt/Components/ui_pqChangeInputDialog.h:20:0,
from /home/klaus/OpenFOAM/ThirdParty-6/ParaView-5.4.0/Qt/Components/pqChangeInputDialog.cxx:33:
/home/klaus/OpenFOAM/ThirdParty-6/ParaView-5.4.0/Qt/Widgets/pqFlatTreeView.h:53:7: Anmerkung: Vorwärtsdeklaration von »class QHeaderView«
class QHeaderView;
^~~~~~~~~~~
/home/klaus/OpenFOAM/ThirdParty-6/ParaView-5.4.0/Qt/Components/pqChangeInputDialog.cxx:81:47: Fehler: falsche Verwendung des unvollständigen Typs »class QHeaderView«
this->Internals->pipelineView->getHeader()->hide();
^~~~
In file included from /home/klaus/OpenFOAM/ThirdParty-6/build/linux64Gcc/ParaView-5.4.0/Qt/Components/ui_pqChangeInputDialog.h:20:0,
from /home/klaus/OpenFOAM/ThirdParty-6/ParaView-5.4.0/Qt/Components/pqChangeInputDialog.cxx:33:
/home/klaus/OpenFOAM/ThirdParty-6/ParaView-5.4.0/Qt/Widgets/pqFlatTreeView.h:53:7: Anmerkung: Vorwärtsdeklaration von »class QHeaderView«
class QHeaderView;
^~~~~~~~~~~
/home/klaus/OpenFOAM/ThirdParty-6/ParaView-5.4.0/Qt/Components/pqChangeInputDialog.cxx:83:45: Fehler: falsche Verwendung des unvollständigen Typs »class QHeaderView«
this->Internals->pipelineView->getHeader()->hideSection(1);
^~
In file included from /home/klaus/OpenFOAM/ThirdParty-6/build/linux64Gcc/ParaView-5.4.0/Qt/Components/ui_pqChangeInputDialog.h:20:0,
from /home/klaus/OpenFOAM/ThirdParty-6/ParaView-5.4.0/Qt/Components/pqChangeInputDialog.cxx:33:
/home/klaus/OpenFOAM/ThirdParty-6/ParaView-5.4.0/Qt/Widgets/pqFlatTreeView.h:53:7: Anmerkung: Vorwärtsdeklaration von »class QHeaderView«
class QHeaderView;
^~~~~~~~~~~
/home/klaus/OpenFOAM/ThirdParty-6/ParaView-5.4.0/Qt/Components/pqChangeInputDialog.cxx:83:47: Fehler: falsche Verwendung des unvollständigen Typs »class QHeaderView«
this->Internals->pipelineView->getHeader()->hideSection(1);
^~~~~~~~~~~
In file included from /home/klaus/OpenFOAM/ThirdParty-6/build/linux64Gcc/ParaView-5.4.0/Qt/Components/ui_pqChangeInputDialog.h:20:0,
from /home/klaus/OpenFOAM/ThirdParty-6/ParaView-5.4.0/Qt/Components/pqChangeInputDialog.cxx:33:
/home/klaus/OpenFOAM/ThirdParty-6/ParaView-5.4.0/Qt/Widgets/pqFlatTreeView.h:53:7: Anmerkung: Vorwärtsdeklaration von »class QHeaderView«
class QHeaderView;
^~~~~~~~~~~
make[2]: *** [Qt/Components/CMakeFiles/pqComponents.dir/build.make:1310: Qt/Components/CMakeFiles/pqComponents.dir/pqChangeInputDialog.cxx.o] Fehler 1
make[2]: *** Es wird auf noch nicht beendete Prozesse gewartet…
make[1]: *** [CMakeFiles/Makefile2:11666: Qt/Components/CMakeFiles/pqComponents.dir/all] Fehler 2
make: *** [Makefile:130: all] Fehler 2

real 36m15,661s
user 233m10,983s
sys 25m44,645s

ParaView 5.4 was released before Qt 5.11 hence the issue is not surprising. Upcoming ParaView 5.6 will build fine with Qt 5.11.

Here’s the MR with fixes for Qt 5.11 that you may be able to backport to ParaView 5.4.
https://gitlab.kitware.com/paraview/paraview/merge_requests/2474