[Met_help] help compiling METv1.1

John Halley Gotway johnhg at rap.ucar.edu
Mon Mar 16 08:26:49 MDT 2009


Julie,

Can you tell me what version of Linux you're running (try typing "uname -a")?  If it's the newest Debian-Lenny release, I can tell you that METv1.1 was released before we were able to test on it.
However, we will be testing on Lenny for the next release, METv2.0.

But to answer you're question, yes, I believe you'll need to step through the compilation errors one-by-one and fix them in order to get METv1.1 to build on your machine with your set of compilers.

One alternative would be to try using a different set of compilers.  Do you, by any chance, have the Portland Group (PGI) compilers available?  If so, you may see fewer compilation issues using them.

Sorry for the inconvenience.  We try to do as much testing on different platforms as we can, but we're pretty limited by funding and availability of machines for testing.  Again, if you're able to
provide a list of the modifications you had to make, I can be sure to include them in METv2.0.

Thanks,
John

Julie Harold wrote:
> Hi John,
> 
> thanks for the advice.  That got past that error - I am now getting
> things like :
> builtin.cc:446: error: ‘strcmp’ was not declared in this scope
> 
> we have already worked through these errors:
> box.cc:223: error: 'memcpy' was not declared in this scope
> mode_job.cc:249: error: 'strcasecmp' was not declared in this scope
> mode_job.cc:492: error: 'memset' was not declared in this scope
> mode_job.cc:874: error: 'memset' was not declared in this scope
> vsdb_job.cc:444: error: 'strcpy' was not declared in this scope
> holiday.cc:143: error: 'exit' was not declared in this scope
> 
> and solved them by adding  #include <cstring>   and #include <cstdlib> 
> - do I need to go through and do that for all of them ?
> 
> Julie
> 
> John Halley Gotway wrote:
>> 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