[Met_help] problems compiling MET

Michael Brennan Michael.J.Brennan at noaa.gov
Fri May 16 08:56:51 MDT 2008


John,

I'm just sitting down to take a look at this again. I think in my last 
message to you, I looked at the output from this command:

nm /export/lnx274/mbrennan/BUFRLIB/libbufr.a | grep bort

and the line said "bort_exit_" (with one underscore).

I still don't seem to have any luck compiling. I pasted the error string 
I get below. Do you have any other suggestions?

Thanks,
Mike

/usr/bin/g++ -o pb2nc pb2nc.cc pb2nc_Conf.o numpbmsg.o openpb.o readpb.o 
dumppb.o  \
         -g -Wall -Wshadow -static 
-DMET_BASE=\"/export/lnx274/MET/METv1.0\" \
         -I/export/lnx274/mbrennan/gsl/include \
         -I../../lib -I../../lib 
-I/export/lnx274/mbrennan/applications/netcdf-3.6.2/include 
-I/export/lnx274/mbrennan/BUFRLIB -I/export/lnx274/mbrennan/f2c \
         -L../../lib -L../../lib 
-L/export/lnx274/mbrennan/applications/netcdf-3.6.2/lib 
-L/export/lnx274/mbrennan/BUFRLIB/lib -L/export/lnx274/mbrennan/f2c/libf2c \
         -lbufr -lvx_grib_classes -lvx_wrfdata -lvx_econfig \
         -lvx_data_grids -lvx_math -lvx_cal -lvx_util -lvx_met_util -lm 
-lf2c \
         -lnetcdf_c++ -lnetcdf
../../lib/vx_wrfdata/vx_wrfdata.h:41: warning: 'wrfdata_magic' defined 
but not used
../../lib/vx_wrfdata/vx_wrfdata.h:64: warning: 'thresh_type_str' defined 
but not used
../../lib/vx_wrfdata/vx_wrfdata.h:85: warning: 'step_direction_str' 
defined but not used
../../lib/vx_met_util/constants.h:16: warning: 'proj_type' defined but 
not used
../../lib/vx_met_util/constants.h:23: warning: 'na_str' defined but not used
../../lib/vx_met_util/constants.h:26: warning: 'all_msg_typ_str' defined 
but not used
../../lib/vx_met_util/constants.h:38: warning: 'all_interp_mthd_str' 
defined but not used
../../lib/vx_met_util/constants.h:49: warning: 'mthd_str' defined but 
not used
../../lib/vx_met_util/met_stats.h:20: warning: 'hdr_fmt_str' defined but 
not used
../../lib/vx_grib_classes/grib_strings.h:20: warning: 'missing_str' 
defined but not used
../../lib/vx_grib_classes/grib_strings.h:62: warning: 'grib_code_list' 
defined but not used
../../lib/vx_grib_classes/grib_strings.h:94: warning: 
'grib_code_list_str' defined but not used
../../lib/vx_grib_classes/grib_strings.h:358: warning: 'grib_level_list' 
defined but not used
../../lib/vx_grib_classes/grib_strings.h:377: warning: 'grib_level_flag' 
defined but not used
../../lib/vx_grib_classes/grib_strings.h:391: warning: 
'grib_level_list_str' defined but not used
../../lib/vx_met_util/read_grib.h:64: warning: 'two_to_one_grib' defined 
but not used
/export/lnx274/mbrennan/BUFRLIB/lib/libbufr.a(bort.o)(.text+0xe9): In 
function `bort_':
: undefined reference to `bort_exit__'
/export/lnx274/mbrennan/BUFRLIB/lib/libbufr.a(bort2.o)(.text+0x124): In 
function `bort2_':
: undefined reference to `bort_exit__'
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

John Halley Gotway wrote:
> Mike,
> 
> Hmmm.  That's odd.  The "-fno-second-underscore" option is meant to 
> address this exact issue.
> 
> Please try doing the following command:
> nm /export/lnx274/mbrennan/BUFRLIB/libbufr.a | grep bort
> 
> And then send me the output of the command.
> 
> In the output of the "nm" command, look to see if there's a line that 
> says "bort_exit_" or does it say "bort_exit__"?
> 
> We need to compile BUFRLIB in such a way that it says "bort_exit_" 
> rather than "bort_exit__".
> 
> Sorry about these issues.  It's a result of mixing FORTRAN code with C++ 
> code.
> 
> John
> 
> Michael Brennan wrote:
>> John,
>>
>> I had not seen those suggestions in the User's Guide. I rebuilt the 
>> BUFRLIB as you suggested and rebuilt MET. I get the same error (have 
>> reattached the Makefile and make_met.log.  I'll spend some more time 
>> on it this afternoon and let you know if I make any progress.
>>
>> Thanks again for your help!
>> Mike
>>
>> John Halley Gotway wrote:
>>> Michael,
>>>
>>> When you compiled BUFRLIB, did you see the suggestions in the MET 
>>> User's Guide about it?  Please take a look in section 2.6 of the MET 
>>> User's Guide (METv1.0/doc/MET_Users_Guide.pdf).  Try rebuilding 
>>> BUFRLIB using the following commands that are listed in there:
>>>
>>> cd /export/lnx274/mbrennan/BUFRLIB
>>> rm *.o *.a
>>> /usr/bin/gcc -c -DUNDERSCORE *.c
>>> /usr/bin/g77 -c -DUNDERSCORE -fno-second-underscore *.f
>>> ar crv libbufr.a *.o
>>>
>>> Then try rebuilding MET.  Hopefully, that'll fix that undefined 
>>> reference error you're seeing right now.
>>>
>>> Let me know how it goes.
>>>
>>> Thanks,
>>> John
>>>
>>> Michael Brennan wrote:
>>>> John,
>>>>
>>>> Thanks very much for your suggestion. I definitely made it farther 
>>>> this time, but still ended up with an error, this time related to 
>>>> the BUFRLIB. I've again attached the Makefile and make_met.log. If 
>>>> you can take another look, I'd greatly appreciate it!
>>>>
>>>> Thanks,
>>>> Mike
>>>>
>>>> John Halley Gotway wrote:
>>>>> Michael,
>>>>>
>>>>> I apologize for not getting back to you sooner.  Most of the people 
>>>>> who provide support for MET were out of town last week.
>>>>>
>>>>> Thanks for sending along your Makefile and your log file.  It makes 
>>>>> diagnosing the problem a lot easier.
>>>>>
>>>>> This looks like a pretty simple problem.  The compiler is not able 
>>>>> to find the file "gsl/gsl_cdf.h".
>>>>>
>>>>> In your Makefile, change the following line...
>>>>> FROM: GSL_INCS = -I/export/lnx274/mbrennan/gsl/include/gsl
>>>>> TO:   GSL_INCS = -I/export/lnx274/mbrennan/gsl/include
>>>>>
>>>>> And then do a "make clean" followed by a "make >& make_met.log".
>>>>>
>>>>> I see why you set GSL_INCS the way you did - the comments in the 
>>>>> Makefile are a little misleading.
>>>>>
>>>>> That should solve that problem.  Please let me know if you run into 
>>>>> other issues.
>>>>>
>>>>> Thanks and sorry again for the delay,
>>>>> John Halley-Gotway
>>>>> johnhg at ucar.edu
>>>>>
>>>>> Michael Brennan wrote:
>>>>>> Hi,
>>>>>>
>>>>>> I'm attempting to compile MET in user space on a Linux 
>>>>>> workstation. I have all the necessary other software installed 
>>>>>> (NETCDF, BURFLIB, GSL, and F2C), and I've updated the code 
>>>>>> suggested on the "known issues" page. However, I'm still having 
>>>>>> problems. I've attached make make_met.log file and my top level 
>>>>>> Makefile.
>>>>>>
>>>>>> I'm trying to use pre-compiled NETCDF libraries for compiling MET. 
>>>>>> Could that be part of the problem?
>>>>>>
>>>>>> I appreciate any advice you might have.
>>>>>>
>>>>>> Thanks!
>>>>>> Mike
>>>>>>
>>>>>> _______________________________________________
>>>>>> Met_help mailing list
>>>>>> Met_help at mailman.ucar.edu
>>>>>> http://mailman.ucar.edu/mailman/listinfo/met_help
>>>>
>>>> _______________________________________________
>>>> Met_help mailing list
>>>> Met_help at mailman.ucar.edu
>>>> http://mailman.ucar.edu/mailman/listinfo/met_help
>>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Michael_J_Brennan.vcf
Type: text/x-vcard
Size: 292 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/met_help/attachments/20080516/afd60336/Michael_J_Brennan.vcf


More information about the Met_help mailing list