mwestphal  
                
                  
                    November 5, 2018,  4:52pm
                   
                  1 
               
             
            
              Using ParaView-superbuild master, I’m struggling to use paraviewpluginsexternal project.
I’ve configured it this way :
However the plugin is not built.
I’ve taken a look into paraview itself, a few cmake variables have been set without any effect. I tried doing the same in ParaView directly without much more success.
So, how to use this superbuild project ? How to build external plugin with ParaView automatically ? 
             
            
              
            
           
          
            
              
                ben.boeckel  
              
                  
                    November 5, 2018,  9:47pm
                   
                  2 
               
             
            
              The ParaView-side of the equation is PARAVIEW_EXTERNAL_PLUGIN_DIRS. What is the value of it in ParaView’s build tree?
             
            
              
            
           
          
            
              
                mwestphal  
              
                  
                    November 6, 2018, 10:34am
                   
                  3 
               
             
            
              On the ParaView side, i see the following :
PARAVIEW_BUILD_PLUGIN_MyPlugin:BOOL=ON
PARAVIEW_EXTERNAL_PLUGIN_DIRS:STRING=/path/to/My/Plugin
PARAVIEW_EXTRA_EXTERNAL_PLUGINS:STRING=
No MyPlugin shows up in the plugin part of the cmake configuration and it has not been built.
             
            
              
            
           
          
            
              
                ben.boeckel  
              
                  
                    November 6, 2018,  3:11pm
                   
                  4 
               
             
            
              You should see this:
message(STATUS "Processing external plugins under '${extra_dir}'")
This then looks for plugin.cmake files under the indicated directory.
             
            
              
            
           
          
            
              
                mwestphal  
              
                  
                    November 6, 2018,  3:54pm
                   
                  5 
               
             
            
              I do see the-- Processing external plugins under '/path/to/my/plugin/'
But then paraview_build does not contain an ExternalPlugins directory.
             
            
              
            
           
          
            
              
                mwestphal  
              
                  
                    November 6, 2018,  4:02pm
                   
                  6 
               
             
            
              Looks like I was missing a plugin.cmake in the indicated directory.
Imho, this should work without a plugin.cmake file.
             
            
              
            
           
          
            
              
                mwestphal  
              
                  
                    November 6, 2018,  4:22pm
                   
                  7 
               
             
            
              It is not able to build the Filter example plugin of ParaView, even with a plugin.cmake file added.
[glow@snowman ~/work/paraview/paraview_build]$ ninja
[2/52] Building CXX object ExternalPlugins/Filter/CMakeFiles/SMMyElevation.dir/vtkMyElevationFilterClientServer.cxx.o
FAILED: ExternalPlugins/Filter/CMakeFiles/SMMyElevation.dir/vtkMyElevationFilterClientServer.cxx.o 
/usr/bin/c++  -DH5_BUILT_AS_DYNAMIC_LIB -DSMMyElevation_EXPORTS -I. -I/home/glow/work/vtkSandBox/Filter -IExternalPlugins/Filter -IVTK/Utilities/KWSys -IVTK/ThirdParty/jsoncpp/vtkjsoncpp/json -I/home/glow/work/paraview/paraview/VTK/ThirdParty/exodusII/vtkexodusII/include -IVTK/ThirdParty/exodusII/vtkexodusII/include -IVTK/ThirdParty/hdf5/vtkhdf5/src -I/home/glow/work/paraview/paraview/VTK/ThirdParty/hdf5/vtkhdf5/src -IVTK/ThirdParty/hdf5/vtkhdf5/hl/src -I/home/glow/work/paraview/paraview/VTK/ThirdParty/hdf5/vtkhdf5/hl/src -Wall -Wextra -Wshadow -Woverloaded-virtual -Wno-deprecated -Wno-strict-overflow -Wno-array-bounds -Wunreachable-code  -g -fPIC   -std=gnu++11 -MD -MT ExternalPlugins/Filter/CMakeFiles/SMMyElevation.dir/vtkMyElevationFilterClientServer.cxx.o -MF ExternalPlugins/Filter/CMakeFiles/SMMyElevation.dir/vtkMyElevationFilterClientServer.cxx.o.d -o ExternalPlugins/Filter/CMakeFiles/SMMyElevation.dir/vtkMyElevationFilterClientServer.cxx.o -c ExternalPlugins/Filter/vtkMyElevationFilterClientServer.cxx
In file included from ExternalPlugins/Filter/vtkMyElevationFilterClientServer.cxx:5:
/home/glow/work/vtkSandBox/Filter/vtkMyElevationFilter.h:26:10: fatal error: vtkElevationFilter.h: No such file or directory
 #include "vtkElevationFilter.h"
          ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[3/52] Building CXX object ExternalPlugins/Filter/CMakeFiles/SMMyElevation.dir/SMMyElevation_Plugin.cxx.o
FAILED: ExternalPlugins/Filter/CMakeFiles/SMMyElevation.dir/SMMyElevation_Plugin.cxx.o 
/usr/bin/c++  -DH5_BUILT_AS_DYNAMIC_LIB -DSMMyElevation_EXPORTS -I. -I/home/glow/work/vtkSandBox/Filter -IExternalPlugins/Filter -IVTK/Utilities/KWSys -IVTK/ThirdParty/jsoncpp/vtkjsoncpp/json -I/home/glow/work/paraview/paraview/VTK/ThirdParty/exodusII/vtkexodusII/include -IVTK/ThirdParty/exodusII/vtkexodusII/include -IVTK/ThirdParty/hdf5/vtkhdf5/src -I/home/glow/work/paraview/paraview/VTK/ThirdParty/hdf5/vtkhdf5/src -IVTK/ThirdParty/hdf5/vtkhdf5/hl/src -I/home/glow/work/paraview/paraview/VTK/ThirdParty/hdf5/vtkhdf5/hl/src -Wall -Wextra -Wshadow -Woverloaded-virtual -Wno-deprecated -Wno-strict-overflow -Wno-array-bounds -Wunreachable-code  -g -fPIC   -std=gnu++11 -MD -MT ExternalPlugins/Filter/CMakeFiles/SMMyElevation.dir/SMMyElevation_Plugin.cxx.o -MF ExternalPlugins/Filter/CMakeFiles/SMMyElevation.dir/SMMyElevation_Plugin.cxx.o.d -o ExternalPlugins/Filter/CMakeFiles/SMMyElevation.dir/SMMyElevation_Plugin.cxx.o -c ExternalPlugins/Filter/SMMyElevation_Plugin.cxx
In file included from ExternalPlugins/Filter/SMMyElevation_Plugin.cxx:32:
ExternalPlugins/Filter/SMMyElevation_Plugin.h:43:10: fatal error: vtkConfigure.h: No such file or directory
 #include "vtkConfigure.h"
          ^~~~~~~~~~~~~~~~
compilation terminated.
[4/52] Building CXX object ExternalPlugins/Filter/CMakeFiles/SMMyElevation.dir/SMMyElevationInit.cxx.o
FAILED: ExternalPlugins/Filter/CMakeFiles/SMMyElevation.dir/SMMyElevationInit.cxx.o 
/usr/bin/c++  -DH5_BUILT_AS_DYNAMIC_LIB -DSMMyElevation_EXPORTS -I. -I/home/glow/work/vtkSandBox/Filter -IExternalPlugins/Filter -IVTK/Utilities/KWSys -IVTK/ThirdParty/jsoncpp/vtkjsoncpp/json -I/home/glow/work/paraview/paraview/VTK/ThirdParty/exodusII/vtkexodusII/include -IVTK/ThirdParty/exodusII/vtkexodusII/include -IVTK/ThirdParty/hdf5/vtkhdf5/src -I/home/glow/work/paraview/paraview/VTK/ThirdParty/hdf5/vtkhdf5/src -IVTK/ThirdParty/hdf5/vtkhdf5/hl/src -I/home/glow/work/paraview/paraview/VTK/ThirdParty/hdf5/vtkhdf5/hl/src -Wall -Wextra -Wshadow -Woverloaded-virtual -Wno-deprecated -Wno-strict-overflow -Wno-array-bounds -Wunreachable-code  -g -fPIC   -std=gnu++11 -MD -MT ExternalPlugins/Filter/CMakeFiles/SMMyElevation.dir/SMMyElevationInit.cxx.o -MF ExternalPlugins/Filter/CMakeFiles/SMMyElevation.dir/SMMyElevationInit.cxx.o.d -o ExternalPlugins/Filter/CMakeFiles/SMMyElevation.dir/SMMyElevationInit.cxx.o -c ExternalPlugins/Filter/SMMyElevationInit.cxx
ExternalPlugins/Filter/SMMyElevationInit.cxx:11:10: fatal error: vtkClientServerInterpreter.h: No such file or directory
 #include "vtkClientServerInterpreter.h"
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[5/52] Building CXX object ExternalPlugins/Filter/CMakeFiles/SMMyElevation.dir/vtkMyElevationFilter.cxx.o
FAILED: ExternalPlugins/Filter/CMakeFiles/SMMyElevation.dir/vtkMyElevationFilter.cxx.o 
/usr/bin/c++  -DH5_BUILT_AS_DYNAMIC_LIB -DSMMyElevation_EXPORTS -I. -I/home/glow/work/vtkSandBox/Filter -IExternalPlugins/Filter -IVTK/Utilities/KWSys -IVTK/ThirdParty/jsoncpp/vtkjsoncpp/json -I/home/glow/work/paraview/paraview/VTK/ThirdParty/exodusII/vtkexodusII/include -IVTK/ThirdParty/exodusII/vtkexodusII/include -IVTK/ThirdParty/hdf5/vtkhdf5/src -I/home/glow/work/paraview/paraview/VTK/ThirdParty/hdf5/vtkhdf5/src -IVTK/ThirdParty/hdf5/vtkhdf5/hl/src -I/home/glow/work/paraview/paraview/VTK/ThirdParty/hdf5/vtkhdf5/hl/src -Wall -Wextra -Wshadow -Woverloaded-virtual -Wno-deprecated -Wno-strict-overflow -Wno-array-bounds -Wunreachable-code  -g -fPIC   -std=gnu++11 -MD -MT ExternalPlugins/Filter/CMakeFiles/SMMyElevation.dir/vtkMyElevationFilter.cxx.o -MF ExternalPlugins/Filter/CMakeFiles/SMMyElevation.dir/vtkMyElevationFilter.cxx.o.d -o ExternalPlugins/Filter/CMakeFiles/SMMyElevation.dir/vtkMyElevationFilter.cxx.o -c /home/glow/work/vtkSandBox/Filter/vtkMyElevationFilter.cxx
In file included from /home/glow/work/vtkSandBox/Filter/vtkMyElevationFilter.cxx:15:
/home/glow/work/vtkSandBox/Filter/vtkMyElevationFilter.h:26:10: fatal error: vtkElevationFilter.h: No such file or directory
 #include "vtkElevationFilter.h"
          ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
It would be nice if you could provide a compatible plugin.
             
            
              
            
           
          
            
              
                ben.boeckel  
              
                  
                    November 7, 2018,  9:26pm
                   
                  8 
               
             
            
              It’s probably out-of-date. I’ll make sure to look at it during the update to the new module system. Where does that filter live? Inside ParaView?
             
            
              
            
           
          
            
              
                mwestphal  
              
                  
                    November 8, 2018,  8:31am
                   
                  9 
               
             
            
              Example/Plugins in the paraview sources contain many example plugins which builds perfectly on their own. I was not able to build any of them using PARAVIEW_EXTERNAL_PLUGIN_DIRS, even XML only plugins.
I’m just trying to find a working plugin here.
             
            
              
            
           
          
            
              
                ben.boeckel  
              
                  
                    November 8, 2018,  2:57pm
                   
                  10 
               
             
            
              That sounds OK to me. Building a plugin as part of ParaView just requires a plugin.cmake so ParaView’s build can offer an option to build it or not as part of the CMake code. A standalone plugin doesn’t need such things because it’s always going to build the plugin. Documentation could be improved (though it’ll happen due to the new module system anyways).
             
            
              
            
           
          
            
              
                mwestphal  
              
                  
                    November 8, 2018,  3:16pm
                   
                  11 
               
             
            
              @ben.boeckel : I’m not talking about the plugin.cmake file here, i have other errors when building with external plugin feature. Can you do the following :
copy a plugin containing a plugin.cmake somewhere 
compile paraview with  PARAVIEW_EXTERNAL_PLUGIN_DIRS pointing to this plugin 
 
If that works for you, please share the working plugin.
             
            
              
            
           
          
            
              
                ben.boeckel  
              
                  
                    November 8, 2018,  7:21pm
                   
                  12 
               
             
            
              The superbuild does it for vortexfinder2 which is part of the binaries.
             
            
              
            
           
          
            
              
                mwestphal  
              
                  
                    November 9, 2018,  9:40am
                   
                  13 
               
             
            
            
              
            
           
          
            
              
                mwestphal  
              
                  
                    November 27, 2018,  4:17pm
                   
                  14 
               
             
            
              not an issue, the CMakeLists.txt must contain something like
IF (ParaView_SOURCE_DIR)
  INCLUDE_DIRECTORIES( ${VTK_INCLUDE_DIRS} )
ELSE (ParaView_SOURCE_DIR)
  FIND_PACKAGE(ParaView REQUIRED)
  INCLUDE(${PARAVIEW_USE_FILE})
ENDIF (ParaView_SOURCE_DIR)
 
            
              
            
           
          
            
              
                npillai2  
              
                  
                    July 15, 2020,  9:13am
                   
                  15 
               
             
            
              Hi @mwestphal , I’m experiencing the same issue. My configuration is
cmake -make \
	-DENABLE_paraviewpluginsexternal=ON \
	-Dparaview_PLUGINS_AUTOLOAD=PhastaSyncIOReader \
	-Dparaview_PLUGINS_EXTERNAL=PhastaSyncIOReader \
	-Dparaview_PLUGIN_PhastaSyncIOReader_PATH=/home/npillai2/ParaViewSyncIOReaderPlugin \
	-DSUPERBUILD_PROJECT_PARALLELISM=2 \
	-DCMAKE_INSTALL_PREFIX=/usr/local/usrapps/iabolotn/install/paraview_5.8.0 \
      ../paraview-superbuild 
when adding the following
IF (ParaView_SOURCE_DIR)
  INCLUDE_DIRECTORIES( ${VTK_INCLUDE_DIRS} )
ELSE (ParaView_SOURCE_DIR)
  FIND_PACKAGE(ParaView REQUIRED)
  INCLUDE(${PARAVIEW_USE_FILE})
ENDIF (ParaView_SOURCE_DIR)
to the end of my CMakeLists.txt (lines 375-380) [which, by the way, is not located in the “build” directory, only the parent “paraview-superbuild”] , I get this error if I go through ccmake
CMake Error at CMakeLists.txt:378 (FIND_PACKAGE):
   By not providing "FindParaView.cmake" in CMAKE_MODULE_PATH this project has
   asked CMake to find a package configuration file provided by "ParaView",
   but CMake did not find one.
   Could not find a package configuration file provided by "ParaView" with any
   of the following names:
     ParaViewConfig.cmake
     paraview-config.cmake
   Add the installation prefix of "ParaView" to CMAKE_PREFIX_PATH or set
   "ParaView_DIR" to a directory containing one of the above files.  If
   "ParaView" provides a separate development package or SDK, be sure it has
   been installed.
This is a little confusing to me as usually the parent directory with whatever I get from github has those files (i.e. if it’s not the superbuild, e.g. via “git clone https://gitlab.kitware.com/paraview/paraview.git ”) but the superbuild works so many layers of magic, I have no idea where those files are.
Am I putting the commands in the right place? And if not, how should I go about resolving this issue?
             
            
              
                
            
           
          
            
              
                mwestphal  
              
                  
                    July 15, 2020,  9:29am
                   
                  16 
               
             
            
              please open your own thread.