GithubHelp home page GithubHelp logo

grads's People

Contributors

j-m-adams avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

grads's Issues

Compile issue with GRIB2 enabled under Ubuntu 18.04

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).

configure issue in dev branch

Jennifer,

Sorry for the huge post, but trying to give you as much info as I can that you might need.

I'm can't seem to get netcdf to be found and enabled during ./configure below is what I've tried on Ubuntu 18.04
also, not sure why it can not find /usr/bin/pkg-config but PKG_CONFIG=/usr/bin/pkg-config seems to resolve that problem.

I've looked at config.log and read through configure but don't see anything that helps. It looks like your have to have hdf4 if you want netcdf? is this correct. On Ubuntu there are two versions of hdf4 and it looks like the alt version is perferred because other packages depend on hdf and netcdf being in separate libraries.

Related packages:

libhdf4-0 - Hierarchical Data Format library (embedded NetCDF)
libhdf4-0-alt - Hierarchical Data Format library (without NetCDF)
libhdf4-alt-dev - Hierarchical Data Format development files (without NetCDF)
libhdf4-dev - Hierarchical Data Format development files (embedded NetCDF)

libnetcdf-dev - creation, access, and sharing of scientific data
libnetcdf13 - Interface for scientific data access to large binary data

And I have the following packages installed in the system libraries:

hdf4-tools:amd64/bionic 4.2.13-2 uptodate
hdf5-helpers:amd64/bionic 1.10.0-patch1+docs-4 uptodate
hdf5-tools:amd64/bionic 1.10.0-patch1+docs-4 uptodate
libhdf4-0:amd64/bionic 4.2.13-2 uptodate
libhdf4-0-alt:amd64/bionic 4.2.13-2 uptodate
libhdf4-alt-dev:amd64/bionic 4.2.13-2 uptodate

libhdf5-100:amd64/bionic 1.10.0-patch1+docs-4 uptodate
libhdf5-cpp-100:amd64/bionic 1.10.0-patch1+docs-4 uptodate
libhdf5-dev:amd64/bionic 1.10.0-patch1+docs-4 uptodate

libnetcdf-dev:amd64/bionic 1:4.6.0-2build1 uptodate
libnetcdf13:amd64/bionic 1:4.6.0-2build1 uptodate
netcdf-bin:amd64/bionic 1:4.6.0-2build1 uptodate

Or, maybe I need some other options set or something else?

woodbri@B1B8B6F:~/work/GrADS-jam$ PKG_CONFIG=/usr/bin/pkg-config ./configure \
--prefix=/usr/local \
--with-hdf5-include=/usr/include/hdf5/serial \
--with-hdf5-libdir=/usr/lib/x86_64-linux-gnu \
--with-netcdf-include=/usr/include \
--with-netcdf-libdir=/usr/lib/x86_64-linux-gnu \
--with-hdf4-include=/usr/include/hdf \
--with-hdf4-libdir=/usr/lib
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
/home/woodbri/work/GrADS-jam/etc/missing: Unknown `--is-lightweight' option
Try `/home/woodbri/work/GrADS-jam/etc/missing --help' for more information
configure: WARNING: 'missing' script is too old or missing
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking how to print strings... printf
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for shl_load... no
checking for shl_load in -ldld... no
checking for dlopen... no
checking for dlopen in -ldl... yes
checking whether a program can dlopen itself... yes
checking whether a statically linked program can dlopen itself... no
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no

Checking for programs
---------------------
checking for gawk... (cached) gawk
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking for xlc++... no
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether ln -s works... yes

Setting host specific options
-----------------------------
Host machine: x86_64-unknown-linux-gnu

Checking system libraries, headers, and compiler features
---------------------------------------------------------
checking for cos in -lm... yes
checking for X... libraries , headers
checking for gethostbyname... yes
checking for connect... yes
checking for remove... yes
checking for shmat... yes
checking for IceConnectionNumber in -lICE... yes

checking for ANSI C header files... (cached) yes
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking sys/file.h usability... yes
checking sys/file.h presence... yes
checking for sys/file.h... yes
checking for unistd.h... (cached) yes

checking for an ANSI C-conforming const... yes
checking whether byte ordering is bigendian... no
checking for off_t... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking for _LARGEFILE_SOURCE value needed for large files... no

Checking for optional feature support
-------------------------------------
checking for supplibs directory... ../supplibs
Checking for libraries to support extra features ...

readline
--------
looking in ../supplibs
checking readline/readline.h usability... yes
checking readline/readline.h presence... yes
checking for readline/readline.h... yes
checking readline/history.h usability... yes
checking readline/history.h presence... yes
checking for readline/history.h... yes
checking for tgetent in -lreadline... no
checking for tgetent in -lncurses... no
looking in other system locations
checking for a readline compatible library... -lreadline
checking readline.h usability... no
checking readline.h presence... no
checking for readline.h... no
checking for readline/readline.h... (cached) yes
checking whether readline supports history... yes
checking history.h usability... no
checking history.h presence... no
checking for history.h... no
checking for readline/history.h... (cached) yes
JMA -lreadline
JMA -lreadline
JMA yes -lreadline

geotiff
-------
looking in ../supplibs
checking geotiff.h usability... no
checking geotiff.h presence... no
checking for geotiff.h... no
looking in other system locations
checking for main in -ltiff... yes
checking for main in -lgeotiff... yes
configure: searching geotiff includes in /usr/include
checking for geotiffio.h with compiler... no
checking for geotiffio.h with preprocessor... no
configure: searching geotiff includes in /usr/include/geotiff
checking for geotiffio.h with compiler... yes
checking for geotiffio.h with preprocessor... yes

shapefiles
----------
looking in ../supplibs
checking shapefil.h usability... yes
checking shapefil.h presence... yes
checking for shapefil.h... yes
checking for main in -lshp... yes

png
---
checking for main in -lpng15... yes

zlib
----
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking for compress in -lz... yes

jpeg
----
checking for main in -ljpeg... yes

jasper
------
checking jasper.h usability... no
checking jasper.h presence... no
checking for jasper.h... no
checking jasper/jasper.h usability... yes
checking jasper/jasper.h presence... yes
checking for jasper/jasper.h... yes
checking for main in -ljasper... yes

xml2
----
checking for main in -lxml2... yes

curl
----
checking for main in -lcurl... yes

gd
--
looking in ../supplibs
checking gd.h usability... yes
checking gd.h presence... yes
checking for gd.h... yes
checking for gdImageCreate in -lgd... yes
checking for gdImageJpeg in -lgd... yes

grib2
-----
looking in ../supplibs
checking grib2.h usability... yes
checking grib2.h presence... yes
checking for grib2.h... yes
checking for main in -lgrib2c... yes

Cairo
-----
looking in ../supplibs
checking cairo.h usability... no
checking cairo.h presence... no
checking for cairo.h... no
looking in other system locations
checking for CAIRO... yes

hdf5
----
looking in ../supplibs
checking hdf5.h usability... no
checking hdf5.h presence... no
checking for hdf5.h... no
looking in other system locations
checking for compress in -lz... yes
checking for main in -ljpeg... yes
checking for H5Fopen in -lhdf5... yes
checking for hdf5.h with compiler... yes

udunits
-------
looking in ../supplibs
checking udunits2.h usability... no
checking udunits2.h presence... no
checking for udunits2.h... no
looking in other system locations
checking for main in -ludunits2... no
configure: searching udunits2 libraries in /usr/lib64
checking for main in -ludunits2... no
configure: searching udunits2 libraries in /usr/lib
checking for main in -ludunits2... no
configure: searching udunits2 libraries in /usr/local/lib
checking for main in -ludunits2... no
configure: searching udunits2 libraries in /usr/libudunits/lib64
checking for main in -ludunits2... no
configure: searching udunits2 libraries in /usr/local/lib64/libudunits
checking for main in -ludunits2... no
configure: searching udunits2 libraries in /usr/local/udunits/lib
checking for main in -ludunits2... no
configure: searching udunits2 libraries in /usr/local/libudunits/lib
checking for main in -ludunits2... no
configure: searching udunits2 libraries in /usr/udunits/lib
checking for main in -ludunits2... no
configure: searching udunits2 libraries in /usr/local/lib/udunits
checking for main in -ludunits2... no
configure: searching udunits2 libraries in /opt/lib/udunits
checking for main in -ludunits2... no
configure: searching udunits2 libraries in /usr/libudunits/lib
checking for main in -ludunits2... no
configure: searching udunits2 libraries in /usr/local/lib/libudunits
checking for main in -ludunits2... no
configure: searching udunits2 libraries in /opt/lib/libudunits
checking for main in -ludunits2... no
configure: searching udunits2 libraries in /usr/lib/udunits
checking for main in -ludunits2... no
configure: searching udunits2 libraries in /usr/lib/libudunits
checking for main in -ludunits2... no
configure: searching udunits2 includes in /usr/include
checking for udunits2.h with compiler... no
checking for udunits2.h with preprocessor... no
configure: searching udunits2 includes in /usr/local/udunits/include
checking for udunits2.h with compiler... no
checking for udunits2.h with preprocessor... no
configure: searching udunits2 includes in /opt/udunits/include
checking for udunits2.h with compiler... no
checking for udunits2.h with preprocessor... no
configure: searching udunits2 includes in /usr/udunits/include
checking for udunits2.h with compiler... no
checking for udunits2.h with preprocessor... no
configure: searching udunits2 includes in /usr/local/include/udunits
checking for udunits2.h with compiler... no
checking for udunits2.h with preprocessor... no
configure: searching udunits2 includes in /opt/include/udunits
checking for udunits2.h with compiler... no
checking for udunits2.h with preprocessor... no
configure: searching udunits2 includes in /usr/include/udunits
checking for udunits2.h with compiler... no
checking for udunits2.h with preprocessor... no
configure: searching udunits2 includes in /usr/local/libudunits/include
checking for udunits2.h with compiler... no
checking for udunits2.h with preprocessor... no
configure: searching udunits2 includes in /opt/libudunits/include
checking for udunits2.h with compiler... no
checking for udunits2.h with preprocessor... no
configure: searching udunits2 includes in /usr/libudunits/include
checking for udunits2.h with compiler... no
checking for udunits2.h with preprocessor... no
configure: searching udunits2 includes in /usr/local/include/libudunits
checking for udunits2.h with compiler... no
checking for udunits2.h with preprocessor... no
configure: searching udunits2 includes in /opt/include/libudunits
checking for udunits2.h with compiler... no
checking for udunits2.h with preprocessor... no
configure: searching udunits2 includes in /usr/include/libudunits
checking for udunits2.h with compiler... no
checking for udunits2.h with preprocessor... no

hdf4
----

netcdf
------

gadap
-----
Disabled by default. Use --with-gadap to enable OPeNDAP access to station data.


gui
---
looking in system locations
checking for main in -lXext... yes
checking for main in -lXt... yes
checking for main in -lXmu... no
checking for XAW7... no
checking for main in -lXt... (cached) yes
checking for main in -lXmu... (cached) no
configure: creating src/VERSION
configure: creating src/buildinfo.h
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating src/config.h
config.status: src/config.h is unchanged
config.status: executing libtool commands

  +=========================================================================+
   GrADS 2.2.2 : Configured on 01/04/21 for x86_64-unknown-linux-gnu
  +=========================================================================+

  +-------------------------------+
  |                               |
  |  GrADS will be built with:    |
  |                               |
  |  - GUI disabled               |
  |  + READLINE enabled           |
  |  + GEOTIFF enabled            |
  |  + SHAPEFILE enabled          |
  |  + GD enabled                 |
  |  + CAIRO enabled              |
  |  + GRIB2 enabled              |
  |  - HDF4 disabled              |
  |  + HDF5 enabled               |
  |  - NETCDF disabled            |
  |  - OPeNDAP disabled           |
  |                               |
  +-------------------------------+

Run 'make && make install' to build GrADS.
Executables will be installed to bin/ in current dir, unless prefix was specified.

System files for hdf5 and netcdf are located here:

/usr/include/hdf5/serial/hdf5.h  (along with lots of other hdf5 includes)

/usr/lib/x86_64-linux-gnu/libhdf5.so
/usr/lib/x86_64-linux-gnu/libhdf5_cpp.a
/usr/lib/x86_64-linux-gnu/libhdf5_cpp.so
/usr/lib/x86_64-linux-gnu/libhdf5_cpp.so.100
/usr/lib/x86_64-linux-gnu/libhdf5_cpp.so.100.0.0
/usr/lib/x86_64-linux-gnu/libhdf5_hl_cpp.a
/usr/lib/x86_64-linux-gnu/libhdf5_hl_cpp.so
/usr/lib/x86_64-linux-gnu/libhdf5_hl_cpp.so.100
/usr/lib/x86_64-linux-gnu/libhdf5_hl_cpp.so.100.0.0
/usr/lib/x86_64-linux-gnu/libhdf5_serial.a
/usr/lib/x86_64-linux-gnu/libhdf5_serial.settings
/usr/lib/x86_64-linux-gnu/libhdf5_serial.so
/usr/lib/x86_64-linux-gnu/libhdf5_serial.so.100
/usr/lib/x86_64-linux-gnu/libhdf5_serial.so.100.0.1
/usr/lib/x86_64-linux-gnu/libhdf5_serial_fortran.a
/usr/lib/x86_64-linux-gnu/libhdf5_serial_fortran.so
/usr/lib/x86_64-linux-gnu/libhdf5_serial_fortran.so.100
/usr/lib/x86_64-linux-gnu/libhdf5_serial_fortran.so.100.0.1
/usr/lib/x86_64-linux-gnu/libhdf5_serial_hl.a
/usr/lib/x86_64-linux-gnu/libhdf5_serial_hl.so
/usr/lib/x86_64-linux-gnu/libhdf5_serial_hl.so.100
/usr/lib/x86_64-linux-gnu/libhdf5_serial_hl.so.100.0.0
/usr/lib/x86_64-linux-gnu/libhdf5_serialhl_fortran.a
/usr/lib/x86_64-linux-gnu/libhdf5_serialhl_fortran.so
/usr/lib/x86_64-linux-gnu/libhdf5_serialhl_fortran.so.100
/usr/lib/x86_64-linux-gnu/libhdf5_serialhl_fortran.so.100.0.0
/usr/lib/x86_64-linux-gnu/hdf5/serial
/usr/lib/x86_64-linux-gnu/hdf5/serial/include
/usr/lib/x86_64-linux-gnu/hdf5/serial/lib
/usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.a
/usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.settings
/usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.so
/usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5_cpp.a
/usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5_cpp.so
/usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5_fortran.a
/usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5_fortran.so
/usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5_hl.a
/usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5_hl.so
/usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5_hl_cpp.a
/usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5_hl_cpp.so
/usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5hl_fortran.a
/usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5hl_fortran.so
/usr/lib/x86_64-linux-gnu/pkgconfig/hdf5-serial.pc
/usr/lib/x86_64-linux-gnu/pkgconfig/hdf5.pc

# ---- hfd4 files ----
/usr/include/hdf/hdf4_netcdf.h
/usr/include/hdf/*.h

/usr/lib/libmfhdf.so.0    # tried adding ln -s /usr/lib/libmfhdf.so.0 /usr/lib/libmfhdf.so but no joy
/usr/lib/libmfhdf.so.0.0.0
/usr/lib/libmfhdfalt.so.0
/usr/lib/libmfhdfalt.so.0.0.0

/usr/include/netcdf.h
/usr/include/netcdf_mem.h
/usr/include/netcdf_meta.h
/usr/include/hdf/hdf2netcdf.h
/usr/include/hdf/hdf4_netcdf.h
/usr/lib/x86_64-linux-gnu/libnetcdf.settings
/usr/lib/x86_64-linux-gnu/libnetcdf.so
/usr/lib/x86_64-linux-gnu/libnetcdf.so.13
/usr/lib/x86_64-linux-gnu/pkgconfig/netcdf.pc

grib2 support assumes libpng15

On Fedora, grib2 is compile with libpng and there is no libpng15, so the grib2 configure test fails:

checking for main in -lpng15... no
...
  |  - GRIB2 disabled             |

Failed Building in WSL Ubuntu 22.04

I tried building GrADS from source using these libraries:

  • Intel OneAPI Compiler
  • ZLib 1.31
  • HDF5 1.14.2
  • NetCDF-C 4.9.2
  • NetCDF-Fortran 4.6.1

I have no background in computer engineering/science and this is my first time using Linux. Here I attach config.log and MakeFile. Thank you.
config.log
Makefile.log

Ubuntu 18.04 Makefile problem and gradspy undefined symbol

Look like I've run into two issues with building on Ubuntu 18.04.

  1. It looks like the Makefile linking the grads command is failing to add -ludunits2
PKG_CONFIG=/usr/bin/pkg-config ./configure --prefix=/usr/local \
--with-hdf5-include=/usr/include/hdf5/serial \
--with-hdf5-libdir=/usr/lib/x86_64-linux-gnu \
--with-netcdf-include=/usr/include \
--with-netcdf-libdir=/usr/lib/x86_64-linux-gnu \
--with-hdf4-include=/usr/include/hdf \
--with-hdf4-libdir=/usr/lib \
--with-udunits2-include=/usr/lib \
--with-udunits2-libdir=/usr/lib/x86_64-linux-gnu

# works ok but make fails like this:

gcc   -g -O2 -rdynamic   -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..//lib      -lreadline -lgrib2c -ljasper -lpng15 -lz  -lhdf5 -ljpeg -lz  -lnetcdf  -lgeotiff -ltiff  -lshp    -ldl  -lm
gasdf.o: In function `initUnitSys':
/home/woodbri/work/GrADS-jam/src/gasdf.c:273: undefined reference to `ut_ignore'
/home/woodbri/work/GrADS-jam/src/gasdf.c:273: undefined reference to `ut_set_error_message_handler'
/home/woodbri/work/GrADS-jam/src/gasdf.c:276: undefined reference to `ut_read_xml'
/home/woodbri/work/GrADS-jam/src/gasdf.c:281: undefined reference to `ut_get_unit_by_name'
/home/woodbri/work/GrADS-jam/src/gasdf.c:285: undefined reference to `ut_get_unit_by_name'
/home/woodbri/work/GrADS-jam/src/gasdf.c:289: undefined reference to `ut_get_unit_by_name'
/home/woodbri/work/GrADS-jam/src/gasdf.c:293: undefined reference to `ut_get_unit_by_name'
gasdf.o: In function `compare_units':
/home/woodbri/work/GrADS-jam/src/gasdf.c:1472: undefined reference to `ut_trim'
/home/woodbri/work/GrADS-jam/src/gasdf.c:1475: undefined reference to `ut_parse'
/home/woodbri/work/GrADS-jam/src/gasdf.c:1476: undefined reference to `ut_parse'
/home/woodbri/work/GrADS-jam/src/gasdf.c:1503: undefined reference to `ut_free'
/home/woodbri/work/GrADS-jam/src/gasdf.c:1482: undefined reference to `ut_are_convertible'
/home/woodbri/work/GrADS-jam/src/gasdf.c:1502: undefined reference to `ut_free'
/home/woodbri/work/GrADS-jam/src/gasdf.c:1503: undefined reference to `ut_free'
/home/woodbri/work/GrADS-jam/src/gasdf.c:1502: undefined reference to `ut_free'
/home/woodbri/work/GrADS-jam/src/gasdf.c:1483: undefined reference to `ut_get_converter'
/home/woodbri/work/GrADS-jam/src/gasdf.c:1487: undefined reference to `cv_convert_double'
/home/woodbri/work/GrADS-jam/src/gasdf.c:1488: undefined reference to `cv_convert_double'
/home/woodbri/work/GrADS-jam/src/gasdf.c:1502: undefined reference to `ut_free'
/home/woodbri/work/GrADS-jam/src/gasdf.c:1503: undefined reference to `ut_free'
/home/woodbri/work/GrADS-jam/src/gasdf.c:1504: undefined reference to `cv_free'
gasdf.o: In function `findZ':
/home/woodbri/work/GrADS-jam/src/gasdf.c:2065: undefined reference to `ut_free'
/home/woodbri/work/GrADS-jam/src/gasdf.c:2020: undefined reference to `ut_parse'
/home/woodbri/work/GrADS-jam/src/gasdf.c:2022: undefined reference to `ut_are_convertible'
/home/woodbri/work/GrADS-jam/src/gasdf.c:2029: undefined reference to `ut_are_convertible'
/home/woodbri/work/GrADS-jam/src/gasdf.c:2037: undefined reference to `ut_are_convertible'
gasdf.o: In function `findT':
/home/woodbri/work/GrADS-jam/src/gasdf.c:2136: undefined reference to `ut_free'
/home/woodbri/work/GrADS-jam/src/gasdf.c:2137: undefined reference to `ut_free'
/home/woodbri/work/GrADS-jam/src/gasdf.c:2105: undefined reference to `ut_parse'
/home/woodbri/work/GrADS-jam/src/gasdf.c:2106: undefined reference to `ut_encode_time'
/home/woodbri/work/GrADS-jam/src/gasdf.c:2106: undefined reference to `ut_offset_by_time'
/home/woodbri/work/GrADS-jam/src/gasdf.c:2109: undefined reference to `ut_are_convertible'
gasdf.o: In function `set_time_type':
/home/woodbri/work/GrADS-jam/src/gasdf.c:2595: undefined reference to `ut_parse'
/home/woodbri/work/GrADS-jam/src/gasdf.c:2597: undefined reference to `ut_encode_time'
/home/woodbri/work/GrADS-jam/src/gasdf.c:2597: undefined reference to `ut_offset_by_time'
/home/woodbri/work/GrADS-jam/src/gasdf.c:2598: undefined reference to `ut_are_convertible'
/home/woodbri/work/GrADS-jam/src/gasdf.c:2602: undefined reference to `ut_free'
/home/woodbri/work/GrADS-jam/src/gasdf.c:2603: undefined reference to `ut_free'
gasdf.o: In function `gadsdf':
/home/woodbri/work/GrADS-jam/src/gasdf.c:880: undefined reference to `ut_parse'
/home/woodbri/work/GrADS-jam/src/gasdf.c:889: undefined reference to `ut_encode_time'
/home/woodbri/work/GrADS-jam/src/gasdf.c:889: undefined reference to `ut_offset_by_time'
/home/woodbri/work/GrADS-jam/src/gasdf.c:892: undefined reference to `ut_are_convertible'
/home/woodbri/work/GrADS-jam/src/gasdf.c:894: undefined reference to `ut_get_converter'
/home/woodbri/work/GrADS-jam/src/gasdf.c:896: undefined reference to `cv_convert_double'
/home/woodbri/work/GrADS-jam/src/gasdf.c:898: undefined reference to `ut_decode_time'
/home/woodbri/work/GrADS-jam/src/gasdf.c:899: undefined reference to `cv_free'
collect2: error: ld returned 1 exit status
Makefile:771: recipe for target 'grads' failed
make[2]: *** [grads] Error 1
make[2]: Leaving directory '/data/work/GrADS-jam/src'
Makefile:614: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/data/work/GrADS-jam/src'
Makefile:462: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1

but linking like this works by manually adding -ludunits2 to the link command

cd src
gcc   -g -O2 -rdynamic   -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..//lib      -lreadline -lgrib2c -ljasper -lpng15 -lz  -lhdf5 -ljpeg -lz  -lnetcdf  -lgeotiff -ltiff  -lshp  -ludunits2  -ldl  -lm

cd ..
make  # finishes without any additional errors

notice the manual inclusion of '-ludunits2' to get it to link,
2. but gradspy fails with undefined symbol below:

sudo make install
cd src
sudo python3 setup.py install

python3
Python 3.6.9 (default, Oct  8 2020, 12:12:24)
[GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import gradspy
/usr/local/lib/libgradspy.so: undefined symbol: ut_ignore
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
SystemError: initialization of gradspy failed without raising an exception

Compile issue on Ubuntu with branch dev

I need python3 support on Ubuntu 18.04 and I'm trying to compile dev branch and got the following error:

PKG_CONFIG=/usr/bin/pkg-config ./configure

... stuff ...

  +=========================================================================+
   GrADS 2.2.2 : Configured on 12/08/20 for x86_64-unknown-linux-gnu
  +=========================================================================+

  +-------------------------------+
  |                               |
  |  GrADS will be built with:    |
  |                               |
  |  - GUI disabled               |
  |  + READLINE enabled           |
  |  + GEOTIFF enabled            |
  |  + SHAPEFILE enabled          |
  |  + GD enabled                 |
  |  + CAIRO enabled              |
  |  + GRIB2 enabled              |
  |  - HDF4 disabled              |
  |  - HDF5 disabled              |
  |  - NETCDF disabled            |
  |  - OPeNDAP disabled           |
  |                               |
  +-------------------------------+

Run 'make && make install' to build GrADS.

make

... stuff ...

gaddes.c: In function ‘gaddes’:
gaddes.c:1235:8: error: ‘struct gavar’ has no member named ‘h5vid’; did you mean ‘ncvid’?
  pvar->h5vid = -999;
        ^~~~~
        ncvid

Any thoughts on this. Is this just a typo as suggested?

GrADS compilation failing with error about tdefi being undeclared

The error comes when compiling src/gauser.c (using the source from the "dev" branch):

gauser.c: In function 'gaqury':
gauser.c:4581:29: error: 'tdefi' undeclared (first use in this function)
  gr2t(pfi->grvals[3], 1.0, &tdefi);
                             ^~~~~
gauser.c:4581:29: note: each undeclared identifier is reported only once for each function it appears in
gauser.c:4582:2: error: 'tfile' undeclared (first use in this function); did you mean 'gsfile'?
  tfile = gafndt(pfi->name, &tdefi, &tdefi, pfi->abvals[3], pfi->pchsub1, pfi->ens1,1,1,&flag);
  ^~~~~
  gsfile
gauser.c:4590:41: error: 'tdef' undeclared (first use in this function); did you mean 'tdefi'?
      gr2t(pfi->grvals[3], (gadouble)i, &tdef);
                                         ^~~~
                                         tdefi
gauser.c:4591:6: error: 'tfile2' undeclared (first use in this function); did you mean 'tfile'?
      tfile2 = gafndt(pfi->name, &tdef, &tdefi, pfi->abvals[3], pfi->pchsub1, pfi->ens1,1,1,&flag);
      ^~~~~~
      tfile
gauser.c:4655:4: error: 'n_atts' undeclared (first use in this function); did you mean 'attr'?
    n_atts = h5pattrs(h5id, varnam, pvar->abbrv, hdrflg, fnum, pfi->title);
    ^~~~~~
    attr
make[2]: *** [gauser.o] Error 1
make[1]: *** [all] Error 2
make: *** [all-recursive] Error 1

It looks like the problem is that tdefi is only defined when USENETCDF == 1 or USEHDF == 1, but some of the code using tdefi is only bracketed by #if USEHDF5 ==1/#endif. Notice that in the latter condition, the preprocessor variable is USEHDF5 not just USEHDF (without the "5" at the end).

RFE: Support HDF5 1.12 API

When building with hdf5 1.12.1 I get:

In file included from /usr/include/H5public.h:32,
                 from /usr/include/hdf5.h:22,
                 from grads.h:13,
                 from gaio.c:19:
gaio.c: In function 'h5pattrs':
gaio.c:4778:10: error: too few arguments to function 'H5Oget_info3'
 4778 |     rc = H5Oget_info(vid,&oinfo);
      |          ^~~~~~~~~~~

Must use -DH5_USE_110_API to work around it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.