geoschem/GCHP

error about compile

cugxiongjiajun opened this issue · 5 comments

Name and Institution (Required)

Name:JIAJUNXIONG
Institution:CUG

Confirm you have reviewed the following documentation

Description of your issue or question

When I execute cmak .. in the build directory. When you run a command, you always get an error:
**### CMake Error at CMakeLists.txt:84 (include):
include could not find requested file:

esma

CMake Error at CMakeLists.txt:87 (ecbuild_declare_project):
Unknown CMake command "ecbuild_declare_project".**
**
Then I looked at lines 84 and 87 of CMakeLists.txt, which read as follows:
**# Include ESMA macros
include(esma)

Declare ecbuild project

ecbuild_declare_project()**

Please provide as much detail as possible. Always include the GCHP version number and any relevant configuration and log files.

CCHP --version 13.4.0
cmake --version 3.28.1

Hi @cugxiongjiajun, please detail all steps you took to download and build the model. Did you run git submodule update --init --recursive after download? It is not clear from your description where the problem may be happening.

Hello, thank you for your answer! Here are my download compilation steps:
① Instead of using git to download, I downloaded the 13.4.0.zip file.
②mkdir build
③cmake ..

error:

CMake Error at CMakeLists.txt:84 (include):
include could not find requested file:

esma

CMake Error at CMakeLists.txt:87 (ecbuild_declare_project):
Unknown CMake command "ecbuild_declare_project".

-- The Fortran compiler identification is GNU 10.2.0
-- The CXX compiler identification is GNU 10.2.0
-- The C compiler identification is GNU 10.2.0
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Check for working Fortran compiler: /home/jjxiong/spack/opt/spack/linux-centos7-x86_64/gcc-4.8.5/gcc-10.2.0-ymzkw6f3dyo775cboy3ftde7wfqxpm6h/bin/gfortran - skipped
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /home/jjxiong/spack/opt/spack/linux-centos7-x86_64/gcc-4.8.5/gcc-10.2.0-ymzkw6f3dyo775cboy3ftde7wfqxpm6h/bin/g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /home/jjxiong/spack/opt/spack/linux-centos7-x86_64/gcc-4.8.5/gcc-10.2.0-ymzkw6f3dyo775cboy3ftde7wfqxpm6h/bin/gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
CMake Error at CMakeLists.txt:84 (include):
include could not find requested file:

esma

CMake Error at CMakeLists.txt:87 (ecbuild_declare_project):
Unknown CMake command "ecbuild_declare_project".

-- Configuring incomplete, errors occurred!
@lizziel

Hi @cugxiongjiajun, please follow the instructions for downloading and building GCHP that are in the GCHP ReadTheDocs Quickstart Guide. The zip file of the source contains the code for the GCHP repository and does not contain code for the submodules within it. You therefore will not be able to compile it.

Hi @lizziel ,Thank you for your reply, I already know how to deal with this problem, this problem can be closed now.