Compiling ncep.noaa.gov grib2 code

I am trying to compile these programs with pgroup compilers:

http://www.nco.ncep.noaa.gov/pmb/codes/GRIB2/

First of all, the pgf90 4.0-2 I have licensed does not understand all constructs used in g2lib code, so I tried 5.2 compilers with the evaluation license. This compiles but segfaults when I try to run it.


pgdbg> run -g21 012.grib2 012.grib1
reloading ./cnvgrib
argv[0]= ./cnvgrib
argv[1]= -g21
argv[2]= 012.grib
argv[3]= 012.grib1

./cnvgrib loaded by ld-linux.so.2.
libz.so.1 loaded by ld-linux.so.2.
libc.so.6 loaded by ld-linux.so.2.
libpgc.so loaded by ld-linux.so.2.
libm.so.6 loaded by ld-linux.so.2.
ld-linux.so.2 loaded by ld-linux.so.2.
Signalled SIGSEGV at 0x80c3ba7, function __hpf_bcopysl
80c3ba7: 8b 14 98 movl (%eax,%ebx,4),%edx

pgdbg> stacktrace

STACK TRACE:

#6 __libc_start_main address: 0x40072177
#5 main address: 0x804a969
#4 cnvgrib line: “cnvgrib.f”@143 address: 0x804dcc4
#3 cnv21 line: “cnv21.f”@87 address: 0x805193c
ifl1 = 10 , ifl2 = 50
#2 pgf90_copy_f77_argl address: 0x80b516a
#1 local_copy file: rdst.c address: 0x80b348f
=> #0 __hpf_bcopysl address: 0x80c3c17

pgdbg> up
Call level:1 local_copy file: rdst.c address: 0x80b348f

pgdbg> up
Call level:2 pgf90_copy_f77_argl address: 0x80b516a
ERROR: No current source file.

pgdbg> up
Call level:3 cnv21 line: “cnv21.f”@87 address: 0x805193c
#87: call gdt2gds(igds,gfld%igdtmpl,gfld%num_opt,gfld%list_opt,

pgdbg> list
#82: igds(1)=gfld%griddef
#83: igds(2)=gfld%ngrdpts
#84: igds(3)=gfld%numoct_opt
#85: igds(4)=gfld%interp_opt
#86: igds(5)=gfld%igdtnum
#87:==>> call gdt2gds(igds,gfld%igdtmpl,gfld%num_opt,gfld%list_opt,
#88: & kgds,igrid,iret)
#89: if (iret.ne.0) then
#90: print *,‘cnv21: could not create gds’
#91: cycle

This looks like some bug in passing arguments to a subroutine.

I cannot be sure that there are no bugs in NCEP code there, but it seems to work for other people with other compilers. As I am currently using pgroup compilers, I thought to first try these.

Hi Jaakko,


Often times when a seg fault occurs at a call it’s caused by a stack overflow. Try setting your stack to unlimited, in csh the command is ‘unlimit’, and re-running.

I was able to build the libraries and the cnvgrib tool, but without data was unable to recreate the issue. If setting the stack size to unlimited doesn’t work, let me know and I’ll contact you via email about getting a sample data set.

Thanks,
Mat

Mat,

Thanks for the reply, great support. Unlimited stack did not help with pgf90 5.2. Tried on 64bit Opteron and 32bit Athlon. Here is a test case, this is a short GRIB2 file, public data from NCEP so I can post it here:

http://www.iki.fi/hyvatti/ncep.grib2

And this is the command line you may want to try:

./cnvgrib -g21 ncep.grib2 output.file

I have now succesfully compiled the utility with pgf90 4.0. I had to modify a lot of fortran constructs that did not compile with that vetsion. I also tested that 5.2 version compiler does not produce working code with these modifications that make 4.0 version accept the code.

After some debugging and a lot of discussion, we determined that the problem here is that the program has a subtle error that’s causing the seg fault. The gdt2gds subroutine’s actual argument gfld%list_opt is a nullified pointer. The intent being that it contains an empty option list. In the F95 standard however, in the case where the actual argument is a pointer and the dummy argument is not, then the dummy argument gets associated with the actual argument’s target. The pointer must have an associated target. (Reference Fortran 90/95 section 5.7.1) But when the program tries to copy in gfld%list_opt’s target, it seg faults since there is no associated target.

The simple fix is to either allocate gfld%list_opt, or use “-Minline” since the call to gdt2gds is eliminated.

Can the compiler help detect this error? While the compiler cannot detect this at compile time, compiling with the flag “-Mchkptr” will detect the error at runtime.

Can the compiler work around this error? Our compiler engineers determined that, while more complex than it might seem, we should be able to do this for a future release.

Thanks a lot!
Mat

Hello,

I’m trying to use cnvgrib too and I’ve got too a segmentation fault during the conversion…

I use Fedora Core 5 on a Dual Core AMD Opteron™ Processor 285 machine.

No error during the compilation…

I tried to edit the makefile and to add :

FC =            pgf90 -Mbounds

or

FC =            pgf90 -Minline

or

FC =            pgf90 -Mchkptr

Same error, and no explanation…

Hi benj63,

Which version of cnvgrib are you using? In looking at the latest version (1.1.2) it appears that they have fixed the Jaakko’s problem by allocating gfld%list_opt before passing it to gdt2gds (See line 87 of cnv21.f).

If you are using the latest version, where does the seg fault occur?

  • Mat

Yes, I’m using the version 1.1.2 of cnvgrib.

How can I see where the segmentation fault appears ? Do I have to add special flags in the makefile ?

Thank you

cnvgrib-1.1.2/cnvgrib -g21 gfs.t00z.pgrb2f00 gfs.1
Segmentation fault

Compile the program using “-g” and then run using the PGI debugger, i.e. ‘pgdbg -text cnvgrib’. (Note -text puts the debugger into text mode instead of the GUI.) Next, type ‘run’ followed by the command line arguments for cnvgrib. Once the program seg faults, type ‘where’ or ‘stacktrace’.

Note that you can follow what Jaakko did in the original post.

Thanks,
Mat

Apologies for dredging up an old thread but I’m having problems getting cnvgrib to work on a 64-bit machine and would welcome any help.

As with the previous posters, I am able to successfully compile cnvgrib but when I try to convert a GRIB2 file to GRIB1 I get a segmentation fault. I can, however, convert a GRIB1 file to GRIB2 and then convert this back to GRIB1.

I am using version 1.1.4 of cnvgrib with the 6.0 compiler on an x86-64 machine running RHEL4. I have the stack size set to unlimited.

Here is the output from the debugger;

[graham@rye cnvgrib-1.1.4]$ pgdbg -text cnvgrib
PGDBG 6.0-8 x86-64 (Workstation, 4 CPU)
Copyright 1989-2000, The Portland Group, Inc. All Rights Reserved.
Copyright 2000-2005, STMicroelectronics, Inc. All Rights Reserved.
***Reading DWARFv2 Information.
Loaded: /home/graham/cnvgrib/cnvgrib-1.1.4/cnvgrib

pgdbg> run -g21 /home/graham/fh.0006_tl.press_gr.1p0deg new.grib

Reloading:
/home/graham/cnvgrib/cnvgrib-1.1.4/cnvgrib -g21
/home/graham/fh.0006_tl.press_gr.1p0deg new.grib

Signalled SIGSEGV at 0x4BF14B, function cfree
4BF14B: 48 8B 2F movq (%rdi),%rbp


I have successfully compiled the code on a 32-bit machine but would prefer not to rely on having to use that as a build-machine for our other 64-bit machines.

Any help would be much appreciated.

Cheers

Graham

Hi Graham,

We just tried 7.1-1 with version 1.1.4 and run converting grib1 to glib2 and vice versa with example med.grib[1,2] data from http://www.opc.ncep.noaa.gov/grids/data/latest and it seems to run OK.

Can you provide us the data input you use? Did you try out 7.1-1 release? There could be some bug in 6.0 that we fix in the latest release. What optimization flags did you use, perhaps lower optimization might help.

Hongyon

I am running into a very similar problem seen here, using RHEL4 x86-64 using the 7.1-1 release. I am using -g flags and removed the optimization flags trying to get it to work. I can convert “grib1 to grib2” but not “grib2 to grib1”(which is what I really need) I am using the grib2 gfs model datasets from the NCEP server. An address for a specific file is: ftp://ftpprd.ncep.noaa.gov/pub/data/nccf/com/gfs/prod/gfs.2007102312/gfs.t12z.pgrb2f00
When I run the program in the pgdbg, I get the error:
*** glibc detected *** double free or corruption (out): 0x0000002a95c90010 ***
Signalled SIGABRT at 0x3B8CF2E21D, function __GI_raise, file interp.c
0x3B8CF2E21D: 48 3D 0 F0 FF FF cmpq $0xFFFFFFFFFFFFF000,%rax

Any ideas?? Any help would be greatly appreciated…
Aaron


Hi Aaron,

I suspect that cnvgrib or libraries/include files(jasper,w3lib,g2lib) are 32-bit applications and has not yet fully ported to 64-bit. I have compiled on 32-bit platform, RHEL3 ,and it runs with your input just fine. I will let you know if I have more information.


Hongyon

Thanks for the quick feedback. I did recompile everything in “32 bit mode” and the program does work now. I guess there are still some unresolved 64bit porting issues. Thank you very much!

Aaron

Hi, I have the same problem with cnvgrib : -g12 is OK but error for -g21 with a 64 bits linux computer.
Can you tell what programs you compile in 32 bits (only cnvgrib or all the lib needed) and how to compile in 32 bits on my 64 bits machine.
Thanks
Bernard

Hi Bernard,

Yes infact you need to compile in 32-bit mode the application need jasper library and jasper is 32-bit library.

To compile with 32-bit compiler on 64-bit machine, there are 2 ways:
Assuming you install a compiler in /opt/pgi.

  1. In csh, setenv PATH /opt/pgi/linux86/7.1-4/bin:$PATH
    in bash, export PATH=/opt/pgi/linux86/7.1-4/bin:$PATH

  2. Set path as you normally set and add -tp k8-32 to a compiler flags.

Hope this helps,
Hongyon

If you compile your own jasper, you will need to use -m32 if you use gcc/gfortran to compile.

Hongyon

Thank you for your help. My prog is running fine now
Bernard

I am trying to compile cnvgrib-1.1.5 by using pgi compilers. I am
getting error.

I am using pgi 6.2.4. I am using sles 10 on the x86 32 bit platform. I
have installed the w3 g2 libraries necessary for cnvgrib software. I
am using jasper 1.701.0.

Error is below:

pgf90 -O cnvgrib gds2gdt.o pds2pdt.o pds2pdtens.o cnvgrib.o cnv12.o
cnv22.o cnv21.o gdt2gds.o makepds.o putgbexn.o makepdsens.o setbit.o
-L/home/tumas/grib2togrib1/g2lib-1.1.0 -lg2
-L/home/tumas/grib2togrib1/w3lib-1.5 -lw3 -L/usr/lib -ljasper -lpng12
-lz
File with unknown suffix passed to linker: cnvgrib

/usr/bin/ld: cnvgrib: No such file: Such a file or directory doesn’t exist.
make: *** [cnvgrib] error 2




cnvgrib makefile is below:

**SHELL=/bin/sh

SRCS= gds2gdt.f pds2pdt.f pds2pdtens.f cnvgrib.f cnv12.f cnv22.f
cnv21.f gdt2gds.f makepds.f putgbexn.f makepdsens.f setbit.f
OBJS= gds2gdt.o pds2pdt.o pds2pdtens.o cnvgrib.o cnv12.o cnv22.o
cnv21.o gdt2gds.o makepds.o putgbexn.o makepdsens.o setbit.o
\

Tunable parameters

FC Name of the fortran compiling system to use

LDFLAGS Flags to the loader

LIBS List of libraries

CMD Name of the executable

PROFLIB Library needed for profiling

#FC = g95
FC = pgf90
#LDFLAGS = -p -bnoquiet -bloadmap:mug
#LDFLAGS = -pg
#LDFLAGS = -L/opt/pgi/linux86/6.2/lib -L/usr/lib
LDFLAGS =
#INC = -I /pub/share/ncoops/g2lib-1.1.0
INC = -I. -I/home/tumas/grib2togrib1/w3lib-1.5 -I/home/tumas/grib2togrib1/g2lib-1.1.0
#INC = -I /home/tumas/grib2togrib1/jasper-1.900.1/src/libjasper/include/

#LIBS = -L/pub/share/ncoops/g2lib-1.1.0 -lg2\

-L/pub/share/ncoops/w3lib-1.5 -lw3\

-L/pub/share/ncoops/jasper-1.700.2/src/libjasper/.libs -ljasper -lpng -lz\


LIBS = -L/home/tumas/grib2togrib1/g2lib-1.1.0 -lg2
-L/home/tumas/grib2togrib1/w3lib-1.5 -lw3
-L/usr/lib -ljasper -lpng12 -lz

-L/home/tumas/grib2togrib1/jasper-1.900.1/src/libjasper/include -ljasper -lpng12 -lz\




CMD = cnvgrib
PROFLIB = -lprof
\

To perform the default compilation, use the first line

To compile with flowtracing turned on, use the second line

To compile giving profile additonal information, use the third line

WARNING: SIMULTANEOUSLY PROFILING AND FLOWTRACING IS NOT RECOMMENDED

#FFLAGS = -O3 -pg -qrealsize=4 $(INC)
FFLAGS = -g -o $(INC)
#FFLAGS = -F
#FFLAGS = -Wf"-ez"

\

Lines from here on down should not need to be changed. They are the

actual rules which make uses to build a.out.

all: $(CMD)

$(CMD): $(OBJS)
$(FC) $(LDFLAGS) -O $(@) $(OBJS) $(LIBS)
\

Make the profiled version of the command and call it a.out.prof

$(CMD).prof: $(OBJS)
$(FC) $(LDFLAGS) -o $(@) $(OBJS) $(PROFLIB) $(LIBS)

clean:
-rm -f $(OBJS)

clobber: clean
-rm -f $(CMD) $(CMD).prof

void: clobber
-rm -f $(SRCS) makefile**


Any help would be much appreciated

Cheers

ersin

Hi,

Your makefile is not quite right.

$(FC) $(LDFLAGS) -O $(@) $(OBJS) $(LIBS)

should be

$(FC) $(LDFLAGS) -o $(@) $(OBJS) $(LIBS)

Hongyon

Hi Hongyon,

I changed makefile like this :

$(FC) $(LDFLAGS) -o $(@) $(OBJS) $(LIBS)


this once error below :

pgf90 -g -o -I. -I/home/tumas/grib2togrib1/w3lib-1.5 -I/home/tumas/grib2togrib1/g2lib-1.1.0 -c -o gds2gdt.o gds2gdt.f
pgf90 -g -o -I. -I/home/tumas/grib2togrib1/w3lib-1.5 -I/home/tumas/grib2togrib1/g2lib-1.1.0 -c -o pds2pdt.o pds2pdt.f
pgf90 -g -o -I. -I/home/tumas/grib2togrib1/w3lib-1.5 -I/home/tumas/grib2togrib1/g2lib-1.1.0 -c -o pds2pdtens.o pds2pdtens.f
pgf90 -g -o -I. -I/home/tumas/grib2togrib1/w3lib-1.5 -I/home/tumas/grib2togrib1/g2lib-1.1.0 -c -o cnvgrib.o cnvgrib.f
pgf90 -g -o -I. -I/home/tumas/grib2togrib1/w3lib-1.5 -I/home/tumas/grib2togrib1/g2lib-1.1.0 -c -o cnv12.o cnv12.f
pgf90 -g -o -I. -I/home/tumas/grib2togrib1/w3lib-1.5 -I/home/tumas/grib2togrib1/g2lib-1.1.0 -c -o cnv22.o cnv22.f
pgf90 -g -o -I. -I/home/tumas/grib2togrib1/w3lib-1.5 -I/home/tumas/grib2togrib1/g2lib-1.1.0 -c -o cnv21.o cnv21.f
pgf90 -g -o -I. -I/home/tumas/grib2togrib1/w3lib-1.5 -I/home/tumas/grib2togrib1/g2lib-1.1.0 -c -o gdt2gds.o gdt2gds.f
pgf90 -g -o -I. -I/home/tumas/grib2togrib1/w3lib-1.5 -I/home/tumas/grib2togrib1/g2lib-1.1.0 -c -o makepds.o makepds.f
pgf90 -g -o -I. -I/home/tumas/grib2togrib1/w3lib-1.5 -I/home/tumas/grib2togrib1/g2lib-1.1.0 -c -o putgbexn.o putgbexn.f
pgf90 -g -o -I. -I/home/tumas/grib2togrib1/w3lib-1.5 -I/home/tumas/grib2togrib1/g2lib-1.1.0 -c -o makepdsens.o makepdsens.f
pgf90 -g -o -I. -I/home/tumas/grib2togrib1/w3lib-1.5 -I/home/tumas/grib2togrib1/g2lib-1.1.0 -c -o setbit.o setbit.f
pgf90 -o cnvgrib gds2gdt.o pds2pdt.o pds2pdtens.o cnvgrib.o cnv12.o cnv22.o cnv21.o gdt2gds.o makepds.o putgbexn.o makepdsens.o setbit.o -L/home/tumas/grib2togrib1/g2lib-1.1.0 -lg2 -L/home/tumas/grib2togrib1/w3lib-1.5 -lw3 -L/usr/lib -ljasper -lpng -lz
pds2pdt.o: In function pds2pdt': /home/tumas/grib2togrib1/cnvgrib-1.1.5/pds2pdt.f:64: undefined reference to params_ecmwf_param_ecmwf_g1_to_g2_’
/home/tumas/grib2togrib1/cnvgrib-1.1.5/pds2pdt.f:67: undefined reference to params_param_g1_to_g2_' /home/tumas/grib2togrib1/cnvgrib-1.1.5/pds2pdt.f:92: undefined reference to params_ecmwf_param_ecmwf_g1_to_g2_’
/home/tumas/grib2togrib1/cnvgrib-1.1.5/pds2pdt.f:95: undefined reference to params_param_g1_to_g2_' /home/tumas/grib2togrib1/cnvgrib-1.1.5/pds2pdt.f:161: undefined reference to params_ecmwf_param_ecmwf_g1_to_g2_’
/home/tumas/grib2togrib1/cnvgrib-1.1.5/pds2pdt.f:164: undefined reference to params_param_g1_to_g2_' pds2pdt.o:(.debug_info+0x155): undefined reference to …Dm_params’
pds2pdt.o:(.debug_info+0x167): undefined reference to ..Dm_params_ecmwf' pds2pdtens.o: In function pds2pdtens’:
/home/tumas/grib2togrib1/cnvgrib-1.1.5/pds2pdtens.f:70: undefined reference to params_param_g1_to_g2_' /home/tumas/grib2togrib1/cnvgrib-1.1.5/pds2pdtens.f:103: undefined reference to params_param_g1_to_g2_’
/home/tumas/grib2togrib1/cnvgrib-1.1.5/pds2pdtens.f:184: undefined reference to params_param_g1_to_g2_' /home/tumas/grib2togrib1/cnvgrib-1.1.5/pds2pdtens.f:264: undefined reference to params_param_g1_to_g2_’
/home/tumas/grib2togrib1/cnvgrib-1.1.5/pds2pdtens.f:301: undefined reference to params_param_g1_to_g2_' pds2pdtens.o:/home/tumas/grib2togrib1/cnvgrib-1.1.5/pds2pdtens.f:386: more undefined references to params_param_g1_to_g2_’ follow
pds2pdtens.o:(.debug_info+0x1a7): undefined reference to ..Dm_params' cnv12.o: In function cnv12’:
/home/tumas/grib2togrib1/cnvgrib-1.1.5/cnv12.f:132: undefined reference to gbyte_' /home/tumas/grib2togrib1/cnvgrib-1.1.5/cnv12.f:141: undefined reference to params_ecmwf_param_ecmwf_g1_to_g2_’
/home/tumas/grib2togrib1/cnvgrib-1.1.5/cnv12.f:146: undefined reference to params_param_g1_to_g2_' /home/tumas/grib2togrib1/cnvgrib-1.1.5/cnv12.f:149: undefined reference to params_param_g1_to_g2_’
/home/tumas/grib2togrib1/cnvgrib-1.1.5/cnv12.f:153: undefined reference to gribcreate_' /home/tumas/grib2togrib1/cnvgrib-1.1.5/cnv12.f:166: undefined reference to addgrid_’
/home/tumas/grib2togrib1/cnvgrib-1.1.5/cnv12.f:210: undefined reference to mkieee_' /home/tumas/grib2togrib1/cnvgrib-1.1.5/cnv12.f:271: undefined reference to params_ecmwf_param_ecmwf_g1_to_g2_’
/home/tumas/grib2togrib1/cnvgrib-1.1.5/cnv12.f:275: undefined reference to params_param_g1_to_g2_' /home/tumas/grib2togrib1/cnvgrib-1.1.5/cnv12.f:302: undefined reference to mkieee_’
/home/tumas/grib2togrib1/cnvgrib-1.1.5/cnv12.f:348: undefined reference to gribend_' cnv12.o:(.debug_info+0x572): undefined reference to …Dm_params’
cnv12.o:(.debug_info+0x584): undefined reference to ..Dm_params_ecmwf' cnv22.o: In function cnv22’:
/home/tumas/grib2togrib1/cnvgrib-1.1.5/cnv22.f:78: undefined reference to getgb2_' /home/tumas/grib2togrib1/cnvgrib-1.1.5/cnv22.f:108: undefined reference to gribend_’
/home/tumas/grib2togrib1/cnvgrib-1.1.5/cnv22.f:121: undefined reference to gribcreate_' /home/tumas/grib2togrib1/cnvgrib-1.1.5/cnv22.f:141: undefined reference to addgrid_’
/home/tumas/grib2togrib1/cnvgrib-1.1.5/cnv22.f:151: undefined reference to addgrid_' /home/tumas/grib2togrib1/cnvgrib-1.1.5/cnv22.f:159: undefined reference to gf_free_’
/home/tumas/grib2togrib1/cnvgrib-1.1.5/cnv22.f:185: undefined reference to mkieee_' /home/tumas/grib2togrib1/cnvgrib-1.1.5/cnv22.f:200: undefined reference to rdieee_’
/home/tumas/grib2togrib1/cnvgrib-1.1.5/cnv22.f:202: undefined reference to rdieee_' /home/tumas/grib2togrib1/cnvgrib-1.1.5/cnv22.f:242: undefined reference to params_param_get_abbrev_’
/home/tumas/grib2togrib1/cnvgrib-1.1.5/cnv22.f:268: undefined reference to gribend_' /home/tumas/grib2togrib1/cnvgrib-1.1.5/cnv22.f:272: undefined reference to gf_free_’
/home/tumas/grib2togrib1/cnvgrib-1.1.5/cnv22.f:273: undefined reference to gf_free_' /home/tumas/grib2togrib1/cnvgrib-1.1.5/cnv22.f:281: undefined reference to gf_free_’
/home/tumas/grib2togrib1/cnvgrib-1.1.5/cnv22.f:282: undefined reference to gf_free_' cnv22.o:(.debug_info+0x3ca): undefined reference to …Dm_params’
cnv21.o: In function cnv21': /home/tumas/grib2togrib1/cnvgrib-1.1.5/cnv21.f:61: undefined reference to getgb2_’
/home/tumas/grib2togrib1/cnvgrib-1.1.5/cnv21.f:135: undefined reference to rdieee_' /home/tumas/grib2togrib1/cnvgrib-1.1.5/cnv21.f:145: undefined reference to rdieee_’
/home/tumas/grib2togrib1/cnvgrib-1.1.5/cnv21.f:146: undefined reference to rdieee_' /home/tumas/grib2togrib1/cnvgrib-1.1.5/cnv21.f:175: undefined reference to gf_free_’
cnv21.o:(.debug_info+0x335): undefined reference to ..Dm_params' makepds.o: In function makepds’:
/home/tumas/grib2togrib1/cnvgrib-1.1.5/makepds.f:116: undefined reference to params_param_g2_to_g1_' makepds.o:(.debug_info+0x13c): undefined reference to …Dm_params’
makepdsens.o:(.debug_info+0x13f): undefined reference to ..Dm_params' /home/tumas/grib2togrib1/g2lib-1.1.0/libg2.a(addfield.o): In function addfield_’:
addfield.F:(.text+0x59c): undefined reference to gbyte_' addfield.F:(.text+0x8c1): undefined reference to gbyte_’
addfield.F:(.text+0x8fd): undefined reference to gbyte_' addfield.F:(.text+0x96c): undefined reference to gbyte_’
addfield.F:(.text+0x14bd): undefined reference to mkieee_' addfield.F:(.text+0x1a6c): undefined reference to simpack_’
addfield.F:(.text+0x1b9d): undefined reference to cmplxpack_' addfield.F:(.text+0x1c96): undefined reference to simpack_’
addfield.F:(.text+0x1d2a): undefined reference to mkieee_' addfield.F:(.text+0x1e89): undefined reference to getpoly_’
addfield.F:(.text+0x1fa6): undefined reference to `specpack_’
make: *** [cnvgrib] Hata 2

cheers