Scheduled Downtime
On Friday 21 April 2023 @ 5pm MT, this website will be down for maintenance and expected to return online the morning of 24 April 2023 at the latest

(SOLVED) WRF Compiling problem cc

This post was from a previous version of the WRF&MPAS-A Support Forum. New replies have been disabled and if you have follow up questions related to this post, then please start a new thread from the forum home page.

Westley2010

New member
Hi . Hi group! I'm compiling WRF4.2. .I followd the online toturial, and passed all the test. While the compiling can't finished, and the error is
C compiler for the model source code:
which CC
make: *** [Makefile:72: configcheck] Error 1
I appreciate any help you can give me.
 

Attachments

  • log.compile
    1.2 KB · Views: 103
If you run `which cc` on the machine you are trying to install WRF on, what is the result you get? There's a chance you don't have a C compiler installed or loaded.
 
Hello,
I have the same problem as seen on the screen :
Fortran compiler for the model source code:
which FC
Will use 'time' to report timing information

C compiler for the model source code:
which CC
make: *** [Makefile:72 : configcheck] Erreur 1

Now, it seems that the gcc compiler is correctly installed :

wrf@ubuntu:~$ which gcc
/usr/bin/gcc
wrf@ubuntu:~$ which cc
/usr/bin/cc
wrf@ubuntu:~$

Additionnal info :

wrf@ubuntu:~$ gcc --version
gcc (Ubuntu 10.2.0-5ubuntu1~20.04) 10.2.0
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

wrf@ubuntu:~$ cc --version
cc (Ubuntu 10.2.0-5ubuntu1~20.04) 10.2.0
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

What could be the problem ?

Thank you
 
Hi alainF,
It looks like you also posted your problem here:
https://forum.mmm.ucar.edu/phpBB3/viewtopic.php?f=37&t=9243&p=18138#p18138
and that it was solved.
 
Hello,
Yes it was related to that.
But also, since the latest release of ubuntu20 comes with gcc-9, I had to install gcc-10 and make an alternative to select gcc-10 in the list of all the compilers installed on my system. But I needed to do it for gfortran and also for cpp. I must admit that, at a certain point, I might have forgotten one of these. But now it is working.
By the way, binaries produced by gcc-10 are 25% faster than binaries from gcc-9. So the effort is worth doing it.
 
For anyone still struggling with this:

If you're using bash check that the environment variables you load are exported with quotes.

For example:

Code:
export CC="gcc"

instead of

Code:
export CC=gcc

This got rid of the makefile:72 error for me.
 
Top