View Issue Details

IDProjectCategoryView StatusLast Update
0002480OpenFOAMBugpublic2017-07-24 15:15
Reportershildenbrand Assigned Towill  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformHP Workstation Z820OSDebianOS Version8.7
Product Versiondev 
Summary0002480: PVFoamReader can not be compiled after Paraview Version 5.2
DescriptionAfter having shown a warning only when using Paraview 5.2, starting with Paraview 5.3 PVFoamReaders won't be compiled anymore due to usage of "ADD_PARAVIEW_OBJET_PANEL".
Here's the message:

CMake Error at /opt/OpenFOAM/ThirdParty-dev/platforms/linux64Gcc/ParaView-5.3.0/lib/cmake/paraview-5.3/ParaViewPlugins.cmake:299 (message):
  ADD_PARAVIEW_OBJECT_PANEL is no longer supported.

  ParaView's Properties panel has been refactored in 3.98. Legacy object
  panel support

  was dropped in 5.2. Please refer to 'Major API Changes' in ParaView
  developer

  documentation for details.
Steps To ReproduceGet Paraview 5.3
makeParaView -version 5.3
compile PVFoamReader with link to PV Vers. 5.3
Additional InformationI guess this is not urgent as PV 5.3 still is a release candidate only, but sooner or later it will become necessarý to have a look into this.
TagsNo tags attached.

Activities

henry

2017-02-28 11:37

manager   ~0007827

Can you provide a patch to fix this issue?

shildenbrand

2017-02-28 12:52

reporter   ~0007830

I will have a look into it, but I am pretty sure that this beyond my programming capabilities.

user696

2017-03-07 09:18

  ~0007864

The same issue actually exists for paraview 5.1 and 5.2 as well. The plugins will compile, but will not load. I have a rewritten version of the plugins that compiles and loads with paraview 4.4, 5.[0-3]. However, to read the normal (non-blockMesh) OpenFOAM data you may not need this so urgently anyhow.
The upcoming paraview 5.3 should now manage binary lagrangian, 32/64-bit scalar/labels, binary sets/zones. AFAIK it is slated for release next week.

user696

2017-03-15 07:49

  ~0007931

ParaView-5.3.0 is now out:
https://blog.kitware.com/paraview-5-3-0-release-notes/

eatdirt

2017-05-03 14:27

reporter   ~0008071

Hello,
I don't see how this bug can be minor, compilation will always fail when one wants to compile openfoam with a paraview-5.3 installation, which is indeed the current paraview version.

Cheers,
Chris.

wyldckat

2017-05-03 14:40

updater   ~0008073

Currently it's considered a minor bug, because ParaView 5.0.1 is the version currently officially supported in OpenFOAM, with which the plug-in builds without problems.

wyldckat

2017-07-24 00:21

updater   ~0008444

@Will has done the code revisions needed to build OpenFOAM-dev's plugin readers to work up to ParaView 5.4.0. The following commits are of relevance:

 - Main commit 68089dd57468 that has the code revision: https://github.com/OpenFOAM/OpenFOAM-dev/commit/68089dd57468ee7729062d38f6f3a2a54a7ea786

 - Changed how the Refresh button works in commit 2c3826ebd9afb: https://github.com/OpenFOAM/OpenFOAM-dev/commit/2c3826ebd9afb244bb7d2bf080a54e08f3236962

 - Henry has added a link to ParaView 5.4.0 sources in the ThirdParty-dev commit fe763779056a65: https://github.com/OpenFOAM/ThirdParty-dev/commit/fe763779056a653055fcbc1642391b47c4af6dc5


However, I have tested this with ParaView 5.3.0 and Qt 4 on Ubuntu 16.04 and it fails at two points with:

   [...]/pqApplicationCore.h:36:19: fatal error: QObject: No such file or directory

As far as I can figure out, this is because Qt4 support was being gradually dropped from ParaView's development and has been officially dropped for the development of ParaView 5.5. Specifically, the file "CMake/UseParaView.cmake" in 5.3.0 and 5.4.0 does not properly include the necessary Qt4 paths to the header files, resulting in the plug-in not being built properly.

Therefore, I'm guessing Will has done the ParaView builds by using Qt5.

I'm assigning this report to Will and leaving it to be marked as resolve by him.

will

2017-07-24 10:03

manager   ~0008449

I do not have ubuntu 16.04 available to me, but if Qt headers aren't being included by the ParaView use file, then we can include them manually in the reader cmake scripts. @wyldckat, could you try the uploaded patch and see if it fixes the issue on 16.04?
2480.patch (2,178 bytes)   
diff --git a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/CMakeLists.txt b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/CMakeLists.txt
index d8a66b793..67b132238 100644
--- a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/CMakeLists.txt
+++ b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/CMakeLists.txt
@@ -16,13 +16,21 @@ INCLUDE_DIRECTORIES(
     ${PROJECT_SOURCE_DIR}/../vtkPVFoam
 )
 
+IF (PARAVIEW_QT_VERSION VERSION_GREATER "4")
+ELSE()
+    # Qt includes should be handled by the ParaView use file. For versions
+    # around 5.2, during the transition from Qt4 to Qt5, this seems to have been
+    # broken. We therefore ensure the Qt4 headers are included here.
+    FIND_PACKAGE(Qt4 COMPONENTS QTCORE QTGUI)
+    INCLUDE_DIRECTORIES(${QT_INCLUDES})
+ENDIF()
+
 ADD_DEFINITIONS(
     -std=c++0x
     -DWM_$ENV{WM_PRECISION_OPTION}
     -DWM_LABEL_SIZE=$ENV{WM_LABEL_SIZE}
 )
 
-
 # Set output library destination to plugin directory
 SET(
     LIBRARY_OUTPUT_PATH $ENV{PV_PLUGIN_PATH}
diff --git a/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/PVblockMeshReader/CMakeLists.txt b/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/PVblockMeshReader/CMakeLists.txt
index 81e95a81b..93cf03872 100644
--- a/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/PVblockMeshReader/CMakeLists.txt
+++ b/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/PVblockMeshReader/CMakeLists.txt
@@ -16,6 +16,15 @@ INCLUDE_DIRECTORIES(
     ${PROJECT_SOURCE_DIR}/../vtkPVblockMesh
 )
 
+IF (PARAVIEW_QT_VERSION VERSION_GREATER "4")
+ELSE()
+    # Qt includes should be handled by the ParaView use file. For versions
+    # around 5.2, during the transition from Qt4 to Qt5, this seems to have been
+    # broken. We therefore ensure the Qt4 headers are included here.
+    FIND_PACKAGE(Qt4 COMPONENTS QTCORE QTGUI)
+    INCLUDE_DIRECTORIES(${QT_INCLUDES})
+ENDIF()
+
 ADD_DEFINITIONS(
     -std=c++0x
     -DWM_$ENV{WM_PRECISION_OPTION}
2480.patch (2,178 bytes)   

chris

2017-07-24 12:48

manager   ~0008452

@wyldckat ParaView 5.4.0 compiles without problem with Ubuntu 16.04 with QT4 without the patch from @will. The failure with ParaView 5.3.0 is a bug with that version.

We support the compilation of specific versions of ParaView. Previously it was a patched v5.0.1, today it is v.5.4.0 sources out of the box. We can push the patch for 5.3.0, but I don't recommend we do this in general.

wyldckat

2017-07-24 13:23

updater   ~0008453

I've tested building on CentOS 6.8, using a custom build of Qt 4.8.6 and building ParaView 5.3.0 with CMake 3.9.0. And I didn't need the patch.

I'm not certain what happened on my Ubuntu installation, but still, many thanks @will, since this issue could arise in some weird situations. I will try to test this later tonight at home.

@chris: I did look at some of the changes on the git history from ParaView that is in development... and I didn't notice any changes that could have fixed this between 5.3.0 and 5.4.0.

Either way, this is likely a weird corner scenario that I stumbled upon. If I can figure out what happened and if there is a substantial reason to report on it, I'll upon a new bug report.

In the meantime, I believe this report can be marked as resolved.

chris

2017-07-24 15:15

manager   ~0008454

Resolved - raise new issue if further problem occurs

Issue History

Date Modified Username Field Change
2017-02-28 11:32 shildenbrand New Issue
2017-02-28 11:37 henry Note Added: 0007827
2017-02-28 12:52 shildenbrand Note Added: 0007830
2017-03-07 09:18 user696 Note Added: 0007864
2017-03-15 07:49 user696 Note Added: 0007931
2017-05-03 14:27 eatdirt Note Added: 0008071
2017-05-03 14:40 wyldckat Note Added: 0008073
2017-07-24 00:21 wyldckat Note Added: 0008444
2017-07-24 00:21 wyldckat Assigned To => will
2017-07-24 00:21 wyldckat Status new => assigned
2017-07-24 10:03 will File Added: 2480.patch
2017-07-24 10:03 will Note Added: 0008449
2017-07-24 12:48 chris Note Added: 0008452
2017-07-24 13:23 wyldckat Note Added: 0008453
2017-07-24 13:24 wyldckat Status assigned => resolved
2017-07-24 13:24 wyldckat Resolution open => fixed
2017-07-24 15:15 chris Status resolved => closed
2017-07-24 15:15 chris Note Added: 0008454