I've an issue building the new version of GrADS (2.2.2) under Ubuntu 18.04 with GRIB2 enabled.
I'm able to build correctly g2clib 1.6.0 (also tried with 1.6.2) and configure GrADS:
export PREFIX=/opt
export CFLAGS=-fPIC
export LDFLAGS=-L${PREFIX}/lib
export CPPFLAGS=-I${PREFIX}/include
export SUPPLIBS=${PREFIX}
PKG_CONFIG=/usr/bin/pkg-config ./configure \
--prefix=${PREFIX} \
--with-hdf5-include=/usr/include/hdf5/serial \
--with-hdf5-libdir=/usr/lib/x86_64-linux-gnu/hdf5/serial \
;
but when i make this error show up:
make
...
gcc -DHAVE_CONFIG_H -I. -I. -I/opt/include -I/usr/include/hdf5/serial -I/usr/include/geotiff -I/opt/include -fPIC -rdynamic -c gabufrtbl.c
gcc -fPIC -rdynamic -L/opt/lib -o grads grads.o gxsubs.o gxmeta.o gxchpl.o gxcntr.o gxstrm.o gxdb.o gxwmap.o gxshad.o gxshad2.o gaexpr.o gafunc.o gautil.o gagx.o gscrpt.o gamach.o gatxt.o galloc.o gaddes.o gacfg.o gaio.o gauser.o gasdf.o bufrstn.o gabufr.o gabufrtbl.o -L/opt/lib -lreadline -lncurses -lgrib2c -ljasper -lpng15 -lz -lmfhdf -ldf -ljpeg -lz -ludunits2 -lhdf5 -ljpeg -lz -ludunits2 -lnetcdf -lgeotiff -ltiff -lshp -ldl -lm
/opt/lib/libgrib2c.a(g2_getfld.o): In function `g2_getfld':
/build/g2clib/g2_getfld.c:421: undefined reference to `g2_unpack4'
/build/g2clib/g2_getfld.c:438: undefined reference to `g2_unpack5'
/build/g2clib/g2_getfld.c:364: undefined reference to `g2_unpack1'
/opt/lib/libgrib2c.a(g2_unpack7.o): In function `g2_unpack7':
/build/g2clib/g2_unpack7.c:120: undefined reference to `rdieee'
/build/g2clib/g2_unpack7.c:134: undefined reference to `jpcunpack'
/opt/lib/libgrib2c.a(simunpack.o): In function `simunpack':
/build/g2clib/simunpack.c:48: undefined reference to `rdieee'
/opt/lib/libgrib2c.a(specunpack.o): In function `specunpack':
/build/g2clib/specunpack.c:55: undefined reference to `rdieee'
/build/g2clib/specunpack.c:71: undefined reference to `rdieee'
/opt/lib/libgrib2c.a(pngunpack.o): In function `pngunpack':
/build/g2clib/pngunpack.c:49: undefined reference to `rdieee'
/opt/lib/libgrib2c.a(comunpack.o): In function `comunpack':
/build/g2clib/comunpack.c:61: undefined reference to `rdieee'
/opt/lib/libgrib2c.a(comunpack.o):/build/g2clib/comunpack.c:92: more undefined references to `rdieee' follow
collect2: error: ld returned 1 exit status
Makefile:771: recipe for target 'grads' failed
make[2]: *** [grads] Error 1
make[2]: Leaving directory '/build/grads/src'
Makefile:614: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/build/grads/src'
Makefile:462: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
If I make without GRIB2 it finish correctly with all enabled (less GUI and OpenDAP).
I've an issue building the new version of GrADS (
2.2.2) under Ubuntu18.04with GRIB2 enabled.I'm able to build correctly g2clib
1.6.0(also tried with1.6.2) and configure GrADS:but when i
makethis error show up:If I make without GRIB2 it finish correctly with all enabled (less GUI and OpenDAP).