I forgot to say, but I have also tried by specifying the location of HDF4, with similar error:

...
checking for SDreaddata in -lmfhdfalt... no
checking for SDreaddata in -lmfhdf... no
checking for SDreaddata in -lhdf4... no
checking for SDreaddata in -lmfhdf... no
checking for SDreaddata in -lmfhdf... no
configure: error: HDF4 support requested with arg "/Users/knutfd/Software/hdf-4.2.5/", but neither hdf4 nor mfhdf lib found
...

HDF4 library is there, but somehow configure is not able to detect it. HDF4 is compiled without SLIB, so that should not be the problem. I have also tried with older version of HDF4 (4.2r1), other installation points, and prebuilt binaries. And I compiled with options --disable-fortran --disable-netcdf --with-pic, as suggested on http://osgeo-org.1803224.n2.nabble.com/Error-in-GDAL-compiling-with-HDF4-td3351437.html It has been suggested to use a "dev" version of HDF4, but I don't know if that would solve this problem?

Best regards from Knut-Frode




On 19/04/2011 21:51, Nikolaos Hatzopoulos wrote:
hdf4 libraries not found that's what the log says :)
do a
locate libhdf4
to see where the library is


On Tue, Apr 19, 2011 at 10:24 AM, Knut-Frode Dagestad
<[email protected] <mailto:[email protected]>> wrote:

    I am trying to compile GDAL from source with support for HDF4 with:

    ./configure --with-hdf4

    but get complaints about missing libraries, see extract from config.log:

    ld: library not found for -lmfhdfalt
    ...
    ld: library not found for -lmfhdf
    ...
    ld: library not found for -lhdf4
    ...
    ld: library not found for -lmfhdf
    configure:19940: checking for SDreaddata in -lmfhdf
    configure:19965: gcc -o conftest -g -O2   conftest.c -lmfhdf -ldf
    -lsz -ljpeg -lz -lz -lpthread -ldl >&5
    ld: library not found for -lmfhdf
    configure:20009: error: HDF4 support requested with arg "yes", but
    neither hdf4 nor mfhdf lib found


    Similar errors are also reported by others, e.g. this one using
    mapserver:
    http://osgeo-org.1803224.n2.nabble.com/cannot-find-lmfhdf-td5286909.html

    I have tried with various versions of HDF4, both binaries and
    compiled from source. The link above (and also
    http://trac.osgeo.org/gdal/wiki/BuildingOnUnix) suggests to try a
    "hdf-dev" version. But where can I find such "dev-versions", in my
    case for Mac OS X 10.6.7?

    Would it be possible to update GDAL to work with standard HDF4
    libraries?


    Best regards from Knut-Frode

    _______________________________________________
    gdal-dev mailing list
    [email protected] <mailto:[email protected]>
    http://lists.osgeo.org/mailman/listinfo/gdal-dev




_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev


_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to