[Met_help] Re: MET V1.0 compilation in MAC

John Halley Gotway johnhg at rap.ucar.edu
Tue May 20 11:13:43 MDT 2008


Jagan,

Glad to hear that you were able to get it to work... other than PB2NC.

Regarding your comments... yes, they are all correct:

MET may use either the F2C or G2C library.  If G2C is already available on your machine, go ahead and use that.  If not, you could download the F2C source code and build it locally.  When you do, set 
the F2C_LIBS to the directory containing the file libf2c.a or libg2c.a.  I don't believe that F2C_INCS is actually being referenced in the source code, but go ahead and set it to the directory 
containing f2c.h or g2c.h.  Then, set F2C_LIBNAME to either -lf2c or -lg2c to indicate which library you're using.

Regarding (3), this issue is listed on the "known problems" page on the MET website: http://www.dtcenter.org/met/users/support/known_issues/METv1.0/METv1.0_known_issues.php
As a rule, we have not been updating the tarball with the latest bug fixes.  However, future releases will contain all of the fixes.

Regarding the errors you're getting compiling PB2NC, I'd like to refer you to Lacey Holland, who's also working on MET (and who I've copied on this email).  She has been able to build METv1.0 on her 
Mac and may be able to provide you some advice.  It seems problematic to me that you're not able to compile using the "-static" option.  Instead, you're compiling using "-dynamic".  Lacey, were you 
able to compile on your Mac using "-static" or did the compiler complain about that?  In the error messages from the linker, it looks like there's conflicts between the libgcc_s.10.4.dylib and 
libg2c.0.dylib libraries.

Lacey, did you build MET on your Mac using G2C or F2C?  Jagan, you could try downloading and installing F2C (follow the F2C link from the MET downloads page at 
http://www.dtcenter.org/met/users/downloads/index.php) locally to see if that would help.  Perhaps, you could bypass these library conflicts that way.

Thanks,
John

jagan TNAU wrote:
> Dear John,
> 
> 
> Please recollect my visit to NCAR.
> 
> 
> I was trying to compile the METV 1.0 (not the Beta version) in my mac lap
> top. Except for pb2nc all the exe got created. I am attaching the Makefile
> for information with following inputs.
> 
> 
> 1. We have to find libg2c files location and declare in F2C_LIBS
> 
> 2. Locate the single include file g2c.h and declare as F2C_INCS
> 
> 3. In lib/vx_met_util/Makefile add in line 56 $(NETCDF_INCS) for compiling
> read_grib.cc (please make sure that you are adding this in the existing tar
> file hosted in web)
> 
> 4. In the main Makefile I changed the sequence of pb2nc compilation as the
> last one (please see the attached Make file) otherwise it get stopped there
> without compiling the three remaining files.
> 
> 5. By commenting out pb2nc in the test_all.sh file I ran the sh and I am
> attaching log file for comments (Except point stat all other exe run
> correctly - for want of file from pb2nc)
> 
> 
> 
> ERROR FOR PB2NC
> 
> - - - - - - - - - - - - - - - - - - - - - -
> 
> /usr/bin/g++ -o pb2nc pb2nc.cc pb2nc_Conf.o numpbmsg.o openpb.o readpb.o
> dumppb.o  \
> 
> -g -O2 -dynamic   -DMET_BASE=\"/Users/jag/Desktop/meso/metv\" \
> 
> -I/usr/local/gsl/include \
> 
> -I../../lib -I../../lib -I/usr/local/netcdf/include -I/usr/local/VARLIB/bufr
> -I/usr/local/include \
> 
> -L../../lib -L../../lib -L/usr/local/netcdf/lib -L/usr/local/VARLIB/bufr
> -L/usr/local/lib \
> 
> -lbufr -lvx_grib_classes -lvx_wrfdata -lvx_econfig \
> 
> -lvx_data_grids -lvx_math -lvx_cal -lvx_util -lvx_met_util -lm -lg2c \
> 
> -lnetcdf_c++ -lnetcdf
> 
> /usr/bin/ld: multiple definitions of symbol ___divdi3
> 
> /usr/local/lib/libg2c.dylib(_divdi3.o) definition of ___divdi3
> 
> /usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libgcc_s.10.4.dylib(_divdi3_s.o)
> definition of ___divdi3
> 
> /usr/bin/ld: warning suggest use of -bind_at_load, as lazy binding may
> result in errors or different symbols being used
> 
> symbol ___udivdi3 used from dynamic library
> /usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libgcc_s.10.4.dylib(_udivdi3_s.o)
> not from earlier dynamic library /usr/local/lib/libg2c.0.dylib(_udivdi3.o)
> 
> symbol ___umoddi3 used from dynamic library
> /usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libgcc_s.10.4.dylib(_umoddi3_s.o)
> not from earlier dynamic library /usr/local/lib/libg2c.0.dylib(_umoddi3.o)
> 
> collect2: ld returned 1 exit status
> 
> make[3]: *** [pb2nc] Error 1
> 
> make[2]: *** [all] Error 2
> 
> make[1]: *** [targets] Error 2
> 
> make: *** [all] Error 2
> 
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> 


More information about the Met_help mailing list