So far I have been compiling ParaView 5.8.0 on NERSC’s Cori supercomputer by cloning it and calling cmake manually. I have been trying to get the same build working with spack, but the build fails.
(the -j 1 is there so the error doesn’t get buried in unrelated build logs)
The build process fails with the following errors:
/tmp/mdorier/spack-stage/spack-stage-paraview-5.8.0-zvsma5jbul5za63rkddaqezyutp37cuc/spack-src/VTK/Rendering/FreeType/vtkFreeTypeTools.cxx:382:1: error: expected constructor, destructor, or type conversion before 'vtkFreeTypeToolsFaceRequester'
382 | vtkFreeTypeToolsFaceRequester(
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/mdorier/spack-stage/spack-stage-paraview-5.8.0-zvsma5jbul5za63rkddaqezyutp37cuc/spack-src/VTK/Rendering/FreeType/vtkFreeTypeTools.cxx: In member function 'virtual FT_Error vtkFreeTypeTools::CreateFTCManager()':
/tmp/mdorier/spack-stage/spack-stage-paraview-5.8.0-zvsma5jbul5za63rkddaqezyutp37cuc/spack-src/VTK/Rendering/FreeType/vtkFreeTypeTools.cxx:1154:61: error: 'vtkFreeTypeToolsFaceRequester' was not declared in this scope; did you mean 'vtkFreeTypeToolsCleanupCounter'?
1154 | this->MaximumNumberOfSizes, this->MaximumNumberOfBytes, vtkFreeTypeToolsFaceRequester,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| vtkFreeTypeToolsCleanupCounter
Note that if I create a new spack package for ParaView, inheriting from the original one but hard-coding the cmake arguments I need, the build works fine:
I suspect PARAVIEW_BUILD_WITH_EXTERNAL=ON is the problem. That forces ParaView to use external packages for all 3rd parties, except those manually forced off by using VTK_MODULE_USE_EXTERNAL_VTK_...=. I suspect some third party library has changed and no longer works with 5.8.0 exposing this issue. From the looks of it, it may be freetype.
I don’t remember seeing this one. I’ve seen various packages failing to build which can be solved by downgrading the offending package - or fixing the error on the machine you are building.
Downgrading might fix this error as well as spack might pick up a version ParaView was not tested with.
Utkarsh seems to have been right; the following “hacked” package, which removes -DPARAVIEW_BUILD_WITH_EXTERNAL=ON, seems to work (I have a build in progress and it’s got passed the point where the freetype problem usually occurs).
from spack.pkg.builtin.paraview import Paraview
class Paraview(Paraview):
def cmake_args(self):
args = super(Paraview, self).cmake_args()
args.remove('-DPARAVIEW_BUILD_WITH_EXTERNAL=ON')
args.append('-DPARAVIEW_BUILD_WITH_EXTERNAL=OFF')
return args
The problem is that VTK was using macros that new fontconfig has removed from its public headers (they were internal macros apparently). See these VTK commits: