[Gdal-dev] Trouble to compile GDAL-cvs with HDF4 in OS X
Lorenzo Moretti
lorenzo.moretti at bologna.enea.it
Wed Nov 19 11:05:34 EST 2003
I have compiled gdal-cvs in OSX without problem.
The problem is in GDAL with HDF4 support. I have hdf4.1r5 installed
from FINK distibution ( http://fink.sf.net/ ): it install many files
in /sw/bin (fp2hdf, gif2hdf, ...), in sw/lib (libdf.a, libmfhdf.a),
in /sw/include (atom.h, bitvec.h, ...).
When I configure gdal with:
./configure --mandir=/usr/local/share/man --with-grass=no
--with-libtiff=internal --with-geotiff=internal --with-jpeg=internal
--with-gif=internal --with-png=internal --with-pg=no --without-python
--with-ogdi=no --with-fme=no --with-jasper=no --with-kakadu=no
--with-mrsid=no --with-hdf4=/sw --with-threads
I have this result in config.log:
...
configure:19321: result: no
configure:20320: checking for FMEObjects
configure:20325: result: disabled by user
configure:20476: checking for SDreaddata in -lmfhdf
configure:20509: gcc -o conftest -g -O2 -DCPL_MULTIPROC_PTHREAD
-DCPL_MULTIPROC_PTHREAD conftest.c -lmfhdf -L/sw/lib -lz -lpthread
-lm -ldl >&5
ld: Undefined symbols:
_DFKNTsize
_DFKconvert
_DFKgetPNSC
_DFKislitendNT
_DFKisnativeNT
_HCcreate
_HCgetcompress
_HDget_special_info
_HEPclear
_HEpush
_HMCcreate
_HMCreadChunk
_HMCsetMaxcache
_HMCwriteChunk
_HPregister_term_func
_HXcreate
_Hendaccess
_Hinquire
_Hnewref
_Hsetaccesstype
_Vaddtagref
_Vattach
_Vdetach
_error_top
_DFKsetNT
_HDmemfill
_HLcreate
_Hread
_Hseek
_Hsetlength
_Hstartaccess
_Hstartread
_Hwrite
_Vgettagref
_Vntagrefs
_DFdiput
_DFdisetup
_DFdiwrite
_Hclose
_Hdeldd
_Hgetelement
_Hishdf
_Hlength
_Hopen
_Hputelement
_VFfieldorder
_VFfieldtype
_VHmakegroup
_VHstoredata
_VHstoredatam
_VSattach
_VSdelete
_VSdetach
_VSgetclass
_VSinquire
_VSread
_VSseek
_VSsetfields
_VSwrite
_Vdelete
_Vfindclass
_Vfinish
_Vgetclass
_Vgetnext
_Vinitialize
_Vinquire
_Visvg
_Visvs
_vexistvg
_vexistvs
_ANannlen
_ANannlist
_ANend
_ANendaccess
_ANnumann
_ANreadann
_ANstart
_DFdiget
_DFdiread
_Hnextread
configure:20512: $? = 1
configure: failed program was:
#line 20483 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char SDreaddata ();
#ifdef F77_DUMMY_MAIN
# ifdef __cplusplus
extern "C"
# endif
int F77_DUMMY_MAIN() { return 1; }
#endif
int
main ()
{
SDreaddata ();
;
return 0;
}
configure:20529: result: no
configure:20538: checking for SDreaddata in -lhdf4
configure:20571: gcc -o conftest -g -O2 -DCPL_MULTIPROC_PTHREAD
-DCPL_MULTIPROC_PTHREAD conftest.c -lhdf4 -L/sw/lib -lz -lpthread
-lm -ldl >&5
ld: can't locate file for: -lhdf4
configure:20574: $? = 1
configure: failed program was:
#line 20545 "configure"
#include "confdefs.h"
....
Is this an error ?
After ./configure I enter make until the end without error (?????), I
suppose, and after I enter sudo make install.
When I enter:
[lorenzo:~] lor% /usr/local/bin/gdal-config --formats
gxf gtiff hfa aigrid aaigrid ceos ceos2 iso8211 xpm sdts raw dted mem
jdem envisat elas fit vrt usgsdem l1b nitf bmp pcidsk bsb hdf4 gif
jpeg png
[lorenzo:~] lor%
I see hdf4 in the list.
Now I want to see the information from Aster files hdf:
[lorenzo:~] lor% /usr/local/bin/gdalinfo
/ASTER_files/AST_L1B_002_01152002101254_05232402150244.hdf
Driver: HDF4/Hierarchical Data Format Release 4
Size is 512, 512
Coordinate System is `'
Metadata:
HDFEOSVersion=HDFEOS_V2.6
IDOFASTERGDSDATAGRANULE=ASTL1B 0201101012540205220094
RECEIVINGCENTER=EDOS
PROCESSINGCENTER=ASTER-GDS
SENSORNAME=VNIR
POINTINGANGLE=0.025000
SETTINGTIMEOFPOINTING=2002-01-10T10:10:22Z
SENSORNAME=SWIR
....
.... (too much)
Now I compile Grass with GDAL support and after I use in grass the
module r.in.gdal for importing the same file and I have this error:
format not recognized
Is it possible to enable GDAL for supporting HDF4 lib in Mac OS X?
What is the error?
How can I use gdal for viewing ASTER hdf file?
Thanx
--
________________________________________________________________________
|| Lorenzo Moretti e-mail: lorenzo.moretti at bologna.enea.it
||/|/| ENEA prot Web: http://wwwamb.bologna.enea.it/
|| | via Don Fiammelli, 2 FTP: ftp://ftpamb.bologna.enea.it/ (ris.)
~~~~~~ 40128 BOLOGNA - ITALY Ph: +39-0516098086 Fax: +39-0516098131
________________________________________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20031119/d3d00a10/attachment.html
More information about the Gdal-dev
mailing list