[Met_help] help compiling METv1.1

John Halley Gotway johnhg at rap.ucar.edu
Mon Mar 16 07:28:46 MDT 2009


Julie,

This is the first I've seen this particular compilation error message show up.  And looking at it, I'm really surprised it hasn't shown up before.

In the file "METv1.1/lib/vx_data_grids/src/exp_grid.cc" we're using the "exit" function.  However, we're not including the header which contains the definition for "exit".

Please try the following:
(1) Open up the file ""METv1.1/lib/vx_data_grids/src/exp_grid.cc" for editing.
(2) After the line: #include <iostream>
    Add the line:   #include <stdlib.h>
(3) Try recompiling MET.

If that gets you past the compilation error message from "exp_grid.cc", then that's the fix.  You'll likely need to add that line to other files in that directory as well, such as:
exp_grid.cc, lc_grid.cc, pc_grid.cc, st_grid.cc.

Please let me know how it goes, and if this fixes the problem you're seeing.  This problem with include files may show up in other places as well during the compilation process.  If you're able to let
me know which files you had to modify to get it to compile, I'll make sure they're fixed for the upcoming release of METv2.0 in the next month or so.

Thanks,
John Halley Gotway
johnhg at ucar.edu

Julie Harold wrote:
> Hi,
> 
> I am trying to compile METv1.1, I have added 
> METv1.1_patches_20090212.tar.gz.
> 
> I have x86_64 kernel 2.6.27-11-generic. I am using the following Makefile :
> # Path to GNU Make command
> MAKE = /usr/bin/make
> 
> # Architecture flags
> ARCH_FLAGS =
> 
> # Path to the C++ Compiler
> # C++ compiler flags
> # Any additional required libraries
> CXX = /usr/bin/g++
> CXX_FLAGS = -Wall -Wshadow -static # -g -m32
> CXX_LIBS =
> 
> # Path to the Fortran Compiler
> # Fortran compiler flags
> # Any additional required libraries
> FC = /usr/bin/gfortran
> FC_FLAGS = -Wall -Wshadow -static # -g -m32
> FC_LIBS = # -lgfortran
> 
> # Make print options
> PRINT_OPTS = --no-print-directory
> 
> # Top level directory for the NetCDF library
> # NetCDF include directory specified as: -I/your/include/path
> # NetCDF library directory specified as: -L/your/library/path
> NETCDF_BASE = /usr/local
> NETCDF_INCS = -I$(NETCDF_BASE)/include
> NETCDF_LIBS = -L$(NETCDF_BASE)/lib
> 
> # Top level directory for BUFRLIB
> # BUFRLIB include directory specified as: -I/your/include/path
> # BUFRLIB library directory specified as: -L/your/library/path
> #BUFR_BASE = /pd6/score/MET/MET_releases/external_libs/bufrlib/bufrlib_gnu
> BUFR_BASE = /usr/local
> BUFR_INCS = -I$(BUFR_BASE)/include
> BUFR_LIBS = -L$(BUFR_BASE)/lib
> 
> # Top level directory for the GNU Scientific Library (GSL) if it's not
> # installed in a standard location.
> # GSL include directory specified as: -I/your/include/path
> # GSL library directory specified as: -L/your/library/path
> #GSL_BASE = /usr
> GSL_BASE = /usr/local
> GSL_INCS = -I$(GSL_BASE)/include
> GSL_LIBS = -L$(GSL_BASE)/lib
> 
> # Top level directory for the F2C or G2C Library if it's not installed in a
> # standard location.
> # F2C include directory specified as: -I/your/include/path
> # F2C library directory containing libf2c.a or libg2c.a and specified as:
> # -L/your/library/path
> # Name of the library to be used: -lf2c or -lg2c
> F2C_BASE = /usr/local
> F2C_INCS = -I$(F2C_BASE)/include
> F2C_LIBS = -I$(F2C_BASE)/lib
> #F2C_LIBNAME = -lg2c
> F2C_LIBNAME = -lf2c
> 
> # Optional flags to disable the compilation of MET tools
> # Specify a non-zero value to disable the compilation of the tool
> DISABLE_PCP_COMBINE = 0
> DISABLE_MODE = 0
> DISABLE_GRID_STAT = 0
> DISABLE_PB2NC = 0
> DISABLE_ASCII2NC = 0
> DISABLE_POINT_STAT = 0
> DISABLE_VSDB_ANALYSIS = 0
> DISABLE_MODE_ANALYSIS = 0
> 
> and I am getting this error:
> *** Making vx_data_grids Library ***
> 
> /usr/bin/g++ exp_grid.cc -Wall -Wshadow -static -c -I..
> exp_grid.cc: In member function ‘virtual double 
> ExpGrid::rot_grid_to_earth(int, int) const’:
> exp_grid.cc:265: error: ‘exit’ was not declared in this scope
> exp_grid.cc: In member function ‘virtual double ExpGrid::calc_area(int, 
> int) const’:
> exp_grid.cc:281: error: ‘exit’ was not declared in this scope
> exp_grid.cc: In member function ‘virtual double 
> ExpGrid::calc_area_ll(int, int) const’:
> exp_grid.cc:297: error: ‘exit’ was not declared in this scope
> exp_grid.cc: In function ‘void normalize(double&, double&, double&)’:
> exp_grid.cc:409: error: ‘exit’ was not declared in this scope
> exp_grid.cc: In constructor ‘Grid::Grid(const ExpData&)’:
> exp_grid.cc:520: error: ‘exit’ was not declared in this scope
> make[3]: *** [exp_grid.o] Error 1
> make[2]: *** [vx_data_grids_all] Error 2
> make[1]: *** [libs] Error 2
> make: *** [all] Error 2
> 
> 
> Any advice on where I am going wrong ?
> 
> thanks,
> Julie
> 
> 
> 
> 
> 


More information about the Met_help mailing list