[Met_help] METv2 Installation Problem
John Halley Gotway
johnhg at ucar.edu
Thu Mar 4 12:04:37 MST 2010
Keyur,
The "get_file_type" function is defined in the file "METv2.0/lib/vx_met_util/file_type.cc" as part of the vx_met_util library.
First, try doing a "make clean" followed by a fresh "make", to see if that helps.
If that doesn't help, try running the following command:
grep get_file_type METv2.0/lib/vx_met_util/file_type.*
Make sure the output looks like this:
lib/vx_met_util/file_type.cc:FileType get_file_type(const char *filename) {
lib/vx_met_util/file_type.h:extern FileType get_file_type(const char *);
If it doesn't look like this, then in your editing of files, you've altered the get_file_type function signature.
If it does look like this, then for some reason make is having trouble linking for gen_poly_mask, but that would be pretty weird. You could try adding "-lvx_met_util" to line 47 of the file
METv2.0/src/gen_poly_mask/Makefile:
Line 47: -lvx_data_grids -lvx_gnomon -lvx_nav -lvx_cal -lvx_util -lvx_math -lvx_met_util -lm \
Let me know how it goes.
John
Keyur Patel wrote:
> John,
>
> Thanks for letting me know about the -ff2c option, it was really helpful.
>
> And I did face many-minor problems compiling the vx_*** libraries but was
> able to fix them and did compile all the libs successfully. I have attached
> a very large log file which also contains the solution/fix that worked for
> me.
>
> And now I am facing problems compiling the binary "gen_poly_mask"
>
> -lvx_data_grids -lvx_gnomon -lvx_nav -lvx_cal -lvx_util -lvx_math -lm \
> -lnetcdf_c++ -lnetcdf \
>
> /tmp/ccIy6g2d.o: In function `process_data_file()':
> gen_poly_mask.cc:(.text+0x29a): undefined reference to `get_file_type(char
> const*)'
> collect2: ld returned 1 exit status
> make[3]: *** [gen_poly_mask] Error 1
> make[2]: *** [all] Error 2
> make[1]: *** [targets] Error 2
> make: *** [all] Error 2
>
> Could you please guide me, how to overcome this problem, as i do not know
> where the function:get_file_type(char const*)' is defined.
>
>
>
> On Wed, Mar 3, 2010 at 1:52 AM, John Halley Gotway <johnhg at ucar.edu> wrote:
>
>> Keyur,
>>
>> I also wanted to mention one other thing.
>>
>> I noticed that you've listed the F2C library in the Makefile. That
>> shouldn't be necessary since you're using the "gfortran" compiler. The
>> "-ff2c" compiler option is already included in that Makefile
>> which should serve the same purpose as the F2C library. So you should be
>> able to empty out all the F2C lines in the Makefile.
>>
>> Thanks,
>> John
>>
>> John Halley Gotway wrote:
>>> Keyur,
>>>
>>> It looks like the compiler is having problems with the include files.
>> Every once in a while, we get an email from a user with these types of
>> problems. Basically, it means that you'll need to edit
>>> some of the MET source files and add in some more include files. MET
>> compiles fine on most of the machines, but sometimes the include files are
>> set up slightly differently. Am I'm not exactly sure why.
>>> Here's what I'd suggest doing...
>>> (1) The error you're seeing is coming from:
>> "METv2.0/lib/vx_cal/time_strings.cc", and it can't find the definition for
>> the "sprintf" function.
>>> (2) Go into the include directory for your compiler and locate the file
>> containing "sprintf". Something like this:
>>> grep sprintf /usr/include/*.h
>>> (3) It will likely be located in a file named "stdio.h". So edit the
>> file "METv2.0/lib/vx_cal/time_strings.cc" by adding this line to the include
>> section:
>>> #include <stdio.h>
>>> (4) Try recompiling.
>>>
>>> It's likely that you'll find more similar types of problems. Just go
>> through the same process to add more include files. As you go through,
>> please keep a list of the changes you had to make to get
>>> it to compile.
>>>
>>> I really apologize for this inconvenience. Hopefully, we can resolve
>> these include file issues for the next release. Please send me the list of
>> changes you had to make, and I'll be sure to add them
>>> in to the development version of the code.
>>>
>>> Thanks,
>>> John Halley Gotway
>>> met_help at ucar.edu
>>>
>>>
>>> Keyur Patel wrote:
>>>> John,
>>>>
>>>> I am trying to install METv2.0() on a Linux 2.6.29.4-167.fc11.i686.PAE
>> SMP
>>>> i686 GNU/Linux machine. I have already compiled and installed the
>> required
>>>> libraries and packages successfully in a specific library, all got
>> installed
>>>> successfully.
>>>>
>>>> The only problem I encountered was when I started building MET with :
>> make
>>>>> & make.log&
>>>> I did edit the Makefile(for GNU Linux), I have attached it with this
>> mail
>>>> along with the error logs encountered.
>>>>
>>>> I also tried to buid MET with
>>>> MET-patch<
>> http://www.dtcenter.org/met/users/support/known_issues/METv2.0/patches/METv2.0_patches_20091223.tar.gz
>>> provided
>>>> on the site, and had no luck compiling with it too.
>>>> Awaiting a suitable response from you.
>>>>
>
>
>
More information about the Met_help
mailing list