<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7654.12">
<TITLE>RE: [Met_help] Compilation failed MET v2.0</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<P><FONT SIZE=2>Dear John, thanks for your response. I had tried to compile BUFRLIB with gfortran and gcc, but when I run:<BR>
<BR>
$gfortran -c -DUNDERSCORE -fno-second-underscore *.f *.F<BR>
<BR>
I got:<BR>
<BR>
nemock.f:77.72:<BR>
<BR>
IF(NEMO(I:I).EQ.CHRSET(J:J)) GOTO 10 <BR>
1<BR>
nemock.f:81.72:<BR>
<BR>
10 ENDDO <BR>
2<BR>
Warning: Obsolete: GOTO at (1) jumps to END of construct at (2)<BR>
nvnwin.f:84.16:<BR>
<BR>
INVN(I) = BMISS <BR>
1<BR>
Error: Arithmetic overflow converting REAL(8) to INTEGER(4) at (1)<BR>
stndrd.f:202.72:<BR>
<BR>
GOTO 10 <BR>
1<BR>
stndrd.f:207.72:<BR>
<BR>
10 ENDDO <BR>
2<BR>
Warning: Obsolete: GOTO at (1) jumps to END of construct at (2)<BR>
<BR>
<BR>
and, If I try to build MET, it fails in:<BR>
<BR>
*** Making pcp_combine application ***<BR>
<BR>
<BR>
g++ -o pcp_combine pcp_combine.cc \<BR>
-Wall -Wshadow -static -DMET_BASE=\"/usr/local/METv2.0\" \<BR>
-I../../lib -I/usr/local/include -I/usr/local/include \<BR>
-L../../lib -L/usr/local/lib -L/usr/local/lib \<BR>
-lvx_met_util -lvx_analysis_util -lvx_wrfdata -lvx_met_util \<BR>
-lvx_contable -lvx_grib_classes \<BR>
-lvx_econfig -lvx_gsl_prob -lgsl \<BR>
-lvx_plot_util -lvx_render -lvx_pxm -lvx_color -lvx_ps -lvx_afm \<BR>
-lvx_data_grids -lvx_gnomon -lvx_nav -lvx_cal -lvx_util -lvx_math -lm \<BR>
-lnetcdf_c++ -lnetcdf \<BR>
<BR>
/usr/local/lib/libnetcdf_c++.a(netcdf.o)(.text+0x53a): In function `NcError::set_err(int)':<BR>
/usr/local/gcc-4.2.0/lib/gcc/x86_64-unknown-linux-gnu/4.2.5/../../../../include/c++/4.2.5/bits/char_traits.h:258: undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, long)'<BR>
...<BR>
<BR>
gcc and g++ is v.3.3.3 , while gfortran is v.4.2.5. NETCDF was compiled with gfortran. Moreover, I've patched MET 2.0.<BR>
<BR>
Best regards.<BR>
<BR>
-----Mensaje original-----<BR>
De: John Halley Gotway [<A HREF="mailto:johnhg@ucar.edu">mailto:johnhg@ucar.edu</A>]<BR>
Enviado el: jue 13/05/2010 17:16<BR>
Para: ISMAEL MARIN CARRION<BR>
CC: met_help@ucar.edu<BR>
Asunto: Re: [Met_help] Compilation failed MET v2.0<BR>
<BR>
Isma,<BR>
<BR>
I see by the information you sent that you're using the c++ and f77 compilers. Let me suggest that you instead try using: gcc, g++, and gfortran. Please check if those compilers are available on<BR>
your machine by typing:<BR>
which gcc<BR>
which g++<BR>
which gfortran<BR>
<BR>
If they are available, please try compiling BUFRLIB as follows:<BR>
rm *.o *.a<BR>
gcc -c -DUNDERSCORE *.c<BR>
gfortran -c -DUNDERSCORE -fno-second-underscore *.f *.F<BR>
ar crv libbufr.a *.o<BR>
<BR>
And then in you MET Makefile, set:<BR>
CXX = g++<BR>
FC = gfortran<BR>
<BR>
If you do not have gfortran available on your system, you could use f77 instead. But then you will need to also link to the "f2c" or "g2c" library. That library may already be on your machine<BR>
(libg2c.a or libf2c.a) or you could download/compile it locally. When you compile with gfortran, you do NOT need that library.<BR>
<BR>
Here's a couple of other things to tell you:<BR>
<BR>
(1) You may find the MET Online Tutorial to be helpful:<BR>
<A HREF="http://www.dtcenter.org/met/users/support/online_tutorial/METv2.0/index.php">http://www.dtcenter.org/met/users/support/online_tutorial/METv2.0/index.php</A><BR>
In particular, there is a section on compiling MET:<BR>
<A HREF="http://www.dtcenter.org/met/users/support/online_tutorial/METv2.0/compilation/index.php">http://www.dtcenter.org/met/users/support/online_tutorial/METv2.0/compilation/index.php</A><BR>
<BR>
(2) If you haven't already done so, please retrieve the latest set of patches for METv2.0 from here:<BR>
<A HREF="http://www.dtcenter.org/met/users/support/known_issues/METv2.0/index.php">http://www.dtcenter.org/met/users/support/known_issues/METv2.0/index.php</A><BR>
Just follow the directions in the first section titled "All Recommended Updates".<BR>
<BR>
Please let us know if you continue to experience problems compiling/running MET.<BR>
<BR>
Thanks,<BR>
John Halley Gotway<BR>
met_help@ucar.edu<BR>
<BR>
ISMAEL MARIN CARRION wrote:<BR>
> Dear staff of MET HELP,<BR>
><BR>
> I'm trying to install MET v.2.0. First, I compile BUFRLIB such as:<BR>
><BR>
> In preproc.sh:74 cpp -P -traditional-cpp -D$byte_order $i $bnf<BR>
> It generates wrdlen.g and irev.f<BR>
><BR>
> $ f77 -c -DUNDERSCORE -fno-second-underscore *.f<BR>
><BR>
> $c++ -c -DUNDERSCORE *.c<BR>
> crbmg.c: In function 'void crbmg_(char*, f77int*, f77int*, f77int*)':<BR>
> crbmg.c:73: warning: deprecated conversion from string constant to 'char*'<BR>
> crbmg.c:83: warning: deprecated conversion from string constant to 'char*'<BR>
> crbmg.c:89: warning: deprecated conversion from string constant to 'char*'<BR>
> crbmg.c:106: warning: deprecated conversion from string constant to 'char*'<BR>
> crbmg.c:115: warning: deprecated conversion from string constant to 'char*'<BR>
> crbmg.c:147: warning: deprecated conversion from string constant to 'char*'<BR>
> restd.c: In function 'void restd_(f77int*, f77int*, f77int*, f77int*)':<BR>
> restd.c:85: warning: deprecated conversion from string constant to 'char*'<BR>
> restd.c:86: warning: deprecated conversion from string constant to 'char*'<BR>
> restd.c:98: warning: deprecated conversion from string constant to 'char*'<BR>
><BR>
> $ ar crv /usr/local/lib/libbufr.a *.o<BR>
><BR>
> After this, when I compile MET v2.0 with variables in Makefile:<BR>
> CXX = c++<BR>
> FC = f77<BR>
> BUFR_BASE = /usr/local<BR>
> BUFR_INCS = -I$(BUFR_BASE)/include<BR>
> BUFR_LIBS = -L$(BUFR_BASE)/lib<BR>
> GSL_BASE = /usr/local<BR>
> GSL_INCS = -I$(GSL_BASE)/include<BR>
> GSL_LIBS = -L$(GSL_BASE)/lib<BR>
> F2C_BASE =<BR>
> F2C_INCS =<BR>
> F2C_LIBS =<BR>
> F2C_LIBNAME =<BR>
><BR>
> I get:<BR>
><BR>
> *** Making the Model Evaluation Tools Project ***<BR>
><BR>
> *** Making vx_afm Library ***<BR>
><BR>
> cp libvx_afm.a ../.<BR>
> ...<BR>
><BR>
> cp libvx_wrfmode.a ../.<BR>
><BR>
> *** Making pcp_combine application ***<BR>
><BR>
> *** Finished Making pcp_combine application ***<BR>
> ....<BR>
> *** Making pb2nc application ***<BR>
><BR>
> c++ -o pb2nc pb2nc.cc pb2nc_Conf.o numpbmsg.o openpb.o readpb.o dumppb.o \<BR>
> -Wall -Wshadow -static -DMET_BASE=\"/usr/local/METv2.0\" \<BR>
> -I../../lib -I/usr/local/include -I/usr/local/include -I/usr/local/include \<BR>
> -L../../lib -L/usr/local/lib -L/usr/local/lib -L/usr/local/lib \<BR>
> -lbufr -lvx_pb_util \<BR>
> -lvx_met_util -lvx_analysis_util -lvx_wrfdata -lvx_met_util \<BR>
> -lvx_contable -lvx_grib_classes \<BR>
> -lvx_econfig -lvx_gsl_prob -lgsl \<BR>
> -lvx_plot_util -lvx_render -lvx_pxm -lvx_color -lvx_ps -lvx_afm \<BR>
> -lvx_data_grids -lvx_gnomon -lvx_nav -lvx_cal -lvx_util -lvx_math -lm \<BR>
> -lnetcdf_c++ -lnetcdf \<BR>
> -lgfortran<BR>
> openpb.o(.text+0x35): In function `openpb_':<BR>
> : undefined reference to `f_open'<BR>
> dumppb.o(.text+0x132): In function `dumppb_':<BR>
> : undefined reference to `s_cat'<BR>
> dumppb.o(.text+0x15c): In function `dumppb_':<BR>
> : undefined reference to `f_open'<BR>
> dumppb.o(.text+0x190): In function `dumppb_':<BR>
> : undefined reference to `f_open'<BR>
> ...<BR>
> /usr/local/lib/libbufr.a(valx.o)(.text+0x2f4): In function `valx_':<BR>
> : undefined reference to `e_wsfi'<BR>
> /usr/local/lib/libbufr.a(rjust.o)(.text+0x2e): In function `rjust_':<BR>
> : undefined reference to `s_cmp'<BR>
> /usr/local/lib/libbufr.a(rjust.o)(.text+0x69): In function `rjust_':<BR>
> : undefined reference to `s_cmp'<BR>
> /usr/local/lib/libbufr.a(rjust.o)(.text+0xdd): In function `rjust_':<BR>
> : undefined reference to `s_copy'<BR>
> collect2: ld returned 1 exit status<BR>
> make[3]: *** [pb2nc] Error 1<BR>
> make[2]: *** [all] Error 2<BR>
> make[1]: *** [targets] Error 2<BR>
> make: *** [all] Error 2<BR>
><BR>
> Moreover, I've tested with gfortran (it doesn't compile all .f of BUFRLIB), g++ and gcc with similar or worst results.<BR>
><BR>
><BR>
><BR>
> Best regards and thanks in advance.<BR>
> Ms. Isma Marín Carrión<BR>
><BR>
><BR>
><BR>
> ------------------------------------------------------------------------<BR>
><BR>
> _______________________________________________<BR>
> Met_help mailing list<BR>
> Met_help@mailman.ucar.edu<BR>
> <A HREF="http://mailman.ucar.edu/mailman/listinfo/met_help">http://mailman.ucar.edu/mailman/listinfo/met_help</A><BR>
<BR>
</FONT>
</P>
</BODY>
</HTML>