Trouble with Windows Build (master)

I am trying to build ParaView for visualising openCFS outputs, so needing the CFSReader plugin, but am new to using open source software (so might be missing something very obvious). The following issue is coming up for me when following the instructions for Windows on the Building ParaView document. All of the dependencies were met (apart from using Qt 5.15.2 rather than Qt 5.15.3). I also noticed a lot of header files were not found when trying to compile. I would have added the CMakeError text to give a better idea but there was so much it wasn’t feasible. I will show the first bit though - hopefully that will hint towards something.

From the terminal:

 CMake Warning at VTK/CMake/vtkModule.cmake:4606 (find_package):
  By not providing "FindQt5.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Qt5", but
  CMake did not find one.


Could not find a package configuration file provided by "Qt5" (requested
  version 5.9) with any of the following names:

    Qt5Config.cmake
    qt5-config.cmake

Add the installation prefix of "Qt5" to CMAKE_PREFIX_PATH or set "Qt5_DIR"
  to a directory containing one of the above files.  If "Qt5" provides a
  separate development package or SDK, be sure it has been installed.
Call Stack (most recent call first):
  VTK/GUISupport/Qt/CMakeLists.txt:43 (vtk_module_find_package)


CMake Error at VTK/CMake/vtkModule.cmake:4612 (message):
  Could not find the Qt5 external dependency.
Call Stack (most recent call first):
  VTK/GUISupport/Qt/CMakeLists.txt:43 (vtk_module_find_package)

From the CMakeError file:

Performing C++ SOURCE FILE Test CMAKE_REQUIRE_LARGE_FILE_SUPPORT failed with the following compile output:
Change Dir: C:/pv/pvb/CMakeFiles/CMakeScratch/TryCompile-nnefef

Run Build Command(s):C:/Windows/ninja.exe cmTC_fd3db && [1/2] Building CXX object CMakeFiles\cmTC_fd3db.dir\src.cxx.obj
FAILED: CMakeFiles/cmTC_fd3db.dir/src.cxx.obj 
C:\PROGRA~2\MICROS~3\2019\COMMUN~1\VC\Tools\MSVC\1429~1.301\bin\Hostx64\x64\cl.exe  /nologo /TP -DCMAKE_REQUIRE_LARGE_FILE_SUPPORT  /DWIN32 /D_WINDOWS /GR /EHsc /W4 /bigobj   /Zi /Ob0 /Od /RTC1 -MDd /showIncludes /FoCMakeFiles\cmTC_fd3db.dir\src.cxx.obj /FdCMakeFiles\cmTC_fd3db.dir\ /FS -c C:\pv\pvb\CMakeFiles\CMakeScratch\TryCompile-nnefef\src.cxx
C:\pv\pvb\CMakeFiles\CMakeScratch\TryCompile-nnefef\src.cxx(13): warning C4293: '<<': shift count negative or too big, undefined behavior
C:\pv\pvb\CMakeFiles\CMakeScratch\TryCompile-nnefef\src.cxx(13): warning C4127: conditional expression is constant
C:\pv\pvb\CMakeFiles\CMakeScratch\TryCompile-nnefef\src.cxx(19): error C3861: 'S_ISREG': identifier not found
C:\pv\pvb\CMakeFiles\CMakeScratch\TryCompile-nnefef\src.cxx(23): error C3861: 'ftello': identifier not found
C:\pv\pvb\CMakeFiles\CMakeScratch\TryCompile-nnefef\src.cxx(22): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.

ninja: build stopped: subcommand failed.

Any help on how to proceed would be greatly appreciated.

Hi @Will

For starters, I want to mention that the CFSReader is now part of ParaView and available in the nightly binaries ! Just download the last nightly from https://www.paraview.org/download/

more info here: About integration of CFSReader

To fix your error, you need to install Qt5 and set the Qt5_DIR correctly, see the compilation guide here:
https://gitlab.kitware.com/paraview/paraview/-/blob/master/Documentation/dev/build.md#windows

Hth

1 Like

Hi @mwestphal

Thank you for the reply!

I tried to do as you mentioned and take the simpler approach of downloading the nightly binaries from the paraview website. However, while this did give working and fully functioning ParaView program, I couldn’t seem to find CFSReader (be it in the program directories or through the tools and plugins in the program itself). Perhaps I am missing something?

In regards to Qt5, I have it installed on my machine, however, I am not sure what you mean by setting the Qt5_DIR correctly. I have looked at the guide you linked and it was the same one I have been using but I don’t see where Qt5_DIR is mentioned.

I noticed that Qt5Config.cmake is located at C:\Qt\5.15.2\msvc2019_64\lib\cmake\Qt5\Qt5Config.cmake, do you mean to change the CMakeLists.txt in the paraview (pv) directory to have the following?:

set (Qt5_DIR "C:\Qt\5.15.2\msvc2019_64\lib\cmake\Qt5")

Sorry if I am being a bit slow on the uptake, thanks again for the help.

Will

Available in the nightlies only, which are not available on Windows at the moment.

I noticed that Qt5Config.cmake is located at C:\Qt\5.15.2\msvc2019_64\lib\cmake\Qt5\Qt5Config.cmake, do you mean to change the CMakeLists.txt in the paraview (pv) directory to have the following?:

Yes, but do that in cmake-gui instead of modifying paraview.

Ah okay and thanks!

Out of curiosity, is there a way to implement that through the x64 native tools command prompt? The compilation guide referenced before has:

cmake -GNinja -DPARAVIEW_USE_PYTHON=ON -DPARAVIEW_USE_MPI=ON -DVTK_SMP_IMPLEMENTATION_TYPE=STDThread -DCMAKE_BUILD_TYPE=Release …\pv

cmake -GNinja -DQt5_DIR="C:\Qt\5.15.2\msvc2019_64\lib\cmake\Qt5" -DPARAVIEW_USE_PYTHON=ON -DPARAVIEW_USE_MPI=ON -DVTK_SMP_IMPLEMENTATION_TYPE=STDThread -DCMAKE_BUILD_TYPE=Release …\pv

Thanks for your question, I have the similar trouble for Compiling Paraview. I have done the Qt6.3. When I compiled Paraview, it need Qt5_DIR. Is there any ways to use Qt6?

CMake Warning (dev) at D:/app_run/CMake/share/cmake-3.26/Modules/CMakeDependentOption.cmake:89 (message):
Policy CMP0127 is not set: cmake_dependent_option() supports full Condition
Syntax. Run “cmake --help-policy CMP0127” for policy details. Use the
cmake_policy command to set the policy and suppress this warning.
Call Stack (most recent call first):
VTK/Common/Core/CMakeLists.txt:47 (cmake_dependent_option)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning at VTK/CMake/vtkModule.cmake:4628 (find_package):
By not providing “FindQt5.cmake” in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by “Qt5”, but
CMake did not find one.

Could not find a package configuration file provided by “Qt5” (requested
version 5.9) with any of the following names:

Qt5Config.cmake
qt5-config.cmake

Add the installation prefix of “Qt5” to CMAKE_PREFIX_PATH or set “Qt5_DIR”
to a directory containing one of the above files. If “Qt5” provides a
separate development package or SDK, be sure it has been installed.
Call Stack (most recent call first):
VTK/GUISupport/Qt/CMakeLists.txt:43 (vtk_module_find_package)

CMake Error at VTK/CMake/vtkModule.cmake:4634 (message):
Could not find the Qt5 external dependency.
Call Stack (most recent call first):
VTK/GUISupport/Qt/CMakeLists.txt:43 (vtk_module_find_package)

ok, I solve my problem