osdir.com
mailing list archive

Subject: Re: Trouble to compile GDAL-cvs with HDF4 in OS X - msg#00099

List: gis.gdal.devel

Date: Prev Next Index Thread: Prev Next Index
Hi, Lorenzo,

On Wed, Nov 19, 2003 at 05:05:34PM +0100, Lorenzo Moretti wrote:
> 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: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 it the end of the HDF-related log? I think it should be more
information after these two tests (in case you are using recent
snapshot).

> Is this an error ?

Yes, both tests are failed.

> 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
> ....

Looks like configure fails to detect a library, but build system does it
successful. Anyhow GDAL on your system supports HDF4. Otherwise you
can't get gdalinfo output for HDF files.

> 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

Are you sure GRASS using recently compiled GDAL? Is it possible you have
outdated GDAL binaries somewhere in the system?

> Is it possible to enable GDAL for supporting HDF4 lib in Mac OS X?

Yes, you did it already!


--
Andrey V. Kiselev
Home phone: +7 812 5274898 ICQ# 26871517


Was this page helpful?
Yes No
Thread at a glance:

Previous Message by Date: click to view message preview

Re: Trouble in link with hdf4

On Wed, Nov 19, 2003 at 03:19:19PM +0800, Fu Chen wrote: > Is there any probleam if I build gdal with /ML? Why gdal select to > build with /MD as default? /MD selects linking with the dynamically loaded C library, so we can get significally smaller size of the GDAL binary. You can select any from the /Mx options to build GDAL. The following copied from the MSVC manual: Do not mix static and dynamic versions of the run-time libraries. Having more than one copy of the run-time libraries in a process can cause problems, because static data in one copy is not shared with the other copy. The linker prevents you from linking with both static and dynamic versions within one .exe file, but you can still end up with two (or more) copies of the run-time libraries. For example, a dynamic-link library linked with the static (non-DLL) versions of the run-time libraries can cause problems when used with an .exe file that was linked with the dynamic (DLL) version of the run-time libraries. (You should also avoid mixing the debug and non-debug versions of the libraries in one process.) Andrey -- Andrey V. Kiselev Home phone: +7 812 5274898 ICQ# 26871517

Next Message by Date: click to view message preview

Re: Trouble to compile GDAL-cvs with HDF4 in OS X

Hi, Andrey > -lm -ldl  >&5 > ld: can't locate file for: -lhdf4 > configure:20574: $? = 1 > configure: failed program was: > #line 20545 "configure" > #include "confdefs.h" > .... Is it the end of the HDF-related log? I think it should be more information after these two tests (in case you are using recent snapshot). It's not complete !!! from config.log ........ configure:19268: checking for ffopen in -lcfitsio configure:19301: gcc -o conftest -g -O2 -DCPL_MULTIPROC_PTHREAD  -DCPL_MULTIPROC_PTHREAD  conftest.c -lcfitsio  -lz -lpthread -lm -ldl  >&5 ld: can't locate file for: -lcfitsio configure:19304: $? = 1 configure: failed program was: #line 19275 "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 ffopen (); #ifdef F77_DUMMY_MAIN #  ifdef __cplusplus      extern "C" #  endif    int F77_DUMMY_MAIN() { return 1; } #endif int main () { ffopen ();   ;   return 0; } 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" /* 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:20591: result: no configure:20604: checking for SDreaddata in -lmfhdf configure:20637: gcc -o conftest -g -O2 -DCPL_MULTIPROC_PTHREAD  -DCPL_MULTIPROC_PTHREAD  conftest.c -lmfhdf -ldf -ljpeg -lz -L/sw/lib -lz -lpthread -lm -ldl  >&5 configure:20640: $? = 0 configure:20643: test -s conftest configure:20646: $? = 0 configure:20657: result: yes configure:21072: checking for NCScbmOpenFileView in -lNCSEcw configure:21105: gcc -o conftest -g -O2 -DCPL_MULTIPROC_PTHREAD  -DCPL_MULTIPROC_PTHREAD  conftest.c -lNCSEcw  -L/sw/lib -lmfhdf -ldf -lz -lpthread -lm -ldl  >&5 ld: can't locate file for: -lNCSEcw configure:21108: $? = 1 configure: failed program was: #line 21079 "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 NCScbmOpenFileView (); #ifdef F77_DUMMY_MAIN #  ifdef __cplusplus      extern "C" #  endif    int F77_DUMMY_MAIN() { return 1; } #endif int main () { NCScbmOpenFileView ();   ;   return 0; } configure:21125: result: no configure:21178: checking for Kakadu JPEG2000 support configure:21190: result: not requested. configure:21216: checking for MrSID support configure:21228: result: not requested. ......... > Is this an error ? Yes, both tests are failed. Arghh !!!! > 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 >   .... Looks like configure fails to detect a library, but build system does it successful. Anyhow GDAL on your system supports HDF4. Otherwise you can't get gdalinfo output for HDF files. When I enter: [lorenzo:~] lor% /usr/local/bin/gdal-config --libs -L/usr/local/lib -lgdal [lorenzo:~] lor% At the beginning of ./configure I see 3 lines of SDreaddata: ....... checking for FMEObjects... disabled by user checking for SDreaddata in -lmfhdf... no checking for SDreaddata in -lhdf4... no checking for SDreaddata in -lmfhdf... yes jpeg2000 support disabled. ....... It'strange > 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 Are you sure GRASS using recently compiled GDAL? Is it possible you have outdated GDAL binaries somewhere in the system? I have built Grass binaries from grass53cvs source with this gdal binaries (--with-gdal=/usr/local/bin/gdal-config). I have new gdal binaries. Grass import my SPOT files, QuickBird files but not Aster file (hdf). I read:  ... not recognised as a supported file format Is it an error in gdal or grass? Have I to recompile grass? Which tool can I use for converting this file from gdal? I have a file named libgdal.la in /usr/local/lib # libgdal.la - a libtool library file # Generated by ltmain.sh - GNU libtool 1.5.0a (1.1220.2.25 2003/08/01 19:08:35) Debian: 49 $ # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='libgdal.1.dylib' # Names of this library. library_names='libgdal.1.1.9.dylib libgdal.1.1.dylib libgdal.1.dylib libgdal.dylib' # The name of the static archive. old_library='libgdal.a' # Libraries that this one depends upon. dependency_libs=' /sw/lib/libodbc.la -L/sw/lib /sw/lib/libiconv.la -lmfhdf -ldf -lz -lpthread -lm -ldl' # Version information for libgdal. current=2 age=1 revision=9 # Is this an already installed library? installed=yes # Should we warn about portability when linking against -modules? shouldnotlink=no # Files to dlopen/dlpreopen dlopen='' dlpreopen='' # Directory that this library needs to be installed in: libdir='/usr/local/lib' There is -lmfhdf and -ldf. Mmmhhhh !!! > Is it possible to enable GDAL for supporting HDF4 lib in Mac OS X? Yes, you did it already! Thanks -- ________________________________________________________________________ ||      Lorenzo Moretti        e-mail: lorenzo.moretti@xxxxxxxxxxxxxxx      ||/|/|  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 ________________________________________________________________________

Previous Message by Thread: click to view message preview

Trouble to compile GDAL-cvs with HDF4 in OS X

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@xxxxxxxxxxxxxxx      ||/|/|  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 Message by Thread: click to view message preview

Re: Trouble to compile GDAL-cvs with HDF4 in OS X

Hi, Andrey > -lm -ldl  >&5 > ld: can't locate file for: -lhdf4 > configure:20574: $? = 1 > configure: failed program was: > #line 20545 "configure" > #include "confdefs.h" > .... Is it the end of the HDF-related log? I think it should be more information after these two tests (in case you are using recent snapshot). It's not complete !!! from config.log ........ configure:19268: checking for ffopen in -lcfitsio configure:19301: gcc -o conftest -g -O2 -DCPL_MULTIPROC_PTHREAD  -DCPL_MULTIPROC_PTHREAD  conftest.c -lcfitsio  -lz -lpthread -lm -ldl  >&5 ld: can't locate file for: -lcfitsio configure:19304: $? = 1 configure: failed program was: #line 19275 "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 ffopen (); #ifdef F77_DUMMY_MAIN #  ifdef __cplusplus      extern "C" #  endif    int F77_DUMMY_MAIN() { return 1; } #endif int main () { ffopen ();   ;   return 0; } 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" /* 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:20591: result: no configure:20604: checking for SDreaddata in -lmfhdf configure:20637: gcc -o conftest -g -O2 -DCPL_MULTIPROC_PTHREAD  -DCPL_MULTIPROC_PTHREAD  conftest.c -lmfhdf -ldf -ljpeg -lz -L/sw/lib -lz -lpthread -lm -ldl  >&5 configure:20640: $? = 0 configure:20643: test -s conftest configure:20646: $? = 0 configure:20657: result: yes configure:21072: checking for NCScbmOpenFileView in -lNCSEcw configure:21105: gcc -o conftest -g -O2 -DCPL_MULTIPROC_PTHREAD  -DCPL_MULTIPROC_PTHREAD  conftest.c -lNCSEcw  -L/sw/lib -lmfhdf -ldf -lz -lpthread -lm -ldl  >&5 ld: can't locate file for: -lNCSEcw configure:21108: $? = 1 configure: failed program was: #line 21079 "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 NCScbmOpenFileView (); #ifdef F77_DUMMY_MAIN #  ifdef __cplusplus      extern "C" #  endif    int F77_DUMMY_MAIN() { return 1; } #endif int main () { NCScbmOpenFileView ();   ;   return 0; } configure:21125: result: no configure:21178: checking for Kakadu JPEG2000 support configure:21190: result: not requested. configure:21216: checking for MrSID support configure:21228: result: not requested. ......... > Is this an error ? Yes, both tests are failed. Arghh !!!! > 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 >   .... Looks like configure fails to detect a library, but build system does it successful. Anyhow GDAL on your system supports HDF4. Otherwise you can't get gdalinfo output for HDF files. When I enter: [lorenzo:~] lor% /usr/local/bin/gdal-config --libs -L/usr/local/lib -lgdal [lorenzo:~] lor% At the beginning of ./configure I see 3 lines of SDreaddata: ....... checking for FMEObjects... disabled by user checking for SDreaddata in -lmfhdf... no checking for SDreaddata in -lhdf4... no checking for SDreaddata in -lmfhdf... yes jpeg2000 support disabled. ....... It'strange > 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 Are you sure GRASS using recently compiled GDAL? Is it possible you have outdated GDAL binaries somewhere in the system? I have built Grass binaries from grass53cvs source with this gdal binaries (--with-gdal=/usr/local/bin/gdal-config). I have new gdal binaries. Grass import my SPOT files, QuickBird files but not Aster file (hdf). I read:  ... not recognised as a supported file format Is it an error in gdal or grass? Have I to recompile grass? Which tool can I use for converting this file from gdal? I have a file named libgdal.la in /usr/local/lib # libgdal.la - a libtool library file # Generated by ltmain.sh - GNU libtool 1.5.0a (1.1220.2.25 2003/08/01 19:08:35) Debian: 49 $ # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='libgdal.1.dylib' # Names of this library. library_names='libgdal.1.1.9.dylib libgdal.1.1.dylib libgdal.1.dylib libgdal.dylib' # The name of the static archive. old_library='libgdal.a' # Libraries that this one depends upon. dependency_libs=' /sw/lib/libodbc.la -L/sw/lib /sw/lib/libiconv.la -lmfhdf -ldf -lz -lpthread -lm -ldl' # Version information for libgdal. current=2 age=1 revision=9 # Is this an already installed library? installed=yes # Should we warn about portability when linking against -modules? shouldnotlink=no # Files to dlopen/dlpreopen dlopen='' dlpreopen='' # Directory that this library needs to be installed in: libdir='/usr/local/lib' There is -lmfhdf and -ldf. Mmmhhhh !!! > Is it possible to enable GDAL for supporting HDF4 lib in Mac OS X? Yes, you did it already! Thanks -- ________________________________________________________________________ ||      Lorenzo Moretti        e-mail: lorenzo.moretti@xxxxxxxxxxxxxxx      ||/|/|  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 ________________________________________________________________________
Sign up for updates to this mailing list. email:
Loading Comments...
Home | News | Patents | Sitemap | FAQ | advertise

Advertising by