Failing to build superbuild VS2019

Hello,

I’m new to Paraview and are trying to build the superbuild on a Windows 10 computer using Ninja and VS2019.

I managed to build Paraview, with no GUI as I found out, following the instructions here. Opening the CMake GUI and enabling ‘Enable_qt5’ I started a new build and now is getting an error about a missing header.

The error starts at step 27(?) and looks like this:

FAILED: superbuild/paraview/stamp/paraview-build C:/pvbuild/superbuild/paraview/stamp/paraview-build
cmd.exe /C "cd /D C:\pvbuild\superbuild\paraview\build && "C:\Program Files\CMake\bin\cmake.exe" -P C:/pvbuild/superbuild/sb-paraview-build.cmake && "C:\Program Files\CMake\bin\cmake.exe" -E touch C:/pvbuild/superbuild/paraview/stamp/paraview-build"
[1/9101] Generating the wrap hierarchy for VTK::RenderingSceneGraph
[2/9101] Building C object VTK\ThirdParty\h5part\vtkh5part\CMakeFiles\h5part.dir\src\H5Part.c.obj
FAILED: VTK/ThirdParty/h5part/vtkh5part/CMakeFiles/h5part.dir/src/H5Part.c.obj
C:\PROGRA~2\MICROS~3\2019\COMMUN~1\VC\Tools\MSVC\1429~1.301\bin\Hostx64\x64\cl.exe  /nologo -DH5_BUILT_AS_DYNAMIC_LIB -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -Dh5part_EXPORTS -IC:\pvbuild\superbuild\paraview\build\VTK\ThirdParty\h5part\vtkh5part -IC:\pvbuild\superbuild\paraview\src\VTK\ThirdParty\h5part\vtkh5part -IC:\pvbuild\superbuild\paraview\build\VTK\ThirdParty\hdf5\vtkhdf5 -IC:\pvbuild\superbuild\paraview\src\VTK\ThirdParty\hdf5\vtkhdf5 -IC:\pvbuild\superbuild\paraview\build\VTK\ThirdParty\hdf5\vtkhdf5\src -IC:\pvbuild\superbuild\paraview\src\VTK\ThirdParty\hdf5\vtkhdf5\src -IC:\pvbuild\superbuild\paraview\build\VTK\ThirdParty\hdf5\vtkhdf5\hl\src -IC:\pvbuild\superbuild\paraview\src\VTK\ThirdParty\hdf5\vtkhdf5\hl\src -IC:\pvbuild\superbuild\paraview\build\VTK\ThirdParty\h5part -IC:\pvbuild\superbuild\paraview\src\VTK\ThirdParty\h5part -IC:\pvbuild\superbuild\paraview\build\VTK\ThirdParty\hdf5 -
IC:\pvbuild\superbuild\paraview\src\VTK\ThirdParty\hdf5 /bigobj  /MD /O2 /Ob2 /DNDEBUG -MD /showIncludes /FoVTK\ThirdParty\h5part\vtkh5part\CMakeFiles\h5part.dir\src\H5Part.c.obj /FdVTK\ThirdParty\h5part\vtkh5part\CMakeFiles\h5part.dir\ /FS -c C:\pvbuild\superbuild\paraview\src\VTK\ThirdParty\h5part\vtkh5part\src\H5Part.c

C:\pvbuild\superbuild\paraview\src\VTK\ThirdParty\h5part\vtkh5part\src\H5Part.c(85): fatal error C1083: Cannot open include file: 'unistd.h': No such file or directory

[3/9101] Generating the wrap hierarchy for VTK::RenderingVtkJS

Pretty much stuck…
Best Regards,
Totte

No need to use the superbuild unless you have specific needs.

Why not using the binary release ?
https://www.paraview.org/download/

Thanks for your response. We (Allen Institute for Brain Science) are creating an application for tracing Neurons and are evaluating using VTK for volume rendering. Volumes are Tiffstacks of imaged brain tissue.

Just opening, such a stack in Paraview, and render it as a volume is exactly what we need. So, we wanted to build Paraview and just step through to perhaps get an idea of the underlying VTK pipeline, widgets etc… and learn.

I’ve tried to build Paraview for a while now, superbuild, or not, but not being successful, so any help is greatly appreciated…

@ben.boeckel

Awesome !

Well, building ParaView may not be the ideal first step to learn about VTK pipeline and widgets, but you will find all related info here: https://gitlab.kitware.com/paraview/paraview/-/blob/master/Documentation/dev/build.md#windows

To learn about VTK pipeline, I’d suggest taking a look at these blogs articles:
https://blog.kitware.com/a-vtk-pipeline-primer-part-1/

Then play around with examples from:
https://kitware.github.io/vtk-examples/site/

As for your specific need:

Volumes are Tiffstacks of imaged brain tissue.
Just opening, such a stack in Paraview, and render it as a volume is exactly what we need.

You can do that with the binary release of ParaView I linked above.

  • File → Open → yourFile, Apply
  • Switch representation from surface to volume

Also, read the ParaView tutorial (a .pdf within the binary release, in help menu) and user guide
https://docs.paraview.org/en/latest/

hth.

Thanks for the links Mathieu,

I have used VTK in the past, and are aware of some of its working and design and examples.

I have not rendered volumes however, but only polylines and simple geometric shapes.

This is why I want to step through the code in Paraview to see what classes are involved to get that pretty, default result, in Paraview… just need to get to a successful build. :slight_smile:

Trying to not reinvent the wheel…!

By the way, your link to build paraview is not to the superbuild build. Does this suggest that the superbuild is not working, and one should build Paraview ‘the other way’?

Thanks,
-tk

ParaView may be a bit too complex for that, but this VTK example should do it:
https://kitware.github.io/vtk-examples/site/Cxx/VolumeRendering/SimpleRayCast/

Alternatively, F3D implements volume rendering in a very simple way:
https://gitlab.kitware.com/f3d/f3d/-/blob/master/src/vtkF3DRendererWithColoring.cxx#L425

By the way, your link to build paraview is not to the superbuild build. Does this suggest that the superbuild is not working, and one should build Paraview ‘the other way’?

Superbuild is working and is used everyday to generate the binaries of ParaView, however this is not the simplest way to build ParaView when you want to build it without complex dependencies, and debugging a failing superbuild can be hard. I’d never recommend the superbuild for a first timer building paraview. The paraview build guide is here for that.

Thanks for the links!

I’ll check them out, and also will check out the regular Paraview build!

That H5Part file has a typo. Apply this diff:

diff --git a/ThirdParty/h5part/vtkh5part/src/H5Part.c b/ThirdParty/h5part/vtkh5part/src/H5Part.c
index 228d246600..d74201ef1e 100644
--- a/ThirdParty/h5part/vtkh5part/src/H5Part.c
+++ b/ThirdParty/h5part/vtkh5part/src/H5Part.c
@@ -81,7 +81,7 @@ For further information contact: <a href="mailto:h5part@lists.psi.ch">h5part</a>
 #include <fcntl.h>
 #include <vtk_hdf5.h>
 
-#ifndef WIN32
+#ifndef _WIN32
 #include <unistd.h>
 #else /* WIN32 */
 #include <io.h>

I’ll get this into VTK in the meantime.

MR pushed: https://gitlab.kitware.com/vtk/vtk/-/merge_requests/8641

Thanks @ben.boeckel ! That error went away and I managed to build a paraview.exe.

When trying to run the executable, Paraview complains about two QT DLL’s, Qt5Network.dll
Qt5Help.dll. That got fixed by putting them on the path (C:\Qt\5.15.2\msvc2019_64\bin).

Now, when trying to run paraview.exe. I get the following errors:

So still, something not right…

It looks like Qt plugins aren’t being found. I recommend running ctest -R cpack-paraview-ZIP to get the superbuild to make a package. It should do what is needed to bundle up the Qt (if cmake -DPACKAGE_SYSTEM_QT=ON is used).

That worked! The executable in the generated folder, C:\pvbuild_CPack_Packages\win64\ZIP\ParaView-5.10.0-RC1-265-gcc4877b60d-Windows-msvc2017-AMD64\bin runs without troubles.

Curious, it says msvc2017, although I’m using the 2019 VS compiler.

In any case, I can now attach to the Paraview process in visual studio and set breakpoints in the source code. Very useful.

Thanks!

1 Like