[Met_help] Re: MET compile problem

John Halley Gotway johnhg at rap.ucar.edu
Tue Feb 3 22:45:09 MST 2009


Ming,

Based on the error messages you sent, the linker doesn't like the NetCDF
library to which you're linking.  Since you're using the PGI compilers to
compile MET, my guess would be that you're linking to a version of NetCDF
that was not built with the PGI compilers.

By default, the NetCDF configure script will NOT use the PGI compilers,
unless you tell it to.  If you think this might be the case, please try
recompiling your NetCDF (3.6.1 or 3.6.2 should both work) library with the
following commands:

In the top-level NetCDF directory,
> make clean
> setenv CC /path/to/pgcc
> setenv CXX /path/to/pgCC
> setenv FC ""
> setenv F90 ""

In these commands, you'll need to provide the paths to the PGI compilers
on your system.  The last two lines will disable the compilation of the
NetCDF fortran interface that MET doesn't use.  Now run the configure
script:

> ./configure --prefix=/users/chenming/netcdf-3.6.2
> make
> make install

This will build NetCDF using the PGI compilers.

Next try to rebuild MET linking to this version of NetCDF.

Hopefully, that'll fix the problem for you.  If you're still experiencing
problems, please send me the top-level MET Makefile you used, a full
compilation log, and information about the operating system and compiler
versions you're using.  That may help me diagnose what's going on.

Thanks and good luck,
John Halley-Gotway
johnhg at ucar.edu

> Dear Sir/Madam,
>
> I am trying to build MET in my Linux machine using pgi compiler. However
> I cannot finish it because of the following problem:
>
> pcp_combine.cc:
>
> *"/users/chenming/netcdf-3.6.1/include/ncvalues.h", line 35: warning:
> integer
>           conversion resulted in a change of sign
>   static const ncbyte ncBad_byte = NC_FILL_BYTE;
>                                    ^
> pcp_combine.o: In function `write_netcdf__FLT1iR10GribRecord':
> pcp_combine.cc:(.text+0x332b): undefined reference to `NcFile::__ct(char
> const *, NcFile::FileMode, unsigned int *, unsig
> ned int, NcFile::FileFormat)'
> pcp_combine.cc:(.text+0x337a): undefined reference to `NcFile::is_valid(
> const(void))'
> pcp_combine.cc:(.text+0x3408): undefined reference to
> `NcFile::close(void)'
> pcp_combine.cc:(.text+0x359e): undefined reference to
> `NcFile::add_att(char const *, char const *)'
> pcp_combine.o:pcp_combine.cc:(.text+0x38fc): more undefined references
> to `NcFile::add_att(char const *, char const *)' f
> ollow
> pcp_combine.o: In function `write_netcdf__FLT1iR10GribRecord':
> pcp_combine.cc:(.text+0x409b): undefined reference to
> `NcFile::add_dim(char const *, long)'
> pcp_combine.cc:(.text+0x4123): undefined reference to
> `NcFile::add_var(char const *, NcType, NcDim const *, NcDim const *
> , NcDim const *, NcDim const *, NcDim const *)'
> pcp_combine.cc:(.text+0x4220): undefined reference to
> `NcVar::add_att(char const *, char const *)'
>
> *I have tried various netcdf library (netcdf-3.5.0, netcdf-3.6.1,
> netcdf-3.6.2). All have the same problem.  It will be highly appreciated
> if you can get back to me quickly. Thanks in advance.
> *
> Ming
>
> *
>
> --
> Dr. Ming Chen
> Earth & Sun System Laboratory
> National Center for Atmopsheric Research
> FL3, Room 3081
> Phone: (303) 497 8196
> Boulder, Co 80307
>
>




More information about the Met_help mailing list