Some mistakes when building the configuration using CMake

Hi all,
I am trying to compile the OGS source-code downloaded from gitlab through Cmake-Gui in the windows 10 OS, but it has some mistakes like the following commands:
the first time I build the configuration the mistake is like:

CMake Error at scripts/cmake/CMakeSetup.cmake:13 (CPMAddPackage): Unknown CMake command "CPMAddPackage". Call Stack (most recent call first): CMakeLists.txt:13 (include)

then I download CPM.cmake from github and copy it in the scripts directory. In the next try a new problem occurs like the following:

Checking Build System Creating directories for 'googletest-populate' Building Custom Rule F:/ogs/opengeosys/_deps/googletest-subbuild/CMakeLists.txt Performing download step (git clone) for 'googletest-populate' Cloning into 'googletest-src'... fatal: unable to access 'https://github.com/google/googletest.git/': Failed to connect to github.com port 443: Timed out Cloning into 'googletest-src'... fatal: unable to access 'https://github.com/google/googletest.git/': Failed to connect to github.com port 443: Timed out Cloning into 'googletest-src'... fatal: unable to access 'https://github.com/google/googletest.git/': Failed to connect to github.com port 443: Timed out -- Had to git clone more than once: 3 times. CMake Error at googletest-subbuild/googletest-populate-prefix/tmp/googletest-populate-gitclone.cmake:31 (message): Failed to clone repository: 'https://github.com/google/googletest.git'

I guess it is a network issue so I keep configuring, hoping to compile it completely with a Global Schema VPN, but in every try it stopped at the failure of the clone of one of the packages to be added… I am upset about this, can anyone give me some help to build the configuration? Thank you!

When configuring with CMake there are several git clone-operations taking place which download required third-party dependencies.

I am very confident that there is some firewall or VPN or internet proxy set up on your machine which prevents the git operation. Please check that. You can also check if you can run git clone https://github.com/google/googletest.git from the command line manually.

Hi Bilke,
Thanks for your advice. I tried to build configuration in another computer and after tens of try it succeeded finally… Next I opened the OGS-6.sln in the build directory in visual studio 2019. Following the developer guide on the website, I set ogs as the startup project and started build the project. However the mistake happened again like the below picture:

it seems that some header files have not been included in the build directory or the **include** commands in the **ogs.cpp** has some errors. Is there something wrong in the former configuration process? Actually there were some warnings during the configuration. I will appreciate it a lot if you could give me some advice.

The error indicates that the Boost libraries are still not installed (downloaded). There should not “tens of try” to get it configured. It should work with one try. If not then there is something wrong.

Can you please send the full command line output of a CMake run in a clean build directory? E.g.:

mkdir new-build
cd new-build
cmake ..\ogs

Make sure to run this from a proper Visual Studio command prompt (e.g. from the Start menu “Visual Studio 2019 / x64 Native Tools Command Prompt”).

I think first I have to explain “tens of try”. I use the Cmake-GUI to build the configuration and on the website it says that
`Click Configure often enough until the Generate-button becomes visible. Pressing Generate will finally generate the project files inside the chosen build directory.
So every time the configuration fails I click the “Configure” until it shows “Configuring done”. That is the reason why there are “tens of try” before the successful configuration.
I remember that the boost has been downloaded and it truly exists in the build directory…I configure it again in a clean build directory. Unfortunately but not surprisingly, it failed again. Here is the command line output:
**********************************************************************
** Visual Studio 2019 Developer Command Prompt v16.9.2
** Copyright (c) 2021 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: ‘x64’

C:\Program Files (x86)\Microsoft Visual Studio\2019\Community>D:

D:\>cd D:\ogs

D:\ogs>mkdir new-build

D:\ogs>cd new-build

D:\ogs\new-build>cmake ../ogs-master
-- Building for: Visual Studio 16 2019
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19043.
-- The C compiler identification is MSVC 19.28.29913.0
-- The CXX compiler identification is MSVC 19.28.29913.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.28.29910/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.28.29910/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- CPM: adding package cmake-modules@0 (d98828f54f6974717798e63195cfbf08fe2daad0)
-- CPM: adding package json-cmake@0 (9708cb091f6b89b94d71ae98f8b9e68ea04c47dd)
-- Found Git: D:/git bash/Git/bin/git.exe (found version "2.31.1.windows.1")
fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
fatal: bad revision 'HEAD'
CMake Warning at scripts/cmake/GitSetup.cmake:113 (message):
  Git repository contains no tags! Please run: git fetch --tags
Call Stack (most recent call first):
  CMakeLists.txt:65 (include)


fatal: your current branch 'master' does not have any commits yet
fatal: your current branch 'master' does not have any commits yet
-- Found Python3: D:/python/python.exe (found suitable version "3.7.2", minimum required is "3.6") found components: Interpreter Development Development.Module Development.Embed
-- Number of (logical) cores: 8, Free memory: 19632 MB
--   Job pool light_tasks using 8 cores.
--   Job pool heavy_tasks using 4 cores.
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- Found OpenMP_C: -openmp (found version "2.0")
-- Found OpenMP_CXX: -openmp (found version "2.0")
-- Found OpenMP: TRUE (found version "2.0")
-- Looking for pthread.h
-- Looking for pthread.h - not found
-- Found Threads: TRUE
-- Could NOT find TIFF (missing: TIFF_LIBRARY TIFF_INCLUDE_DIR)
-- Could NOT find GEOTIFF (missing: libgeotiff_LIBRARY libgeotiff_INCLUDE_DIR xtiff_INCLUDE_DIR TIFF_FOUND)
-- Looking for C++ include filesystem
-- Looking for C++ include filesystem - found
-- Performing Test CXX_FILESYSTEM_NO_LINK_NEEDED
-- Performing Test CXX_FILESYSTEM_NO_LINK_NEEDED - Success
-- CPM: adding package googletest@1.11.0 (release-1.11.0)
-- Found Python: D:/python/python.exe (found version "3.7.2") found components: Interpreter
-- CPM: adding package autocheck@0 (e388ecbb31c49fc2724c8d0436da313b6edca7fd)
-- CPM: adding package exprtk@0 (772884eb09eb648808a5151a077faf97fa127426)
用于 .NET Framework 的 Microsoft (R) 生成引擎版本 16.9.0+57a23d249
版权所有(C) Microsoft Corporation。保留所有权利。

  Checking Build System
  Creating directories for 'exprtk-populate'
  Performing download step (git clone) for 'exprtk-populate'
  Cloning into 'exprtk-src'...
  fatal: unable to access 'https://github.com/ArashPartow/exprtk.git/': OpenSSL SSL_read: Connection was reset, errno 10054
  Cloning into 'exprtk-src'...
  fatal: unable to access 'https://github.com/ArashPartow/exprtk.git/': Failed to connect to github.com port 443: Timed out
  Cloning into 'exprtk-src'...
  fatal: unable to access 'https://github.com/ArashPartow/exprtk.git/': Failed to connect to github.com port 443: Timed out
  CMake Error at exprtk-subbuild/exprtk-populate-prefix/tmp/exprtk-populate-gitclone.cmake:31 (message):
  -- Had to git clone more than once:
            3 times.
    Failed to clone repository: 'https://github.com/ArashPartow/exprtk.git'


C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(240,5): error MSB8066: “D:\ogs\new-build\_deps\exprtk-subbuild\CMakeFiles\f22ab6705f4c9f35fd3a57dd38ea8147\exprtk-populate-mkdir.rule;D:\ogs\new-build\_deps\exprtk-subbuild\CMakeFiles\f22ab6705f4c9f35fd3a57dd38ea8147\exprtk-populate-download.rule;D:\ogs\new-build\_deps\exprtk-subbuild\CMakeFiles\f22ab6705f4c9f35fd3a57dd38ea8147\exprtk-populate-update.rule;D:\ogs\new-build\_deps\exprtk-subbuild\CMakeFiles\f22ab6705f4c9f35fd3a57dd38ea8147\exprtk-populate-patch.rule;D:\ogs\new-build\_deps\exprtk-subbuild\CMakeFiles\f22ab6705f4c9f35fd3a57dd38ea8147\exprtk-populate-configure.rule;D:\ogs\new-build\_deps\exprtk-subbuild\CMakeFiles\f22ab6705f4c9f35fd3a57dd38ea8147\exprtk-populate-build.rule;D:\ogs\new-build\_deps\exprtk-subbuild\CMakeFiles\f22ab6705f4c9f35fd3a57dd38ea8147\exprtk-populate-install.rule;D:\ogs\new-build\_deps\exprtk-subbuild\CMakeFiles\f22ab6705f4c9f35fd3a57dd38ea8147\exprtk-populate-test.rule;D:\ogs\new-build\_deps\exprtk-subbuild\CMakeFiles\649cc71a81a9577fccd7bbe752b7149b\exprtk-populate-complete.rule;D:\ogs\new-build\_deps\exprtk-subbuild\CMakeFiles\0e5fdaf901fc58d9793699e2be8272af\exprtk-populate.rule”的自定义生成已退出,代码为 1。 [D:\ogs\new-build\_deps\exprtk-subbuild\exprtk-populate.vcxproj]

CMake Error at D:/cmake/share/cmake-3.21/Modules/FetchContent.cmake:1017 (message):
  Build step for exprtk failed: 1
Call Stack (most recent call first):
  D:/cmake/share/cmake-3.21/Modules/FetchContent.cmake:1146:EVAL:2 (__FetchContent_directPopulate)
  D:/cmake/share/cmake-3.21/Modules/FetchContent.cmake:1146 (cmake_language)
  scripts/cmake/CPM.cmake:850 (FetchContent_Populate)
  scripts/cmake/CPM.cmake:670 (cpm_fetch_package)
  scripts/cmake/Dependencies.cmake:51 (CPMAddPackage)
  CMakeLists.txt:76 (include)


-- Configuring incomplete, errors occurred!
See also "D:/ogs/new-build/CMakeFiles/CMakeOutput.log".
See also "D:/ogs/new-build/CMakeFiles/CMakeError.log".

D:\ogs\new-build>

it has just the same mistake I have mentioned in the original post. Now I reconfigure it in the former successful build directory and there are the whole command line output:
Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19043.

CPM: adding package cmake-modules@0 (d98828f54f6974717798e63195cfbf08fe2daad0)

CPM: adding package json-cmake@0 (9708cb091f6b89b94d71ae98f8b9e68ea04c47dd)

fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.

Use '--' to separate paths from revisions, like this:

'git <command> [<revision>...] -- [<file>...]'

fatal: bad revision 'HEAD'

CMake Warning at scripts/cmake/GitSetup.cmake:113 (message):
Git repository contains no tags! Please run: git fetch --tags
Call Stack (most recent call first):
CMakeLists.txt:65 (include)

fatal: your current branch 'master' does not have any commits yet

fatal: your current branch 'master' does not have any commits yet

Number of (logical) cores: 8, Free memory: 19532 MB

Job pool light_tasks using 8 cores.

Job pool heavy_tasks using 4 cores.

Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)

Could NOT find TIFF (missing: TIFF_LIBRARY TIFF_INCLUDE_DIR)

Could NOT find GEOTIFF (missing: libgeotiff_LIBRARY libgeotiff_INCLUDE_DIR xtiff_INCLUDE_DIR TIFF_FOUND)

CPM: adding package googletest@1.11.0 (release-1.11.0)

CPM: adding package autocheck@0 (e388ecbb31c49fc2724c8d0436da313b6edca7fd)

CPM: adding package exprtk@0 (772884eb09eb648808a5151a077faf97fa127426)

CPM: adding package spdlog@1.8.2 (v1.8.2)

Build spdlog: 1.8.2

Build type: Debug

CPM: adding package tclap@1.2.4 (098dd0fe07a31618f3c2a9f8727bb01c8c5d61e2)

CPM: adding package tetgen@0 (603ba181ebfaed38eec88532720e282606009b73)

CPM: adding package pybind11@0 (f1abf5d9159b805674197f6bc443592e631c9130)

pybind11 v2.6.1

CPM: adding package iphreeqc@0 (b1047d3eb03e7ef1b850231be35acb9c6a2cf345)

CPM: adding package Eigen3@3.3.9 (3.3.9)

CPM: adding package Boost@1.69.0 (1.69.0)

CPM: adding package LibXml2@2.9.12 (v2.9.12)

CPM: adding package xmlpatch@0.4.2 (v0.4.2)

CPM: adding package ZLIB@1.2.11 (v1.2.11)

CMake Deprecation Warning at bulid/_deps/zlib-src/CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.

Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.

CPM: adding package HDF5@1.10.5 (hdf5-1_10_5)

SOVERSION: 103.1.0

SOVERSION_TOOLS: 100.1.2

SOVERSION_CXX: 103.1.0

SOVERSION_F: 102.0.0

SOVERSION_HL: 100.1.2

SOVERSION_HL_CXX: 100.1.3

SOVERSION_HL_F: 100.0.4

SOVERSION_JAVA: 100.4.0

Checking for InitOnceExecuteOnce:

Warnings Configuration:

CMake Warning (dev) at bulid/_deps/hdf5-src/CMakeLists.txt:746 (set):
implicitly converting 'INTEGER' to 'STRING' type.
This warning is for project developers. Use -Wno-dev to suppress it.

CPM: adding package SWMMInterface@0 (141e05ae1f419918799d7bf9178ebcd97feb1ed3)

CPM: adding package nlohmann_json@3.6.1 (3.6.1)

CPM: adding package VTK@8.2.0 (v8.2.0)

CMake Warning (dev) at bulid/_deps/vtk-src/CMake/vtkCompilerPlatformFlags.cmake:125 (set):
implicitly converting '8' to 'STRING' type.
Call Stack (most recent call first):
bulid/_deps/vtk-src/CMakeLists.txt:46 (include)
This warning is for project developers. Use -Wno-dev to suppress it.

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;vtkFiltersSMP;vtkFiltersSelection;vtkFiltersSources;vtkFiltersStatistics;vtkFiltersTexture;vtkFiltersTopology;vtkFiltersVerdict;vtkIOAMR;vtkIOAsynchronous;vtkIOCityGML;vtkIOCore;vtkIOEnSight;vtkIOExodus;vtkIOGeometry;vtkIOImage;vtkIOImport;vtkIOInfovis;vtkIOLSDyna;vtkIOLegacy;vtkIOMINC;vtkIOMovie;vtkIONetCDF;vtkIOPLY;vtkIOParallel;vtkIOParallelXML;vtkIOSQL;vtkIOSegY;vtkIOTecplotTable;vtkIOVeraOut;vtkIOVideo;vtkIOXML;vtkIOXMLParser;vtkImagingColor;vtkImagingCore;vtkImagingFourier;vtkImagingGeneral;vtkImagingHybrid;vtkImagingMath;vtkImagingMorphological;vtkImagingSources;vtkImagingStatistics;vtkImagingStencil;vtkInfovisCore;vtkInfovisLayout;vtkParallelCore

Group MPI modules: vtkDomainsParallelChemistry;vtkFiltersParallelGeometry;vtkFiltersParallelMPI;vtkFiltersParallelVerdict;vtkIOMPIImage;vtkIOMPIParallel;vtkIOParallelNetCDF;vtkParallelMPI

Group Imaging modules: vtkFiltersImaging;vtkImagingColor;vtkImagingFourier;vtkImagingGeneral;vtkImagingHybrid;vtkImagingMath;vtkImagingMorphological;vtkImagingSources;vtkImagingStatistics;vtkImagingStencil;vtkInteractionImage;vtkRenderingImage

Group Qt modules: vtkGUISupportQt;vtkGUISupportQtSQL;vtkRenderingQt;vtkViewsQt

Group Rendering modules: vtkGeovisCore;vtkIOExport;vtkIOExportPDF;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

Backend OpenGL2 modules: vtkDomainsChemistryOpenGL2;vtkIOExportOpenGL2;vtkImagingOpenGL2;vtkRenderingContextOpenGL2;vtkRenderingGL2PSOpenGL2;vtkRenderingLICOpenGL2;vtkRenderingOpenGL2;vtkRenderingOpenVR;vtkRenderingVolumeOpenGL2

Enabling modules for OpenGL2.

CMake Deprecation Warning at bulid/_deps/vtk-src/Utilities/KWIML/vtkkwiml/CMakeLists.txt:20 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.

Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.

CMake Deprecation Warning at bulid/_deps/vtk-src/Utilities/KWSys/vtksys/CMakeLists.txt:84 (CMAKE_MINIMUM_REQUIRED):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.

Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.

CPM: adding package vtkdiff@0 (8b7bfce2f2302263c9fdc0201f765e375c8a8a36)

CPM: adding package CPMLicenses.cmake@0.0.5 (v0.0.5)

CPM: adding package GroupSourcesByFolder.cmake@1.0 (v1.0)

time-command is required for time wrapper but was not found! All corresponding tests are disabled.

Valgrind is required for memcheck wrapper but was not found! All corresponding tests are disabled.

Valgrind is required for callgrind wrapper but was not found! All corresponding tests are disabled.

mpirun is required for mpirun wrapper but was not found! All corresponding tests are disabled.

diff-command is required for diff tester but was not found! All corresponding tests are disabled.

grep-command is required for memcheck tester but was not found! All corresponding tests are disabled.

Install Python: D:/python/python3.dll;D:/python/python37.dll;D:/python/vcruntime140.dll

CPM: adding package metis@0 (982842a5ace9b3da2b2800817eb9e5fd3b42966b)

The METIS package is copyrighted by the Regents of the University of Minnesota.

Please read the license of the METIS package carefully before you use the METIS.

Warning: Benchmark HeatTransportBHE_3D_3BHEs_array requires these Python packages: TESPy=0.3.2!

Make sure to have them installed in your current Python environment OR install the Poetry package manager for Python!

Warning: Benchmark HeatTransportBHE_1U_3D_beier_sandbox_server_communication requires these Python packages: pandas!

Make sure to have them installed in your current Python environment OR install the Poetry package manager for Python!

Warning: Benchmark HeatTransportBHE_3D_3BHEs_array_server_communication requires these Python packages: TESPy=0.3.2!

Make sure to have them installed in your current Python environment OR install the Poetry package manager for Python!

The following packages have been found:

* Python3 (required version >= 3.6)

* OpenMP

* Filesystem

* Python

* LibXml2

* Threads

-- The following features have been enabled:

* OGS, The OGS simulator (OGS_BUILD_CLI)

* Utilities, Command line tools (OGS_BUILD_UTILS)

* Python-interface, Python boundary conditions and source terms (OGS_USE_PYTHON)

* Tests, Unit and benchmarks tests (OGS_BUILD_TESTING)

* build-unity, Unity build (OGS_USE_UNITY_BUILDS)

Configuring done

I am afraid that the output may be too long to read… So can you find some mistakes?

Ah ok! Usually you have to press configure two-times and then Generate becomes available. I did not mean to press it until it works… :wink:

Thanks for the full output!

Looks like your source code repository is corrupted.

Again, this has to work. Otherwise you do not get the required dependencies. Please check network / firewall settings.

Thanks for your careful inspection! the error

Failed to clone repository: 'https://github.com/ArashPartow/exprtk.git'

occurs during the configuration only in my new clean build directory, right? But in my origin successful configuration build directory whose cmake command line output is the second text I attached, I guess the exprtk is downloaded successfully, right? So maybe the reason for my failure of building projects in Visual studio 2019 is that my source code repository is corrupted?
By the way, the sourced code repository you mentioned is the ogs git repository, or a new repository I build by myself in the gitlab/github?
I will be thankful if you can give me some advice.

I am talking about your local ogs git repository (the ogs-folder). Maybe you should clone it again.

The git clone errors need to be fixed first. For this I cannot help.

If this is fixed then a cmake run in a clean build-directory should work. If not send me the command line output.

Hi bilke,
following your advice, I clone the ogs git repository again in a new directory. I use the git clone command in Git Bash GUI to download it and it succeeded, so I think git clone can be conducted in my machine… However, when I tried to build configuration again, the git clone error also happened as some packages cannot be downloaded. Every time the configuration fails, I press configure again, in the next try the package that didn’t download well last time may download well this time, but the next package may has clone errors again…That’s so weird because I just git clone ogs git repository without errors… Here are cmake command line output in my last try:

  Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19043.

  CPM: adding package cmake-modules@0 (d98828f54f6974717798e63195cfbf08fe2daad0)
  CPM: adding package json-cmake@0 (9708cb091f6b89b94d71ae98f8b9e68ea04c47dd)
  OGS VERSION: 6.4.1-79-g69a299602 (reported by git)
  Number of (logical) cores: 8, Free memory: 23715 MB
  Job pool light_tasks using 8 cores.
  Job pool heavy_tasks using 5 cores.
  Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) 
  Could NOT find TIFF (missing: TIFF_LIBRARY TIFF_INCLUDE_DIR) 
  Could NOT find GEOTIFF (missing: libgeotiff_LIBRARY libgeotiff_INCLUDE_DIR 
  xtiff_INCLUDE_DIR TIFF_FOUND) 
  CPM: adding package googletest@1.11.0 (release-1.11.0)
  CPM: adding package autocheck@0 (e388ecbb31c49fc2724c8d0436da313b6edca7fd)
  CPM: adding package exprtk@0 (772884eb09eb648808a5151a077faf97fa127426)
  CPM: adding package spdlog@1.8.2 (v1.8.2)
  Build spdlog: 1.8.2
  Build type: Debug
  CPM: adding package tclap@1.2.4 (098dd0fe07a31618f3c2a9f8727bb01c8c5d61e2)
  用于 .NET Framework 的 Microsoft (R) 生成引擎版本 16.9.0+57a23d249
  版权所有(C) Microsoft Corporation。保留所有权利。

  Performing download step (git clone) for 'tclap-populate'
  Cloning into 'tclap-src'...
  fatal: unable to access 'https://github.com/ufz/tclap.git/': Failed to connect to github.com port 443: Timed out
  Cloning into 'tclap-src'...
  fatal: unable to access 'https://github.com/ufz/tclap.git/': Failed to connect to github.com port 443: Timed out
  Cloning into 'tclap-src'...
  fatal: unable to access 'https://github.com/ufz/tclap.git/': Failed to connect to github.com port 443: Timed out
  -- Had to git clone more than once:
  CMake Error at tclap-subbuild/tclap-populate-prefix/tmp/tclap-populate-gitclone.cmake:31 (message):
            3 times.
    Failed to clone repository: 'https://github.com/ufz/tclap.git'
  
  
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(240,5): error MSB8066: “E:\ogs-source-code\build-release\_deps\tclap-subbuild\CMakeFiles\bf76bc4cc4e5f2c5919627b47dd5a7aa\tclap-populate-download.rule;E:\ogs-source-code\build-release\_deps\tclap-subbuild\CMakeFiles\bf76bc4cc4e5f2c5919627b47dd5a7aa\tclap-populate-update.rule;E:\ogs-source-code\build-release\_deps\tclap-subbuild\CMakeFiles\bf76bc4cc4e5f2c5919627b47dd5a7aa\tclap-populate-patch.rule;E:\ogs-source-code\build-release\_deps\tclap-subbuild\CMakeFiles\bf76bc4cc4e5f2c5919627b47dd5a7aa\tclap-populate-configure.rule;E:\ogs-source-code\build-release\_deps\tclap-subbuild\CMakeFiles\bf76bc4cc4e5f2c5919627b47dd5a7aa\tclap-populate-build.rule;E:\ogs-source-code\build-release\_deps\tclap-subbuild\CMakeFiles\bf76bc4cc4e5f2c5919627b47dd5a7aa\tclap-populate-install.rule;E:\ogs-source-code\build-release\_deps\tclap-subbuild\CMakeFiles\bf76bc4cc4e5f2c5919627b47dd5a7aa\tclap-populate-test.rule;E:\ogs-source-code\build-release\_deps\tclap-subbuild\CMakeFiles\6c8a6f0a1393e51024b0424b25d3ac02\tclap-populate-complete.rule;E:\ogs-source-code\build-release\_deps\tclap-subbuild\CMakeFiles\6917b666fea5ec25b6da3b6672cd4b84\tclap-populate.rule”的自定义生成已退出,代码为 1。 [E:\ogs-source-code\build-release\_deps\tclap-subbuild\tclap-populate.vcxproj]

CMake Error at D:/cmake/share/cmake-3.21/Modules/FetchContent.cmake:1017 (message):
  Build step for tclap failed: 1
Call Stack (most recent call first):
  D:/cmake/share/cmake-3.21/Modules/FetchContent.cmake:1146:EVAL:2 (__FetchContent_directPopulate)
  D:/cmake/share/cmake-3.21/Modules/FetchContent.cmake:1146 (cmake_language)
  E:/ogs-source-code/build-release/cmake/CPM_0.32.1.cmake:753 (FetchContent_Populate)
  E:/ogs-source-code/build-release/cmake/CPM_0.32.1.cmake:581 (cpm_fetch_package)
  E:/ogs-source-code/build-release/cmake/CPM_0.32.1.cmake:258 (CPMAddPackage)
  scripts/cmake/Dependencies.cmake:64 (CPMFindPackage)
  CMakeLists.txt:76 (include)


Configuring incomplete, errors occurred!
See also "E:/ogs-source-code/build-release/CMakeFiles/CMakeOutput.log".
See also "E:/ogs-source-code/build-release/CMakeFiles/CMakeError.log".

Hi bilke,
I am glad that I finally build the ogs.exe! I try to click configure every time the cmake run fails. Although there are some git clone errors, enough trys can make the needed packages all installed. I can’t solve the firewall problem yet but I think the result is the same as that with only one successful try. Then I open the OGS-6.sln and successfully build the ogs.exe. Remember the uninstalled Boost package we mentioned before? I have found the reason. In the configuration process a CPM will be downloaded automatically, but in the beginning CPM.cmake can’t be download so I downloaded it by myself and added it into the soure code files. This made a version error of the boost package, so the ogs.cpp can’t open the included boost repository. Maybe the ogs git repository is downloaded by ‘‘git clone’’ command this time, CPM.cmake has been downloaded automatically well so all the packages are right.
Thank you for your guidance again and that’s a precious lesson for my ogs development!

1 Like

I am super glad that you finally made it to work!

Dear @bilke

When I compiled OGS6 using CMake to enable OGS_USE_MKL, I encountered a very similar problem shown in this post, would you mind sharing your valuable suggestions to solve this error? Thanks!

Please fill in all details as stated in Get support / fill a bug report, otherwise we cannot help.

Dear @bilke

Thanks for your reply very much! I apologize that I didn’t provide enough information in this post. I created a new post to elaborate on my question, please refer to CMake error during configuring OGS6, which should be more clear to you.

Looking forward to your advice! Thanks!
Rui