ICTP / RegCM

ICTP Regional Climate Model
https://www.ictp.it/esp/about
Other
54 stars 42 forks source link

"cru not found" issue #8

Closed devisdevis closed 3 years ago

devisdevis commented 3 years ago

Hello,

I am trying to install this version of RegCM and could not complete the installation on ubuntu. I get this error when I run the "make":

_make all-recursive make[1]: Entering directory '/home/---REGCM/RegCM' Making all in external make[2]: Entering directory '/home/---/REGCM/RegCM/external' rm -f libaerosol.a cru libaerosol.a mo_simpleplumes.o /bin/bash: line 1: cru: command not found make[2]: [Makefile:363: libaerosol.a] Error 127 make[2]: Leaving directory '/home/---/REGCM/RegCM/external' make[1]: [Makefile:398: all-recursive] Error 1 make[1]: Leaving directory '/home/---/REGCM/RegCM' make: *** [Makefile:339: all] Error 2

I had already run the "autoreconf" and the "./configure"

Any help?? Thank you

graziano-giuliani commented 3 years ago

It is the ar program which is missing from the system. Is the binutils package installed?

dpkg -S /usr/bin/ar binutils: /usr/bin/ar

I suggest installing the build-essential package, which should install all the missing bits.

devisdevis commented 3 years ago

Dear Giuliani,

I have the build-essential package installed already, and the ar is installed (see the terminal screenshot). I even tried "AR=ar" before the make, but the error persists.

image

Thank you

devisdevis commented 3 years ago

When I use the RegCM-4.7.1 another error pops up.

image

graziano-giuliani commented 3 years ago

Was the binutil installed before the configure stage? If not, the configure script would not have detected the ar program. Running the configure step on ubuntu I have a line like this one: [....] checking for dlltool... no checking how to associate runtime and link libraries... printf %s\n checking for ar... ar <<<<<------ This one checking for archiver @FILE support... @ checking for strip... strip checking for ranlib... ranlib [....] For the second error, can you please post the gfortran version:

gfortran --version

devisdevis commented 3 years ago

Thank you, Giuliani, The ar issue is solved. I needed to install the binutils (I thought it was part of the build-essential) and the libtool. But the same error I got in running the RegCM-4.7.1 is stopping the "make" process now.


image


I read it is a Fortran version issue but not sure ... My gfortran version on pop os (ubuntu derivated) is: GNU Fortran (Ubuntu 10.3.0-1ubuntu1) 10.3.0

Thank you

graziano-giuliani commented 3 years ago

Ach... new gfortran, new flags.

Can you please try modifying configure.ac file:

diff --git a/configure.ac b/configure.ac
index 8161fdb8..18f3c475 100644
--- a/configure.ac
+++ b/configure.ac
@@ -437,7 +437,7 @@ if test -z "$COMPILER_GNU_TRUE"; then
 #      exit 1
 #    fi
 #  fi
-  FCFLAGS="-fconvert=big-endian -fno-range-check -fPIC"
+  FCFLAGS="-fallow-invalid-boz -fconvert=big-endian -fno-range-check -fPIC"
   OMPFLAGS="-fopenmp"
   CPRDEF="GNU"
   AC_SUBST(FCFLAGS)
devisdevis commented 3 years ago

Top, @graziano-giuliani :+1: thank you very much, it works Many thanks

sh-iz commented 3 years ago

I've tried everything but I'm still facing an issue stating " /bin/bash: cru: command not found " What am I supposed to do?

ps. I've installed binutils too.

Screenshot 2021-06-20 151921
devisdevis commented 3 years ago

@sh-iz, Please check if you have these two packages sudo apt install binutils build-essential

sh-iz commented 3 years ago

@sh-iz, Please check if you have these two packages sudo apt install binutils build-essential

sorry but it still doesn't work. The packages were already installed for me. I don't get whats the issue