Error Building Paraview superbuild on Cray

I’m trying to build paraview 5.5 on a Cray machine these are the CMake settings

BUILD_SHARED_LIBS=ON
BUILD_TESTING=OFF
ENABLE_llvm=ON
ENABLE_mpi=ON
ENABLE_numpy=ON
ENABLE_osmesa=ON
ENABLE_paraviewsdk=ON
ENABLE_png=ON
ENABLE_python=ON
ENABLE_vtkm=OFF				
PARAVIEW_CATALYST_EDITION=Extras	 
SUPERBUILD_OFFLINE_BUILD=ON
Mesa_USE_SWR=OFF	
USE_SYSTEM_zlib=ON
USE_SYSTEM_mpi=ON

I’m getting an error about EXPAT_LIBRARY this is the build output:

[ 83%] Performing configure step for 'paraview'
Not searching for unused variables given on the command line.
-- Could not use git to determine source version, using version 5.5.0
-- Cray Programming Environment 2.5.14 Fortran
[ 83%] Built target cxx11_check
-- Performing Test VTK_UNDEFINED_SYMBOLS_ALLOWED - Success
-- Performing Test VTK_UNDEFINED_SYMBOLS_ALLOWED - Success
-- Group StandAlone modules: vtkChartsCore;vtkCommonComputationalGeometry;vtkCommonCore;vtkCommonDataModel;vtkCommonExecutionModel;vtkCommonMisc;vtkCommonSystem;vtkCommonTransforms;vtkDomainsChemistry;vtkFiltersAMR;vtkFiltersCore;vtkFiltersExtraction;vtkFiltersFlowPaths;vtkFiltersGeneral;vtkFiltersGeneric;vtkFiltersGeometry;vtkFiltersHybrid;vtkFiltersHyperTree;vtkFiltersImaging;vtkFiltersModeling;vtkFiltersParallel;vtkFiltersParallelImaging;vtkFiltersPoints;vtkFiltersProgrammable;vtkFiltersPython;vtkFiltersSMP;vtkFiltersSelection;vtkFiltersSources;vtkFiltersStatistics;vtkFiltersTexture;vtkFiltersTopology;vtkFiltersVerdict;vtkIOAMR;vtkIOCore;vtkIOEnSight;vtkIOExodus;vtkIOGeometry;vtkIOImage;vtkIOImport;vtkIOInfovis;vtkIOLSDyna;vtkIOLegacy;vtkIOMINC;vtkIOMovie;vtkIONetCDF;vtkIOPLY;vtkIOParallel;vtkIOParallelXML;vtkIOSQL;vtkIOTecplotTable;vtkIOVideo;vtkIOXML;vtkIOXMLParser;vtkImagingColor;vtkImagingCore;vtkImagingFourier;vtkImagingGeneral;vtkImagingHybrid;vtkImagingMath;vtkImagingMorphological;vtkImagingSources;vtkImagingStatistics;vtkImagingStencil;vtkInfovisCore;vtkInfovisLayout;vtkParallelCore
-- Group Imaging modules: vtkFiltersImaging;vtkImagingColor;vtkImagingFourier;vtkImagingGeneral;vtkImagingHybrid;vtkImagingMath;vtkImagingMorphological;vtkImagingSources;vtkImagingStatistics;vtkImagingStencil;vtkInteractionImage;vtkRenderingImage
-- Group MPI modules: vtkFiltersParallelDIY2;vtkFiltersParallelGeometry;vtkFiltersParallelMPI;vtkFiltersParallelVerdict;vtkIOMPIImage;vtkIOMPIParallel;vtkIOParallelNetCDF;vtkParallelMPI;vtkParallelMPI4Py;vtkdiy2
-- Group Qt modules: vtkGUISupportQt;vtkGUISupportQtSQL;vtkRenderingQt;vtkViewsQt;vtkPVVTKExtensionsRendering;pqWidgets
-- Group Rendering modules: vtkGeovisCore;vtkIOExport;vtkInteractionImage;vtkInteractionStyle;vtkInteractionWidgets;vtkRenderingAnnotation;vtkRenderingContext2D;vtkRenderingCore;vtkRenderingFreeType;vtkRenderingImage;vtkRenderingLOD;vtkRenderingLabel;vtkRenderingVolume;vtkViewsContext2D;vtkViewsCore;vtkViewsInfovis
-- Group Tk modules: vtkRenderingTk
-- Group Views modules: vtkViewsContext2D;vtkViewsGeovis
-- Group Web modules: vtkWebCore;vtkWebPython;vtkWebGLExporter
-- Group ParaViewCore modules: smTestDriver;vtkPVClientServerCoreCore;vtkPVCommon;vtkPVServerImplementationCore;vtkPVServerManagerCore;vtkPVVTKExtensionsCore
-- Group ParaViewRendering modules: vtkPVClientServerCoreRendering;vtkPVServerImplementationRendering;vtkPVServerManagerRendering;vtkPVVTKExtensionsRendering
-- Group ParaViewQt modules: pqApplicationComponents;pqComponents;pqCore;pqWidgets
-- Backend OpenGL2 modules: vtkDomainsChemistryOpenGL2;vtkIOExportOpenGL2;vtkImagingOpenGL2;vtkRenderingContextOpenGL2;vtkRenderingGL2PSOpenGL2;vtkRenderingLICOpenGL2;vtkRenderingOculus;vtkRenderingOpenGL2;vtkRenderingOpenVR;vtkRenderingVolumeOpenGL2
-- Enabling modules for OpenGL2.
CMake Warning (dev) at VTK/Utilities/KWSys/vtksys/CMakeLists.txt:875 (ADD_LIBRARY):
  ADD_LIBRARY called with SHARED option but the target platform does not
  support dynamic linking.  Building a STATIC library instead.  This may lead
  to problems.
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at VTK/CMake/vtkModuleMacros.cmake:575 (add_library):
  ADD_LIBRARY called with SHARED option but the target platform does not
  support dynamic linking.  Building a STATIC library instead.  This may lead
  to problems.
Call Stack (most recent call first):
  VTK/CMake/vtkModuleMacros.cmake:660 (vtk_add_library)
  VTK/Common/Core/CMakeLists.txt:398 (vtk_module_library)
This warning is for project developers.  Use -Wno-dev to suppress it.
CMake Warning (dev) at VTK/CMake/vtkModuleMacros.cmake:575 (add_library):
  ADD_LIBRARY called with SHARED option but the target platform does not
  support dynamic linking.  Building a STATIC library instead.  This may lead
  to problems.
Call Stack (most recent call first):
  VTK/CMake/vtkModuleMacros.cmake:660 (vtk_add_library)
  VTK/Common/Math/CMakeLists.txt:28 (vtk_module_library)
This warning is for project developers.  Use -Wno-dev to suppress it.
CMake Warning (dev) at VTK/CMake/vtkModuleMacros.cmake:575 (add_library):
  ADD_LIBRARY called with SHARED option but the target platform does not
  support dynamic linking.  Building a STATIC library instead.  This may lead
  to problems.
Call Stack (most recent call first):
  VTK/CMake/vtkModuleMacros.cmake:660 (vtk_add_library)
  VTK/Common/Misc/CMakeLists.txt:10 (vtk_module_library)
This warning is for project developers.  Use -Wno-dev to suppress it.
CMake Warning (dev) at VTK/CMake/vtkModuleMacros.cmake:575 (add_library):
  ADD_LIBRARY called with SHARED option but the target platform does not
  support dynamic linking.  Building a STATIC library instead.  This may lead
  to problems.
Call Stack (most recent call first):
  VTK/CMake/vtkModuleMacros.cmake:660 (vtk_add_library)
  VTK/Common/System/CMakeLists.txt:32 (vtk_module_library)
This warning is for project developers.  Use -Wno-dev to suppress it.
CMake Warning (dev) at VTK/CMake/vtkModuleMacros.cmake:575 (add_library):
  ADD_LIBRARY called with SHARED option but the target platform does not
  support dynamic linking.  Building a STATIC library instead.  This may lead
  to problems.
Call Stack (most recent call first):
  VTK/CMake/vtkModuleMacros.cmake:660 (vtk_add_library)
  VTK/Common/Transforms/CMakeLists.txt:20 (vtk_module_library)
This warning is for project developers.  Use -Wno-dev to suppress it.
CMake Warning (dev) at VTK/CMake/vtkModuleMacros.cmake:575 (add_library):
  ADD_LIBRARY called with SHARED option but the target platform does not
  support dynamic linking.  Building a STATIC library instead.  This may lead
  to problems.
Call Stack (most recent call first):
  VTK/CMake/vtkModuleMacros.cmake:660 (vtk_add_library)
  VTK/Common/DataModel/CMakeLists.txt:234 (vtk_module_library)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at VTK/CMake/vtkModuleMacros.cmake:575 (add_library):
  ADD_LIBRARY called with SHARED option but the target platform does not
  support dynamic linking.  Building a STATIC library instead.  This may lead
  to problems.
Call Stack (most recent call first):
  VTK/CMake/vtkModuleMacros.cmake:660 (vtk_add_library)
  VTK/Common/Color/CMakeLists.txt:6 (vtk_module_library)
This warning is for project developers.  Use -Wno-dev to suppress it.
CMake Warning (dev) at VTK/CMake/vtkModuleMacros.cmake:575 (add_library):
  ADD_LIBRARY called with SHARED option but the target platform does not
  support dynamic linking.  Building a STATIC library instead.  This may lead
  to problems.
Call Stack (most recent call first):
  VTK/CMake/vtkModuleMacros.cmake:660 (vtk_add_library)
  VTK/Common/ExecutionModel/CMakeLists.txt:66 (vtk_module_library)
This warning is for project developers.  Use -Wno-dev to suppress it.
CMake Warning (dev) at VTK/CMake/vtkModuleMacros.cmake:575 (add_library):
  ADD_LIBRARY called with SHARED option but the target platform does not
  support dynamic linking.  Building a STATIC library instead.  This may lead
  to problems.
Call Stack (most recent call first):
  VTK/CMake/vtkModuleMacros.cmake:660 (vtk_add_library)
  VTK/Common/ComputationalGeometry/CMakeLists.txt:29 (vtk_module_library)
This warning is for project developers.  Use -Wno-dev to suppress it.
CMake Warning (dev) at VTK/CMake/vtkModuleMacros.cmake:575 (add_library):
  ADD_LIBRARY called with SHARED option but the target platform does not
  support dynamic linking.  Building a STATIC library instead.  This may lead
  to problems.
Call Stack (most recent call first):
  VTK/CMake/vtkModuleMacros.cmake:660 (vtk_add_library)
  VTK/Filters/Core/CMakeLists.txt:94 (vtk_module_library)
This warning is for project developers.  Use -Wno-dev to suppress it.
CMake Warning (dev) at VTK/CMake/vtkModuleMacros.cmake:575 (add_library):
  ADD_LIBRARY called with SHARED option but the target platform does not
  support dynamic linking.  Building a STATIC library instead.  This may lead
  to problems.
Call Stack (most recent call first):
  VTK/CMake/vtkModuleMacros.cmake:660 (vtk_add_library)
  VTK/Filters/General/CMakeLists.txt:124 (vtk_module_library)
This warning is for project developers.  Use -Wno-dev to suppress it.
CMake Warning (dev) at VTK/CMake/vtkModuleMacros.cmake:575 (add_library):
  ADD_LIBRARY called with SHARED option but the target platform does not
  support dynamic linking.  Building a STATIC library instead.  This may lead
  to problems.
Call Stack (most recent call first):
  VTK/CMake/vtkModuleMacros.cmake:660 (vtk_add_library)
  VTK/Imaging/Core/CMakeLists.txt:48 (vtk_module_library)
This warning is for project developers.  Use -Wno-dev to suppress it.
CMake Warning (dev) at VTK/CMake/vtkModuleMacros.cmake:575 (add_library):
  ADD_LIBRARY called with SHARED option but the target platform does not
  support dynamic linking.  Building a STATIC library instead.  This may lead
  to problems.
Call Stack (most recent call first):
  VTK/CMake/vtkModuleMacros.cmake:660 (vtk_add_library)
  VTK/Imaging/Fourier/CMakeLists.txt:13 (vtk_module_library)
This warning is for project developers.  Use -Wno-dev to suppress it.
CMake Warning (dev) at VTK/CMake/vtkModuleMacros.cmake:575 (add_library):
  ADD_LIBRARY called with SHARED option but the target platform does not
  support dynamic linking.  Building a STATIC library instead.  This may lead
  to problems.
Call Stack (most recent call first):
  VTK/CMake/vtkModuleMacros.cmake:660 (vtk_add_library)
  VTK/Filters/Statistics/CMakeLists.txt:21 (vtk_module_library)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at VTK/CMake/vtkModuleMacros.cmake:575 (add_library):
  ADD_LIBRARY called with SHARED option but the target platform does not
  support dynamic linking.  Building a STATIC library instead.  This may lead
  to problems.
Call Stack (most recent call first):
  VTK/CMake/vtkModuleMacros.cmake:660 (vtk_add_library)
  VTK/Filters/Extraction/CMakeLists.txt:37 (vtk_module_library)
This warning is for project developers.  Use -Wno-dev to suppress it.
CMake Warning (dev) at VTK/CMake/vtkModuleMacros.cmake:575 (add_library):
  ADD_LIBRARY called with SHARED option but the target platform does not
  support dynamic linking.  Building a STATIC library instead.  This may lead
  to problems.
Call Stack (most recent call first):
  VTK/CMake/vtkModuleMacros.cmake:660 (vtk_add_library)
  VTK/Infovis/Core/CMakeLists.txt:48 (vtk_module_library)
This warning is for project developers.  Use -Wno-dev to suppress it.
CMake Warning (dev) at VTK/CMake/vtkModuleMacros.cmake:575 (add_library):
  ADD_LIBRARY called with SHARED option but the target platform does not
  support dynamic linking.  Building a STATIC library instead.  This may lead
  to problems.
Call Stack (most recent call first):
  VTK/CMake/vtkModuleMacros.cmake:660 (vtk_add_library)
  VTK/Filters/Geometry/CMakeLists.txt:29 (vtk_module_library)
This warning is for project developers.  Use -Wno-dev to suppress it.
CMake Warning (dev) at VTK/CMake/vtkModuleMacros.cmake:575 (add_library):
  ADD_LIBRARY called with SHARED option but the target platform does not
  support dynamic linking.  Building a STATIC library instead.  This may lead
  to problems.
Call Stack (most recent call first):
  VTK/CMake/vtkModuleMacros.cmake:660 (vtk_add_library)
  VTK/Filters/Sources/CMakeLists.txt:40 (vtk_module_library)
This warning is for project developers.  Use -Wno-dev to suppress it.
CMake Warning (dev) at VTK/CMake/vtkModuleMacros.cmake:575 (add_library):
  ADD_LIBRARY called with SHARED option but the target platform does not
  support dynamic linking.  Building a STATIC library instead.  This may lead
  to problems.
Call Stack (most recent call first):
  VTK/CMake/vtkModuleMacros.cmake:660 (vtk_add_library)
  VTK/Rendering/Core/CMakeLists.txt:165 (vtk_module_library)
This warning is for project developers.  Use -Wno-dev to suppress it.
CMake Warning (dev) at VTK/CMake/vtkModuleMacros.cmake:575 (add_library):
  ADD_LIBRARY called with SHARED option but the target platform does not
  support dynamic linking.  Building a STATIC library instead.  This may lead
  to problems.
Call Stack (most recent call first):
  VTK/ThirdParty/freetype/vtkfreetype/CMakeLists.txt:99 (VTK_ADD_LIBRARY)
This warning is for project developers.  Use -Wno-dev to suppress it.
CMake Warning (dev) at VTK/CMake/vtkModuleMacros.cmake:575 (add_library):
  ADD_LIBRARY called with SHARED option but the target platform does not
  support dynamic linking.  Building a STATIC library instead.  This may lead
  to problems.
Call Stack (most recent call first):
  VTK/CMake/vtkModuleMacros.cmake:660 (vtk_add_library)
  VTK/Rendering/FreeType/CMakeLists.txt:33 (vtk_module_library)
This warning is for project developers.  Use -Wno-dev to suppress it.
CMake Warning (dev) at VTK/CMake/vtkModuleMacros.cmake:575 (add_library):
  ADD_LIBRARY called with SHARED option but the target platform does not
  support dynamic linking.  Building a STATIC library instead.  This may lead
  to problems.
Call Stack (most recent call first):
  VTK/CMake/vtkModuleMacros.cmake:660 (vtk_add_library)
  VTK/Rendering/Context2D/CMakeLists.txt:27 (vtk_module_library)
This warning is for project developers.  Use -Wno-dev to suppress it.
CMake Warning (dev) at VTK/CMake/vtkModuleMacros.cmake:575 (add_library):
  ADD_LIBRARY called with SHARED option but the target platform does not
  support dynamic linking.  Building a STATIC library instead.  This may lead
  to problems.
Call Stack (most recent call first):
  VTK/CMake/vtkModuleMacros.cmake:660 (vtk_add_library)
  VTK/Charts/Core/CMakeLists.txt:48 (vtk_module_library)
This warning is for project developers.  Use -Wno-dev to suppress it.
CMake Warning (dev) at VTK/CMake/vtkModuleMacros.cmake:575 (add_library):
  ADD_LIBRARY called with SHARED option but the target platform does not
  support dynamic linking.  Building a STATIC library instead.  This may lead
  to problems.
Call Stack (most recent call first):
  VTK/CMake/vtkModuleMacros.cmake:660 (vtk_add_library)
  VTK/Utilities/PythonInterpreter/CMakeLists.txt:9 (vtk_module_library)
This warning is for project developers.  Use -Wno-dev to suppress it.
CMake Warning (dev) at VTK/CMake/vtkModuleMacros.cmake:575 (add_library):
  ADD_LIBRARY called with SHARED option but the target platform does not
  support dynamic linking.  Building a STATIC library instead.  This may lead
  to problems.
Call Stack (most recent call first):
  VTK/CMake/vtkModuleMacros.cmake:660 (vtk_add_library)
  VTK/Wrapping/PythonCore/CMakeLists.txt:42 (vtk_module_library)
This warning is for project developers.  Use -Wno-dev to suppress it.
CMake Warning (dev) at VTK/CMake/vtkModuleMacros.cmake:575 (add_library):
  ADD_LIBRARY called with SHARED option but the target platform does not
  support dynamic linking.  Building a STATIC library instead.  This may lead
  to problems.
Call Stack (most recent call first):
  VTK/CMake/vtkModuleMacros.cmake:660 (vtk_add_library)
  ParaViewCore/ClientServerStream/CMakeLists.txt:48 (vtk_module_library)
This warning is for project developers.  Use -Wno-dev to suppress it.
CMake Warning (dev) at VTK/CMake/vtkModuleMacros.cmake:575 (add_library):
  ADD_LIBRARY called with SHARED option but the target platform does not
  support dynamic linking.  Building a STATIC library instead.  This may lead
  to problems.
Call Stack (most recent call first):
  VTK/Utilities/DICOMParser/CMakeLists.txt:22 (VTK_ADD_LIBRARY)
This warning is for project developers.  Use -Wno-dev to suppress it.
CMake Warning (dev) at VTK/CMake/vtkModuleMacros.cmake:575 (add_library):
  ADD_LIBRARY called with SHARED option but the target platform does not
  support dynamic linking.  Building a STATIC library instead.  This may lead
  to problems.
Call Stack (most recent call first):
  VTK/ThirdParty/lz4/vtklz4/CMakeLists.txt:19 (vtk_add_library)
This warning is for project developers.  Use -Wno-dev to suppress it.
CMake Warning (dev) at VTK/CMake/vtkModuleMacros.cmake:575 (add_library):
  ADD_LIBRARY called with SHARED option but the target platform does not
  support dynamic linking.  Building a STATIC library instead.  This may lead
  to problems.
Call Stack (most recent call first):
  VTK/ThirdParty/lzma/vtklzma/CMakeLists.txt:286 (vtk_add_library)
This warning is for project developers.  Use -Wno-dev to suppress it.
CMake Warning (dev) at VTK/CMake/vtkModuleMacros.cmake:575 (add_library):
  ADD_LIBRARY called with SHARED option but the target platform does not
  support dynamic linking.  Building a STATIC library instead.  This may lead
  to problems.
Call Stack (most recent call first):
  VTK/CMake/vtkModuleMacros.cmake:660 (vtk_add_library)
  VTK/IO/Core/CMakeLists.txt:29 (vtk_module_library)
This warning is for project developers.  Use -Wno-dev to suppress it.
CMake Warning (dev) at VTK/CMake/vtkModuleMacros.cmake:575 (add_library):
  ADD_LIBRARY called with SHARED option but the target platform does not
  support dynamic linking.  Building a STATIC library instead.  This may lead
  to problems.
Call Stack (most recent call first):
  VTK/CMake/vtkModuleMacros.cmake:660 (vtk_add_library)
  VTK/IO/Legacy/CMakeLists.txt:33 (vtk_module_library)
This warning is for project developers.  Use -Wno-dev to suppress it.
CMake Error at /software/cmake/3.8.2/share/cmake-3.8/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find EXPAT (missing: EXPAT_LIBRARY) (found version "2.2.5")
Call Stack (most recent call first):
/software/cmake/3.8.2/share/cmake-3.8/Modules/FindPackageHandleStandardArgs.cmake:377 (_FPHSA_FAILURE_MESSAGE)
  /software/cmake/3.8.2/share/cmake-3.8/Modules/FindEXPAT.cmake:48 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  VTK/CMake/vtkModuleMacros.cmake:891 (find_package)
  VTK/ThirdParty/expat/CMakeLists.txt:8 (vtk_module_third_party)
-- Configuring incomplete, errors occurred!
See also /paraview-build_5.5/superbuild/paraview/build/CMakeFiles/CMakeOutput.log".
See also "/paraview-build_5.5/superbuild/paraview/build/CMakeFiles/CMakeError.log".
CMake Error at /paraview-build_5.5/superbuild/sb-paraview-configure.cmake:43 (message):
  Failed with exit code 1
superbuild/CMakeFiles/paraview.dir/build.make:109: recipe for target 'superbuild/paraview/stamp/paraview-configure' failed
make[2]: *** [superbuild/paraview/stamp/paraview-configure] Error 1
CMakeFiles/Makefile2:518: recipe for target 'superbuild/CMakeFiles/paraview.dir/all' failed
make[1]: *** [superbuild/CMakeFiles/paraview.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2

Any tips?

With cray tools you should “export CRAYPE_LINK_TYPE=dynamic” in your shell before you configure to ensure that everything agrees to use shared libs.

For a working example of superbuild based build scripts for Cray, see https://gitlab.kitware.com/paraview/paraview-superbuild/blob/master/Scripts/sites/ANL-Theta-Build.sh and https://gitlab.kitware.com/paraview/paraview-superbuild/blob/master/cmake/sites/ANL-Theta-Shared.cmake

Thanks this worked!