[DebianGIS-dev] Bug#437098: Bug#437098: Bug#437098: hdf4 amd64 compatibility to 32-bit

Francesco P. Lovergine frankie at debian.org
Fri Jun 20 21:03:40 UTC 2008


severity 437098 grave
found 4.1r4-18
thanks

On Mon, May 05, 2008 at 10:18:19AM +0200, Francesco P. Lovergine wrote:
> On Sun, May 04, 2008 at 04:00:27PM +0700, Ivan Shmakov wrote:
> > >>>>> T Dinter <dinter at iup.physik.uni-bremen.de> writes:
> > 
> >  > Package: libhdf4g
> >  > Version: 4.1r4-21
> > 
> >  > Dear hdf4 maintainers, since i have an amd64 system, i have problems
> >  > with hdf4 files create by a 32-bit system (e.g. satellite data MODIS,
> >  > MISR ....). I sent you two little hdf files create on a standart
> >  > 32-bit and the amd64 system with example source (sd_rd.c) from hdf
> >  > web site. And if you look with a hexeditor into the files, you see
> >  > that the bytes of the dataset and dimensions are swapped. So I guess
> >  > this is a problem of compiler flags (-DBIG_LONGS -DSWAP).
> > 
> > 	I could probably confirm that this bug is there as of
> > 	4.1r4-18.1_amd64 (etch), e. g.:
> > 
> > amd64 $ ncdump-hdf -h MOD09GHK.A2004186.h20v09.005.2007045162226 
> > netcdf MOD09GHK.A2004186.h20v09.005.2007045162226 {
> > dimensions:
> > 	YDim_MOD_Grid_L2g_2d = 1611202560 ;
> > 	XDim_MOD_Grid_L2g_2d = 1611202560 ;
> > 	Total_Additional_Observations = 1068902144 ;
> > 	Data_Rows = 1611202560 ;
> > 
> > ...
> > amd64 $ 
> > 
> > 	While it should instead read:
> > 
> > i386 $ ncdump-hdf -h /tmp/MOD09GHK.A2004186.h20v09.005.2007045162226.hdf 
> > netcdf MOD09GHK.A2004186.h20v09.005.2007045162226 {
> > dimensions:
> > 	YDim_MOD_Grid_L2g_2d = 2400 ;
> > 	XDim_MOD_Grid_L2g_2d = 2400 ;
> > 	Total_Additional_Observations = 2602559 ;
> > 	Data_Rows = 2400 ;
> > 
> > ...
> 
> Thanks for the hints, I will see if it was an already managed issue in
> current hdf4
> 

Ok, the library is broken on some 64bit archs (tried on amd64, and
I think it is limited to that) and based on my tests it works with
4.2r3. I suspect it was seriously broken since ages due to missing arch
management in the old 4.1r4. There are Debian fixes for ia64 but x86_64
was simply not considered 7 years ago and Phil patched only for ia64 and
some other well-known ancient 64bit archs at the time. I am both able
to dump i686 and amd64 generated file sd.hdf with 4.2r3, but current
HDF4 in sid needs obviously a back-ported patch to avoid breakage.
Unfortunately that implies that netcdf related support in hdf4 is broken
since Etch on x86_64 :-(

Truly bad.

-- 
Francesco P. Lovergine





More information about the Pkg-grass-devel mailing list