HDF version 4.2.8 released on 2012-08-03
===================================================

INTRODUCTION

This document describes the differences between HDF 4.2.7 and HDF 4.2.8.
It is written for people who are familiar with previous releases of HDF 
and wish to migrate to HDF 4.2.8.

The HDF 4.2.8 documentation can be found on the The HDF Group's FTP server:

    ftp://ftp.hdfgroup.org/HDF/Documentation/

First-time HDF users are encouraged to read the HDF FAQ, which can be
reached from the HDF product home page:
  
    http://hdfgroup.org/products/hdf4/

If you have any questions or comments, please see the HDF Support page:

    http://hdfgroup.org/services/support.html

CONTENTS

- New features and changes
  -- Source distribution
  -- Configuration
  -- Library
  -- Utilities
- Support for new platforms and compilers
- Bugs fixed since HDF 4.2.7
  -- Configuration
  -- Library
  -- Utilities
- Documentation
- Platforms tested
- Known problems


New features and changes
========================
   Source distribution
   ===================
   - [None.  PPM - YYYY/MM/DD]

   Configuration
   ============= 
   - [None]
     
   Library
   ========= 
   - It was discovered by the HDF Mapping Project that there were certain
     type of palettes that cannot be retrieved by existing functions.  A new
     function, GRgetpalinfo, was added to allow applications to get information
     about palettes.  Please refer to the HDF User's Guide and Reference Manual
     for more information regarding this palette issue.  BMR - 2012/07/26

   - It was also discovered that the IMCOMP compression was not detected.
     Although IMCOMP is no longer supported in new data, HDF still needs to
     detect IMCOMP compression from existing data.  We added COMP_CODE_IMCOMP
     to comp_coder_t with value 12 (same as COMP_IMCOMP.)  The library and
     hdp now can detect IMCOMP compression.  However, writing IMCOMP compressed
     images is not allowed.  BMR - 2012/07/26

   - Added GRgetcomptype to return image's compression, which can include
     IMCOMP.  BMR - 2012/07/26

   Test
   ====
   - [None]

   Utilities
   ========= 
   - [None]


Support for new platforms and compilers
=======================================
   -  Mac OS X 10.7.4 with GNU gcc and gfortran compilers


Bugs fixed since HDF 4.2.7
=========================
   Configuration
   =============
   - Add config/apple-darwin11.4.0 customized for Mac OS X 10.7 Lion. This one
     set production CFLAGS to -O0 to eliminate the test errors encountered in
     Lion systems only. This one lets HDF4 to be build and run in Lion systems.
     More investigate needed to locate the exact locations of the errors.
     (HDFFR-1327 and HDFFR-1328) AKC - 2012/07/03

   - The USE_ENUM in mfhdf/libsrc/netcdf.h, which is copied from
     config/netcdf-apple.h, which generated an error due to xdr_enum overwrote
     memory outside of its designated enum variable. This happened only to the
     apple provided compiler (i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1).
     We decided to not define USE_ENUM for all apple OS for now. (HDFFR-1318)
     AKC - 2012/07/01

   Library
   ========= 
   - [None]

   Utilities
   ========= 
   - Added test file IMCOMP.hdf and sample file dumpgr-20.out for IMCOMP test
     for testing the detection of IMCOMP compressed image in hdp.
     BMR - 2012/07/26


Documentation
==============
   - The Reference Manual and User's Guide have been updated to include
     new functions:
     + GRgetpalinfo
     + GRgetcomptype
     BMR - 2012/07/26


Platforms tested
================

This version has been tested in the following platforms:

   Linux 2.6.32-279.2.1         gcc (GCC) 4.4.6 20120305 (Red Hat 4.4.6-4)
   .el6.ppc64 #1                GNU Fortran (GCC) 4.4.6 20120305 (Red Hat 4.4.6-4)
   SMP ppc64 GNU/Linux          IBM XL Fortran for Linux, V13.1 (64-bit mode)
   (ostrich)

   Linux 2.6.18-194.3.1.el5 #1   gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-50)
      SMP i686 i386              GNU Fortran (GCC) 4.1.2 20080704
   (jam)                             (Red Hat 4.1.2-52)
                                 pgcc and pgf90 11.9-0 32-bit target 
                                 on x86 Linux -tp penryn
                                 Intel(R) C Compiler, Version 12.1.0 20110811
                                 Intel(R) Fortran Compiler, Version 12.1.0

   Linux 2.6.18-274.17.1.el5 #1  gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-51)
      SMP x86_64 GNU/Linux       GNU Fortran (GCC) 4.1.2 20080704 
   (koala)                           (Red Hat 4.1.2-51)
                                 icc (ICC) 12.1.0 20110811
                                 ifort (IFORT) 12.1.0 20110811
                                 pgcc and pgf90 11.9-0 64-bit target 
                                 on x86-64 Linux -tp nehalem

   SunOS 5.10 32- and 64-bit     Sun C 5.9 SunOS_sparc Patch 124867-16 2010/08/11 
   (linew)                       Sun Fortran 95 8.3 SunOS_sparc Patch 127000-13 2010/01/26

   Xeon Linux 2.6.32.24-0.2.1.2230.2.PTF-default
      #1 SMP x86_64              Intel(R) C Compiler Version 11.1.073 20100806
      SGI Altix UV               Intel(R) Fortran Compiler Version 11.1.073
   (ember)                       gcc (SUSE Linux) 4.3.4 [gcc-4_3-branch revision 152973
                                 GNU Fortran (SUSE Linux) 4.3.4 [gcc-4_3-branch revision 152973]

   Windows 7                     Visual Studio 2008 w/ Intel Fortran 11.1 (cmake)
                                 Visual Studio 2010 w/ Intel Fortran 12 (cmake)
                                 Cygwin(1.7.15 native gcc(4.5.3) compiler and gfortran)

   Windows 7 x64                 Visual Studio 2008 w/ Intel Fortran 11.1 (cmake)
                                 Visual Studio 2010 w/ Intel Fortran 12 (cmake)
                                 Cygwin(1.7.15 native gcc(4.5.3) compiler and gfortran)
                                 
   MAC OS X Intel 10.6.8         Darwin 10.8.0
   (32 bit)                      i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1
   (tejeda)                      GNU Fortran (GCC) 4.6.1
                                 icc (ICC) 12.1.0 20110811
                                 ifort (IFORT) 12.1.0 20110811

   MAC OS X Intel 10.6.8         Darwin 10.8.0
   (64 bit)                      icc (ICC) 12.1.0 20110811 
   (fred)                        ifort (IFORT) 12.1.0 20110811 
                                 i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1
                                 GNU Fortran (GCC) 4.6.2
                             
   MAC OS X Intel 10.7.4         Darwin 11.4.0
   (64 bit)                      i686-apple-darwin11-llvm-gcc-4.2.1 (GCC) 4.2.1
   (hdf-duck)                    gcc (GCC) 4.6.2
                                 GNU Fortran (GCC) 4.6.2

    Debian6.0.3 2.6.32-5-686 #1 SMP i686 GNU/Linux
                                  gcc (Debian 4.4.5-8) 4.4.5
                                  GNU Fortran (Debian 4.4.5-8) 4.4.5

    Debian6.0.3 2.6.32-5-amd64 #1 SMP x86_64 GNU/Linux
                                  gcc (Debian 4.4.5-8) 4.4.5
                                  GNU Fortran (Debian 4.4.5-8) 4.4.5

    Fedora15 3.2.9-2.fc16.i686.PAE #1 SMP i686 i686 i386 GNU/Linux
                                  gcc (GCC) 4.6.2 20111027 (Red Hat 4.6.2-1)
                                  GNU Fortran (GCC) 4.6.2 20111027 (Red Hat 4.6.2-1)

    Fedora15 3.2.9-2.fc16.x86_64 #1 SMP x86_64 x86_64 x86_64 GNU/Linux
                                  gcc (GCC) 4.6.2 20111027 (Red Hat 4.6.2-1)
                                  GNU Fortran (GCC) 4.6.2 20111027 (Red Hat 4.6.2-1)

    SUSE 12.1 3.1.9-1.4-desktop #1 SMP PREEMPT i686 i686 i386 GNU/Linux
                                  gcc (SUSE Linux) 4.6.2
                                  GNU Fortran (SUSE Linux) 4.6.2

    SUSE 12.1 3.1.9-1.4-desktop #1 SMP PREEMPT x86_64 x86_64 x86_64 GNU/Linux
                                  gcc (SUSE Linux) 4.6.2
                                  GNU Fortran (SUSE Linux) 4.6.2 

    Ubuntu 11.10 3.2.0-26-generic #23-Ubuntu SMP i686 GNU/Linux
                                  gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
                                  GNU Fortran (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3

    Ubuntu 11.10 3.2.0-26-generic #23-Ubuntu SMP x86_64 GNU/Linux
                                  gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
                                  GNU Fortran (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3


Known problems
==============

o  For Mac OS X 10.7 Lion, the test suite on the mfhdf side encounter 2 erros,
   when optimization is used, whether with the Apple GCC compiler or with the
   GNU GCC compiler.  CFLAGS must be set to use no optimization (-O0 or -g) to
   avoid these failures.  config/apple-darwin11.4.0 is added to direct configure
   to use -O0 for CFLAGS for Mac OS X 10.7 Lion. We hope to fix the bug in the
   next release.  (HDFFR-1327 and HDFFR-1328) AKC - 2012/07/03

o  On IBM PowerPC 64 hdftest fails when gcc 4.4.6 is used with -O3 optimization level. 

o  When building in AIX systems, if CC is xlc with -qlanglvl=ansi, configure
   will fail when checking for the jpeglib.h header due to the duplicated
   macro definition of HAVE_STDLIB_H.  This is because some newer builds
   of jpeg library have HAVE_STDLIB_H defined in the jconfig.h header file.
   Without the -qlanglvl=ansi, some older xlc (e.g., V7.0) still fails but
   newer xlc (e.g., V9.0) passes.  AKC - 2010/02/17

o  When building on Linux/UNIX platforms, the szip shared library files must
   be in the system library path. This can be done by adding a link to
   the libsz.* files in the /usr/lib folder or by adding the library
   location to the LD_LIBRARY_PATH environment variable.
      Ex. export LD_LIBRARY_PATH=path_to_szip_lib:$LD_LIBRARY_PATH
   Optionally, one can use the static szip library files by adding '-static'
   to the CFLAGS environment variable.
   
o  Existing data written by an HDF4 Library prior to HDF 4.2r2:
   When a one-dimensional SDS and a dimension scale have
   the same name, subsequent accesses to the dimension scale or to the
   SDS might produce undesired results because the libraries could not
   distinguish between the two objects.  In the case of writing, data
   might even be corrupted.  For example, SDS data might be written to a
   dimension variable or vice versa.

   HDF4 Library Releases 4.2r2 and later make a distinction between an SDS
   and a dimension variable.  However, as with older versions, these recent
   versions are unable to detect such conflicts in files created by earlier 
   releases.  It is therefore STRONGLY recommended to check for such name 
   duplication before working with data created with a pre-4.2r2 library.

   The functions SDgetnumvars_byname and SDnametoindices are provided
   to help detect such name conflicts and select the correct object to
   access, respectively; see the HDF Reference Manual entries for
   further details.

o  This release does not support VMS systems.

o  N-bit compression is not supported with Fortran APIs.

o  Using both fill-value and compression on SD datasets does not work.

o  When using PGI compilers, make sure that the JPEG library is also compiled 
   with a PGI C compiler; linking with a JPEG library built with gcc causes 
   JPEG library tests to fail.  To bypass the problem:

       x Set LIBS flag to $PGI_JPEG_INSTALL_DIR/lib/libjpeg.a
         where $PGI_JPEG_INSTALL_DIR points to the installation directory
         for the PGI-compiled JPEG library:

         setenv LIBS $PGI_JPEG_INSTALL_DIR/lib/libjpeg.a

       x Use the --with-jpeg=$PGI_JPEG_INSTALL_DIR configure flag to 
         configure with the PGI-compiled JPEG library:

         ./configure --with-jpeg=$PGI_JPEG_INSTALL_DIR --with-zlib....

o  In order for the API SDgetdatasize to get the correct compressed size
   of the data, the dataset needs to be closed (SDendaccess) or read
   (SDreaddata) after being written and before SDgetdatasize is called.
