ParaView build is failed while turning on the BUILD_EXAMPLES

Hi All,

I am building ParaView 5.5 on CentOS 7 using Python 2.7.5 and Qt 5.9.5. While the BUILD_EXAMPLES option is off, everything is going well, but after turning on this option, I am facing some issues regarding “Qt5::X11Extras”. I have also checked the value of “Qt5X11Extras_DIR” variable, but it seems to be OK. Here is the build output:

[ 99%] Built target vtkPVStaticPluginsInit
[ 99%] Build examples as a separate project
Not searching for unused variables given on the command line.
Internal cmake changing into directory: /home/hadi/ParaView/install/Examples/All
Error: cmake execution failed
Configuring
Configuring
Configuring
Configuring
Configuring
Configuring
Configuring
Configuring
Performing Test VTK_UNDEFINED_SYMBOLS_ALLOWED - Success
Found MPI_C: /home/hadi/local/lib/libmpich.so;/home/hadi/local/lib/libopa.so;/home/hadi/local/lib/libmpl.so;/usr/lib64/librt.so;/usr/lib64/libpthread.so 
Found MPI_CXX: /home/hadi/local/lib/libmpichcxx.so;/home/hadi/local/lib/libmpich.so;/home/hadi/local/lib/libopa.so;/home/hadi/local/lib/libmpl.so;/usr/lib64/librt.so;/usr/lib64/libpthread.so 
Configuring
// more repetitions omitted 
Configuring

Configuring done
CMake Error at /home/hadi/ParaView/src/CMake/ParaViewPlugins.cmake:1004 (add_library):
  Target "Autostart" links to target "Qt5::X11Extras" but the target was not
  found.  Perhaps a find_package() call is missing for an IMPORTED target, or
  an ALIAS target is missing?
Call Stack (most recent call first):
  Plugins/Autostart/CMakeLists.txt:25 (ADD_PARAVIEW_PLUGIN)


CMake Error at /home/hadi/ParaView/src/CMake/ParaViewPlugins.cmake:1004 (add_library):
  Target "ExampleDockPanel" links to target "Qt5::X11Extras" but the target
  was not found.  Perhaps a find_package() call is missing for an IMPORTED
  target, or an ALIAS target is missing?
Call Stack (most recent call first):
  Plugins/DockWidget/CMakeLists.txt:28 (ADD_PARAVIEW_PLUGIN)


CMake Error at /home/hadi/ParaView/src/CMake/ParaViewPlugins.cmake:1004 (add_library):
  Target "GUIMyToolBar" links to target "Qt5::X11Extras" but the target was
  not found.  Perhaps a find_package() call is missing for an IMPORTED
  target, or an ALIAS target is missing?
Call Stack (most recent call first):
  Plugins/GUIToolBar/CMakeLists.txt:30 (ADD_PARAVIEW_PLUGIN)


CMake Error at /home/hadi/ParaView/src/CMake/ParaViewPlugins.cmake:1004 (add_library):
  Target "ExamplesPropertyWidgets" links to target "Qt5::X11Extras" but the
  target was not found.  Perhaps a find_package() call is missing for an
  IMPORTED target, or an ALIAS target is missing?
Call Stack (most recent call first):
  Plugins/PropertyWidgets/CMakeLists.txt:42 (add_paraview_plugin)


CMake Error at /home/hadi/ParaView/src/CMake/ParaViewPlugins.cmake:1004 (add_library):
  Target "SourceToolbar" links to target "Qt5::X11Extras" but the target was
  not found.  Perhaps a find_package() call is missing for an IMPORTED
  target, or an ALIAS target is missing?
Call Stack (most recent call first):
  Plugins/SourceToolbar/CMakeLists.txt:28 (ADD_PARAVIEW_PLUGIN)


CMake Error at /home/hadi/ParaView/src/CMake/pvForwardingExecutable.cmake:91 (add_executable):
  Target "paraview_revised" links to target "Qt5::X11Extras" but the target
  was not found.  Perhaps a find_package() call is missing for an IMPORTED
  target, or an ALIAS target is missing?
Call Stack (most recent call first):
  /home/hadi/ParaView/src/CMake/ParaViewBranding.cmake:291 (pv_add_executable_with_forwarding2)
  CustomApplications/Clone1/CMakeLists.txt:45 (build_paraview_client)


CMake Error at /home/hadi/ParaView/src/CMake/pvForwardingExecutable.cmake:91 (add_executable):
  Target "paraview_revised_2" links to target "Qt5::X11Extras" but the target
  was not found.  Perhaps a find_package() call is missing for an IMPORTED
  target, or an ALIAS target is missing?
Call Stack (most recent call first):
  /home/hadi/ParaView/src/CMake/ParaViewBranding.cmake:291 (pv_add_executable_with_forwarding2)
  CustomApplications/Clone2/CMakeLists.txt:43 (build_paraview_client)


CMake Error at CustomApplications/Demo0/CMakeLists.txt:20 (add_executable):
  Target "DemoApp0" links to target "Qt5::X11Extras" but the target was not
  found.  Perhaps a find_package() call is missing for an IMPORTED target, or
  an ALIAS target is missing?


CMake Error at CustomApplications/Demo1/CMakeLists.txt:33 (add_executable):
  Target "DemoApp1" links to target "Qt5::X11Extras" but the target was not
  found.  Perhaps a find_package() call is missing for an IMPORTED target, or
  an ALIAS target is missing?


CMake Error at /home/hadi/ParaView/src/CMake/pvForwardingExecutable.cmake:91 (add_executable):
  Target "multiserverclient" links to target "Qt5::X11Extras" but the target
  was not found.  Perhaps a find_package() call is missing for an IMPORTED
  target, or an ALIAS target is missing?
Call Stack (most recent call first):
  /home/hadi/ParaView/src/CMake/ParaViewBranding.cmake:291 (pv_add_executable_with_forwarding2)
  CustomApplications/MultiServerClient/CMakeLists.txt:67 (build_paraview_client)


Generating
Generating
Generating done
Build files have been written to: /home/hadi/ParaView/install/Examples/All

make[2]: *** [ParaViewExamples.done] Error 1
make[1]: *** [CMakeFiles/ParaViewExamples.dir/all] Error 2
make: *** [all] Error 2

Any ideas?

Hi,

Well, what is the value of your Qt5X11Extras_DIR ?
How did you install Qt ?

I have installed Qt using its online installer script. The value of Qt5X11Extras_DIR has been extracted by CMake automatically and the value is something like:

~/Qt/5.9.5/gcc_64/lib/cmake/Qt5X11Extras

Hadi

This problem only happens in compiling with Static libs. With compiling with dynamic libs everything is OK.