Score:3

make command gives error during installation of SURFEX code

do flag

I need to install and compile SURFEX code on Ubuntu 18.04. To do that I'm following the docs here. This went well until I tried to compile the master version of the code with make. I got Error 127. I looked up the meaning of this error, but I don't really understand what it means in this context. Any help greatly appreciated.

The full message is as follows

[ ! -d /home/sarah/MYDIR/open_surfex_v8_1_20210914/open_SURFEX_V8_1/src/LIB/eccodes-2.18.0-LXgfortran-build ] && mkdir -p /home/sarah/MYDIR/open_surfex_v8_1_20210914/open_SURFEX_V8_1/src/LIB/eccodes-2.18.0-LXgfortran-build
Makefile:422: recipe for target '/home/sarah/MYDIR/open_surfex_v8_1_20210914/open_SURFEX_V8_1/src/LIB/eccodes-2.18.0-Source-LXgfortran/include/grib_api.mod' failed
make: [/home/sarah/MYDIR/open_surfex_v8_1_20210914/open_SURFEX_V8_1/src/LIB/eccodes-2.18.0-Source-LXgfortran/include/grib_api.mod] Error 1 (ignored)
cd /home/sarah/MYDIR/open_surfex_v8_1_20210914/open_SURFEX_V8_1/src/LIB/eccodes-2.18.0-LXgfortran-build && \
cmake /home/sarah/MYDIR/open_surfex_v8_1_20210914/open_SURFEX_V8_1/src/LIB/eccodes-2.18.0-Source -DCMAKE_INSTALL_PREFIX=/home/sarah/MYDIR/open_surfex_v8_1_20210914/open_SURFEX_V8_1/src/LIB/eccodes-2.18.0-Source-LXgfortran -DBUILD_SHARED_LIBS=ON \
-DENABLE_NETCDF=OFF -DENABLE_JPG=OFF -DENABLE_PYTHON=OFF -DENABLE_EXAMPLES=OFF \
-DCMAKE_Fortran_COMPILER=f77 -DCMAKE_C_COMPILER=mpicc \
-DCMAKE_Fortran_FLAGS= -DCMAKE_C_FLAGS= && \
make && make install && make clean
/bin/sh: 2: cmake: not found
Makefile:422: recipe for target '/home/sarah/MYDIR/open_surfex_v8_1_20210914/open_SURFEX_V8_1/src/LIB/eccodes-2.18.0-Source-LXgfortran/include/grib_api.mod' failed
make: *** [/home/sarah/MYDIR/open_surfex_v8_1_20210914/open_SURFEX_V8_1/src/LIB/eccodes-2.18.0-Source-LXgfortran/include/grib_api.mod] Error 127
Score:5
zw flag

According to compilation log

/bin/sh: 2: cmake: not found

you have to install the package which provides cmake executable by

sudo apt-get install cmake

The reproducible method of SURFEX installation for Ubuntu 18.04.6 LTS is below:

sudo apt-get install build-essential cmake libopenmpi-dev gfortran git libcurl4-openssl-dev libnetcdf-dev

cd ~/Downloads
wget -c https://www.umr-cnrm.fr/surfex/data/OPEN-SURFEX/open_surfex_v8_1_20210914.tar.gz
tar -xf open_surfex_v8_1_20210914.tar.gz
cd open_SURFEX_V8_1/src
./configure
. ../conf/profile_surfex-LXgfortran-SFX-V8-1-1-MPIAUTO-OMP-O2-X0
make
sudo make installmaster
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.