[GRASS5] latest in the hdf-gdal-grass hdf-eos saga....

Jeff D. Hamann jeff.hamann at forestinformatics.com
Sat Jan 31 14:31:40 EST 2004


Here are some scenes from last weeks episode:

After realizing that, in order to import HDF-EOS (ASTER) files into GRASS, I
need to compile GRASS with gdal support using the following process

Compile HDF libraries so I can,
compile gdal with HDF support so I can,
compile GRASS with gdal support,
then if I'm lucky, I can try to compile GRASS5.7 (have been building
grass5.3 -- which *still* has documentation for r.in.hdf/r.out.hdf)

And of course I would like to build this on either cygwin of FreeBSD 4.4 or
FreeBSD 5.0. Here's the results:

Under cygwin:

I was able to build GRASS 5.3 and gdal (without hdf support) with ease.
I couldn't build the hdf libraries to build gdal which rules out building
GRASS 5.X with gdal support that supports hdf-eos
I still haven't tried to build 5.7, yet


Under FreeBSD 4.4
I wasn't able to build the gdal-1.1.8 in the /usr/ports since gdal requies

stimpy# cd /usr/ports/graphics/gdal
stimpy# make install
===>   gdal-1.1.8 depends on file: /usr/local/bin/doxygen - not found
===>    Verifying install for /usr/local/bin/doxygen in
/usr/ports/devel/doxygen
===>   doxygen-1.3.5 depends on executable: dot - found
===>   doxygen-1.3.5 depends on executable: latex - found
===>   doxygen-1.3.5 depends on executable: gs - found
===>   doxygen-1.3.5 depends on file: /usr/X11R6/bin/moc - not found
===>    Verifying install for /usr/X11R6/bin/moc in
/usr/ports/x11-toolkits/qt32
===>  qt-3.2.3 is marked as broken: The QT 3.2.3 port does not support any
XFree86 < 4.x.
*** Error code 1

Stop in /usr/ports/x11-toolkits/qt32.
*** Error code 1

Stop in /usr/ports/devel/doxygen.
*** Error code 1

Stop in /usr/ports/graphics/gdal.
stimpy#

Which pretty much killed that idea on FreeBSD 4.4



Under FreeBSD 5.0
I wasn't able to build  the version in /usr/ports since it appears there's
some problem with the LaTeX code? Here's the build (using make) stop

(/usr/local/share/texmf/tex/latex/psnfss/upzd.fd)
(/usr/local/share/texmf/tex/latex/psnfss/upsy.fd)))
Writing index file doxygen_manual.idx
No file doxygen_manual.aux.
! Missing number, treated as zero.
<to be read again>
                   p
l.32 \begin{document}

? ! Missing number, treated as zero.
<to be read again>
                   p
l.32 \begin{document}

? OK, entering \batchmodegmake[1]: Leaving directory
`/usr/ports/devel/doxygen/work/doxygen-1.3.5/latex'
*** Error code 2

Stop in /usr/ports/devel/doxygen.
*** Error code 1

Stop in /usr/ports/graphics/gdal.
$

So I tried downloaded the gdal-1.1.9 source code and building as a "normal"
project. I ran ./configure, then make and got the following results:

$ cat configure.results.txt
checking for gcc... gcc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
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 g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for ranlib... ranlib
checking for dlopen in -ldl... no
checking for malloc_chain_check in -ldbmalloc... no
checking for main in -lm... yes
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 fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking for unistd.h... (cached) yes
checking dbmalloc.h usability... no
checking dbmalloc.h presence... no
checking for dbmalloc.h... no
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for stdint.h... (cached) yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking whether byte ordering is bigendian... no
checking for vprintf... yes
checking for _doprnt... no
checking for vsnprintf... yes
checking for 64bit integer type... long long
checking for 64bit file io... no
checking for local include/lib path... none
configure: checking whether we should include thread/mutex support......
        thread safe support disabled.
checking for deflateInit_ in -lz... yes
checking for G_gisinit_2 in -lgrass5... no
checking for ffopen in -lcfitsio... no
libcfitsio not found - FITS support disabled
checking for png_set_IHDR in -lpng... no
checking png.h usability... no
checking png.h presence... no
checking for png.h... no
using internal png code.
checking for TIFFGetTagListCount in -ltiff... no
using internal TIFF code.
using internal GeoTIFF code.
checking for jpeg_read_scanlines in -ljpeg... no
checking jpeglib.h usability... no
checking jpeglib.h presence... no
checking for jpeglib.h... no
using internal jpeg code.
checking for DGifOpenFileName in -lgif... no
using internal gif code.
checking for cln_GetLayerCapabilities in -logdi31... no
checking for FMEObjects... no
checking for SDreaddata in -lmfhdf... no
checking for jpc_decode in -ljasper... no
checking for jp2_decode in -ljasper... no
checking for pgx_decode in -ljasper... no
checking for NCScbmOpenFileView in -lNCSEcw... no
checking for Kakadu JPEG2000 support... not requested.
checking for MrSID support... not requested.
checking for OGR ... enabled
checking for pg_config... /usr/local/bin/pg_config
checking for PostgreSQL... yes
checking for Xerces C++... disabled
checking for g++ -shared ... yes
checking for python... python
checking where python Makefiles are... found
checking Python makefile... found
checking where .py files should go... /usr/local/lib/python2.2/site-packages
checking for python headers... found
checking definitions from Python makefile... done
checking for NumPy include files... missing
checking if local/include already standard... no, everything is ok
configure: creating ./config.status
config.status: creating GDALmake.opt
config.status: creating port/cpl_config.h
config.status: port/cpl_config.h is unchanged
$ make
make: no target to make.
$

So I can't even get gdal-1.1.9 to build manually.
But, GRASS 5.0.2 builds under FreeBSD 5.0 (without gdal support) just fine.

When I downloaded the hdf source code (from where I don't remember anymore)
hdf5-1.6.1.tar.gz, and ran ./configure, then make it built.

I *was* successful in building hdf5-1.6.1 (no extra arguments) under FreeBSD
5.0 from the source code....
I *wasn't* successful in building HDF4.2r0 (without extra args) under
FreeBSD from the source code. The resulting ./configure

checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking for compress2 in -lz... yes
checking jpeglib.h usability... no
checking jpeglib.h presence... no
checking for jpeglib.h... no
checking for jpeg_start_decompress in -ljpeg... no
$

So I found the /usr/local/include/jpeglib.h  and /usr/local/lib/libjpeg.a
files and used the optional arguments in the ./configure script...

godzilla# ./configure --with-jpeg=/usr/local/include,/usr/local/lib

then ran make and got a bazillion warnings like:

hextelt.c:234: warning: passing arg 2 of `HTPselect' with different width
due to prototype
hextelt.c:242: warning: passing arg 3 of `Hstartread' with different width
due to prototype
hextelt.c:295: warning: passing arg 2 of `Hgetelement' with different width
due to prototype

but it built and installed....and some of the utility programs worked just
fine...

but after all that I still can't figure out how to make gdal-1.1.9. All I
get when I type ./configure (without the --with-hdf4 stuff even) and make
is:

config.status: creating port/cpl_config.h
$ make
make: no target to make.
$

So this project will have to go into the drawer again until I can some of th
ese resolved... And after all that, does anyone actually if GRASS can import
ASTER L1B images? I just can't waste any more time on this for now...

Jeff.



---
Jeff D. Hamann
Forest Informatics, Inc.
PO Box 1421
Corvallis, Oregon USA 97339-1421
(office) 541-754-1428
(cell) 541-740-5988
jeff.hamann at forestinformatics.com
www.forestinformatics.com




More information about the grass-dev mailing list