[Met_help] Problems with compiling pb2nc

John Halley Gotway johnhg at ucar.edu
Fri Apr 23 09:56:53 MDT 2010


Dave,

I've actually been able to compile MET using 64-bit GNU compilers and run without experiencing runtime issues from PB2NC.  I've done this on Debian Linux (lenny release) running GCC version 4.3.2.  I
see that you're running GCC version 3.4.6 on a Redhat machine.  Unfortunately, I'm not entirely sure on all the issues involved in this.  So I can't tell you if you'll be successful compiling MET as
64-bit on your machine.

But I do think it's worth a shot.

Please check to see if you have gfortran available.  If so, I'd suggest using that instead of g77.  When using gfortran you do NOT need to compile the "f2c" library - instead, the "-ff2c" option to
gfortran accomplishes the same thing.  So you can empty out all the F2C lines in the Makefile.

I've attached a copy of the MET Makefile I used to compile it on a 64-bit machine.  Please let me know how it goes.  I'm happy to help you guys try to debug this an get it compiled.

Regarding those specific error messages you're seeing, it looks like the linker is looking for some 64-bit libraries.  When you build MET, it links to several libraries: NetCDF, BUFRLIB, GSL, and F2C
(only necessary for g77).  And when trying to build a 32-bit version of MET, those libraries need to be built as 32-bit as well.  Since you're only seeing this issue with PB2NC, I'd guess that there
are inconsistencies with BUFRLIB or F2C, and that's causing the compilation errors you're seeing.  Getting all those built as 32-bit may be a little difficult.  That's why I'd suggest trying to build
as 64-bit using gfortran, and hope it goes more smoothly.

Once it does compile, do be sure to go into the scripts directory and run the test scripts.  In particular, running "test_pb2nc.sh" will tell you whether there are any runtime issues.

Please let me know how it goes and if there's any other help you need.

John

David.Radell at noaa.gov wrote:
> Hey John,
> 
> I am having problems compiling pb2nc in 32-bit on a 64-bit RH machine. The errors I get are below.  When I comment out pb2nc in the makefile and recompile, all 9 other MET programs are compiled without error.  It seems to me that it's trying to use gcc-64 in the compilation instead of something different (/usr/bin/gcc is never defined in the makefile or as an environmental variable).  Any ideas?
> 
> Thanks,
> 
> Dave
> 
> *** Finished Making grid_stat application ***
> 
> 
> *** Making pb2nc application ***
> 
> /usr/bin/g++34 -c pb2nc_Conf.cc -Wall -Wshadow -static -g -m32  \
>         -I../../lib
> /usr/bin/g77 -c numpbmsg.f -Wall -Wshadow -static -g -m32
> /usr/bin/g77 -c openpb.f -Wall -Wshadow -static -g -m32
> /usr/bin/g77 -c readpb.f -Wall -Wshadow -static -g -m32
> /usr/bin/g77 -c dumppb.f -Wall -Wshadow -static -g -m32
> 
> 
> /usr/bin/g++34 -o pb2nc pb2nc.cc pb2nc_Conf.o numpbmsg.o openpb.o readpb.o dumppb.o \
>         -Wall -Wshadow -static -g -m32  -DMET_BASE=\"/home/wrfuser/METv2.0\" \
>         -I../../lib -I/home/wrfuser/METv2.0/lib/external_libs/netcdf3/include -I/home/wrfuser/METv2.0/lib/external_libs/gsl-1.9/include -I/home/wrfuser/METv2.0/lib/external_libs/BUFRLIB/include -I/home/wrfuser/METv2.0/lib/external_libs/f2c \
>         -L../../lib -L/home/wrfuser/METv2.0/lib/external_libs/netcdf3/lib -L/home/wrfuser/METv2.0/lib/external_libs/gsl-1.9/lib -L/home/wrfuser/METv2.0/lib/external_libs/BUFRLIB/lib -l/home/wrfuser/METv2.0/lib/external_libs/f2c \
>         -lbufr -lvx_pb_util \
>         -lvx_met_util -lvx_analysis_util -lvx_wrfdata -lvx_met_util \
>         -lvx_contable -lvx_grib_classes \
>         -lvx_econfig -lvx_gsl_prob -lgsl \
>         -lvx_plot_util  -lvx_render -lvx_pxm -lvx_color -lvx_ps -lvx_afm \
>         -lvx_data_grids -lvx_gnomon -lvx_nav -lvx_cal -lvx_util -lvx_math -lm \
>         -lnetcdf_c++ -lnetcdf \
>         -lf2c
> In file included from /usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../include/c++/3.4.6/iosfwd:48,
>                  from /usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../include/c++/3.4.6/ios:44,
>                  from /usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../include/c++/3.4.6/ostream:45,
>                  from /usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../include/c++/3.4.6/iostream:45,
>                  from pb2nc.cc:45:
> /usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../include/c++/3.4.6/cctype:68: error: `::isalnum' has not been declared
> /usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../include/c++/3.4.6/cctype:69: error: `::isalpha' has not been declared
> /usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../include/c++/3.4.6/cctype:70: error: `::iscntrl' has not been declared
> /usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../include/c++/3.4.6/cctype:71: error: `::isdigit' has not been declared
> /usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../include/c++/3.4.6/cctype:72: error: `::isgraph' has not been declared
> /usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../include/c++/3.4.6/cctype:73: error: `::islower' has not been declared
> /usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../include/c++/3.4.6/cctype:74: error: `::isprint' has not been declared
> /usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../include/c++/3.4.6/cctype:75: error: `::ispunct' has not been declared
> /usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../include/c++/3.4.6/cctype:76: error: `::isspace' has not been declared
> /usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../include/c++/3.4.6/cctype:77: error: `::isupper' has not been declared
> /usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../include/c++/3.4.6/cctype:78: error: `::isxdigit' has not been declared
> /usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../include/c++/3.4.6/cctype:79: error: `::tolower' has not been declared
> /usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../include/c++/3.4.6/cctype:80: error: `::toupper' has not been declared
> In file included from /usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../include/c++/3.4.6/bits/locale_facets.h:132,
>                  from /usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../include/c++/3.4.6/bits/basic_ios.h:44,
>                  from /usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../include/c++/3.4.6/ios:51,
>                  from /usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../include/c++/3.4.6/ostream:45,
>                  from /usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../include/c++/3.4.6/iostream:45,
>                  from pb2nc.cc:45:
> /usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../include/c++/3.4.6/x86_64-redhat-linux/bits/ctype_base.h:45: error: `_ISupper' was not declared in this scope
> /usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../include/c++/3.4.6/x86_64-redhat-linux/bits/ctype_base.h:46: error: `_ISlower' was not declared in this scope
> /usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../include/c++/3.4.6/x86_64-redhat-linux/bits/ctype_base.h:47: error: `_ISalpha' was not declared in this scope
> /usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../include/c++/3.4.6/x86_64-redhat-linux/bits/ctype_base.h:48: error: `_ISdigit' was not declared in this scope
> /usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../include/c++/3.4.6/x86_64-redhat-linux/bits/ctype_base.h:49: error: `_ISxdigit' was not declared in this scope
> /usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../include/c++/3.4.6/x86_64-redhat-linux/bits/ctype_base.h:50: error: `_ISspace' was not declared in this scope
> /usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../include/c++/3.4.6/x86_64-redhat-linux/bits/ctype_base.h:51: error: `_ISprint' was not declared in this scope
> /usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../include/c++/3.4.6/x86_64-redhat-linux/bits/ctype_base.h:52: error: `_ISalpha' was not declared in this scope
> /usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../include/c++/3.4.6/x86_64-redhat-linux/bits/ctype_base.h:52: error: `_ISdigit' was not declared in this scope
> /usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../include/c++/3.4.6/x86_64-redhat-linux/bits/ctype_base.h:52: error: `_ISpunct' was not declared in this scope
> /usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../include/c++/3.4.6/x86_64-redhat-linux/bits/ctype_base.h:53: error: `_IScntrl' was not declared in this scope
> /usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../include/c++/3.4.6/x86_64-redhat-linux/bits/ctype_base.h:54: error: `_ISpunct' was not declared in this scope
> /usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../include/c++/3.4.6/x86_64-redhat-linux/bits/ctype_base.h:55: error: `_ISalpha' was not declared in this scope
> /usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../include/c++/3.4.6/x86_64-redhat-linux/bits/ctype_base.h:55: error: `_ISdigit' was not declared in this scope
> make[3]: *** [pb2nc] Error 1
> make[2]: *** [all] Error 2
> make[1]: *** [targets] Error 2
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Makefile
Url: http://mailman.ucar.edu/pipermail/met_help/attachments/20100423/21caaa1d/attachment.pl 


More information about the Met_help mailing list