[DebianGIS-dev] Bug#554244: libgdal1-1.3.2: /usr/lib/libmfhdf.so.4 and /usr/lib/libnetcdf.so.3 both define NC_check_id

David Monniaux David.Monniaux at imag.fr
Tue Nov 3 21:10:44 UTC 2009


Package: libgdal1-1.3.2
Version: 1.3.2-4
Severity: important

/usr/lib/libgdal1.3.2.so refers to both /usr/lib/libmfhdf.so.4 and
/usr/lib/libnetcdf.so.3, both of which define functions with identical
names, in particular NC_check_id. The problem is that each of these
libraries has its own copy of certain data structures, and if both are
loaded terrible things happen, like netcdf initializing certain data
structures with its own functions and reading them with mfhdf's
functions.

The consequence is that it is impossible to write CDF files with
gdal_translate:
$ /usr/bin/gdal_translate -of gmt elevation.tif  foo.gmt
Input file size is 101, 101
netcdf: 3 is not a valid cdfid

(What happens is that NetCDF checks a variable called cdfid against a
list of open files... except that it calls the function from HDF to
perform the check, which fails.)

This is a known incompatibility, for which one can either disable HDF support
in GDAL, or build HDF without including its own NetCDF implementation,
as explained here:
http://trac.osgeo.org/gdal/wiki/HDF

-- System Information:
Debian Release: 4.0
  APT prefers oldstable
  APT policy: (500, 'oldstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.30.5-686
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages libgdal1-1.3.2 depends on:
ii  libc6               2.3.6.ds1-13etch9+b1 GNU C Library: Shared libraries
ii  libcfitsio2         2.510-1.3            shared library for I/O with FITS f
ii  libgcc1             1:4.1.1-21           GCC support library
ii  libgeos2c2a         2.2.3-3              Geometry engine for Geographic Inf
ii  libhdf4g            4.1r4-18.1           The Hierarchical Data Format libra
ii  libjasper-1.701-1   1.701.0-2            The JasPer JPEG-2000 runtime libra
ii  libjpeg62           6b-13                The Independent JPEG Group's JPEG 
ii  libmysqlclient15off 5.0.32-7etch11       mysql database client library
ii  libnetcdf3          3.6.1-1              An interface for scientific data a
ii  libpng12-0          1.2.15~beta5-1+etch2 PNG library - runtime
ii  libpq4              8.1.18-0etch1        PostgreSQL C client library
ii  libstdc++6          4.1.1-21             The GNU Standard C++ Library v3
ii  libtiff4            3.8.2-7+etch3        Tag Image File Format (TIFF) libra
ii  libungif4g          4.1.4-4              shared library for GIF images
ii  libxerces27         2.7.0-3              validating XML parser library for 
ii  unixodbc            2.2.11-13            ODBC tools libraries
ii  zlib1g              1:1.2.3-13           compression library - runtime

Versions of packages libgdal1-1.3.2 recommends:
ii  proj                          4.4.9d-2   Cartographic projection filter and

-- no debconf information





More information about the Pkg-grass-devel mailing list