[Met_help] MET compilation error
John Halley Gotway
johnhg at rap.ucar.edu
Thu Aug 13 12:54:23 MDT 2009
Holly,
Great. I'm glad you were able to figure it out. That's interesting that
your "g++" compiler for version 4.1.2 is actually named "g++4".
Everybody's systems are a little different.
Let me make a couple of recommendations...
- I'd suggest retrieving the latest set of patches for METv2.0 from:
http://www.dtcenter.org/met/users/support/known_issues/METv2.0/index.php
You'll just need to download one tar file and then recompile MET.
- You may find it helpful to go through the MET online tutorial:
http://www.dtcenter.org/met/users/support/online_tutorial/METv2.0/index.php
If you have any questions in your use of MET, just let us know.
Thanks,
John
> Thanks for your help, John. I was using two different versions of gcc
> and gfortran. It was like this because gfortran had not been installed
> on my computer. I installed a recent version yesterday, but my gcc
> version was only at 3.2.3. Turns out that gcc 3.2.3 has issues with
> gfortran.
>
> I switched to a different Linux box that was using Red Hat 4, and had
> both gcc 4.1.2 and gfortran 4.1.2 installed. All of the utilities
> compiled perfectly, but then we got an error when trying to compile MET.
> It kept telling us that -lgfortran could not be found. I added the
> "-L/path/to/gcc/directory -lgcc" line to FC_LIBS and still got the same
> error. However, we had the CXX line set to use g++. When this was
> changed to g++4, everything worked.
>
> Phew!
> Thanks again for your prompt replies and all of your help.
>
> Holly
>
> ___________________________________
> Holly C. Hassenzahl
> Meteorologist, Science Analyst
> Data Products Group
>
> Weather Central, Inc.
> 401 Charmany Drive Suite 200
> Madison, WI 53711
> +1.608.274.5789
> +1.608.276.4600
> http://www.weathercentral.tv
>
>
> -----Original Message-----
> From: John Halley Gotway [mailto:johnhg at rap.ucar.edu]
> Sent: Wednesday, August 12, 2009 9:29 AM
> To: Holly Hassenzahl
> Cc: met_help
> Subject: Re: [Met_help] MET compilation error
>
> Holly,
>
> I notice in the error message you sent me that you had to specify in the
> Makefile where to find the gfortran library (-L/usr/local/gfortran/lib
> -lgfortran). That leads me to believe that it's not in
> a standard location that the gfortran compiler already knows about.
>
> Try checking the version numbers of the compilers you're using by typing
> the following:
> g++ --version
> gfortran --version
>
> Do the version numbers match? If not, that's a problem.
>
> Regarding the specific error message you're seeing, the "__powidf2"
> function is defined on my machine in the "gcc" library file. On my
> machine that's in "/usr/lib/gcc/i486-linux-gnu/4.1.2/libgcc.a"
> but my that's a standard location and the gfortran compiler knows where
> to find the GCC library. However, since your gfortran library is not in
> a location that the gfortran compiler already knows
> about, I'm guessing the same is true of the GCC library... leading to
> the error you're seeing.
>
> If the compiler version numbers do match above, you could try this next:
> - Locate the file "libgcc.a" on your system.
> - Then in the Makefile, after "-L/usr/local/gfortran/lib -lgfortran" add
> the following "-L/path/to/gcc/directory -lgcc"
> - Try rebuilding MET.
>
> Let me know how it goes.
>
> Thanks,
> John
>
> Holly Hassenzahl wrote:
>> Hi John-
>>
>> Thanks for your quick reply. Unfortunately, I had already compiled
>> BUFRLIB as you suggested. So these errors have been occurring,
>> regardless of using the "-fno-second-underscore" tag.
>>
>> Holly
>>
>> ___________________________________
>> Holly C. Hassenzahl
>> Meteorologist, Science Analyst
>> Data Products Group
>>
>> Weather Central, Inc.
>> 401 Charmany Drive Suite 200
>> Madison, WI 53711
>> +1.608.274.5789
>> +1.608.276.4600
>> http://www.weathercentral.tv
>>
>>
>> -----Original Message-----
>> From: John Halley Gotway [mailto:johnhg at rap.ucar.edu]
>> Sent: Tuesday, August 11, 2009 4:51 PM
>> To: Holly Hassenzahl
>> Cc: met_help at ucar.edu
>> Subject: Re: [Met_help] MET compilation error
>>
>> Holly,
>>
>> I believe this error has to do with how you compiled BUFRLIB. Please
>> take
>> a look at the sample commands for compiling BUFRLIB on this page:
>>
> http://www.dtcenter.org/met/users/support/online_tutorial/METv2.0/compil
>> ation/req_libs.php
>>
>> Try compiling BUFRLIB with the following commands:
>> gcc -c -DUNDERSCORE *.c
>> gfortran -c -DUNDERSCORE -fno-second-underscore *.f *.F
>> ar crv libbufr.a *.o
>>
>> I think that "-fno-second-underscore" will fix the error you're
> seeing.
>>
>> Hope that does the trick.
>>
>> Thanks,
>> John Halley Gotway
>> johnhg at ucar.edu
>>
>>> Hello-
>>>
>>> I am trying to compile MET 2.0 using GNU compilers and am getting the
>>> following errors when making the pb2nc application:
>>>
>>> /usr/bin/g++ -o pb2nc pb2nc.cc pb2nc_Conf.o numpbmsg.o openpb.o
>> readpb.o
>>> dumppb.o \
>>> -Wall -Wshadow -static -DMET_BASE=\"/home/ldm/METv2.0\" \
>>> -I../../lib -I/home/ldm/NETCDF/netcdf-3.6.3/include
>>> -I/home/ldm/GSL/gsl-1.12/include -I/home/ldm/BUFRLIB \
>>> -L../../lib -L/home/ldm/NETCDF/netcdf-3.6.3/lib
>>> -L/home/ldm/GSL/gsl-1.12/lib -L/home/ldm/BUFRLIB \
>>> -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 \
>>> -L/usr/local/gfortran/lib -lgfortran
>>> /home/ldm/BUFRLIB/libbufr.a(ufbtab.o)(.text+0x731): In function
>> `ufbtab_':
>>> : undefined reference to `__powidf2'
>>> /home/ldm/BUFRLIB/libbufr.a(ufbtab.o)(.text+0xf29): In function
>> `ufbtab_':
>>> : undefined reference to `__powidf2'
>>> /home/ldm/BUFRLIB/libbufr.a(rdcmps.o)(.text+0x294): In function
>> `rdcmps_':
>>> : undefined reference to `__powidf2'
>>> /home/ldm/BUFRLIB/libbufr.a(rdtree.o)(.text+0x1fd): In function
>> `rdtree_':
>>> : undefined reference to `__powidf2'
>>> 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
>>>
>>> I have tried emptying out all of the F2C lines in the Makefile, as
>> well as
>>> emptying out all expect the -lf2c (as recommended to someone in April
>> of
>>> this year).
>>>
>>> Is there something else I am missing or could try? Thank you...
>>>
>>> Holly
>>>
>>> -----------------------------------------------
>>> Holly Hassenzahl
>>> Meteorologist, Science Analyst
>>> Data Products Group
>>>
>>> Weather Central, Inc.
>>> 401 Charmany Drive Suite 200
>>> Madison, WI 53719
>>> 608.274.5789
>>> http://weathercentral.tv
>>>
>>> _______________________________________________
>>> Met_help mailing list
>>> Met_help at mailman.ucar.edu
>>> http://mailman.ucar.edu/mailman/listinfo/met_help
>>>
>>
>>
>
More information about the Met_help
mailing list