[gdal-dev] Re: dev-version of HDF4

Nikolaos Hatzopoulos nhatzop at gmail.com
Wed Apr 20 11:42:20 EDT 2011


this might help to fix you configure:

sed -i 's|-lmfhdf -ldf|-L$libdir/hdf -lmfhdf -ldf|g' configure



On Wed, Apr 20, 2011 at 8:27 AM, Knut-Frode <knutfrodesoppel at hotmail.com>wrote:

> The paths are taken care of by configure, and they are checked to be ok. I
> also tried with standard installation folders (/usr/lib/ /usr/include/ etc)
> but no difference. I did not compile, since configure fails.
> So I believe it must be some incompatibility with the GDAL configure script
> and the standard HDF4-libraries I have used. The "lib not found" message
> from GDAL configure seems to be misleading.
>
> Best regards from Knut-Frode
>
>
>
> Den 20.04.2011 17:03, skrev Nikolaos Hatzopoulos:
>
>> when does the gcc ....
>> you must have: -L/Users/knutfd/Software/hdf-4.2.5/lib
>> in order to find the lib
>>
>> so you need to do before the compile:
>> export LDFLAGS="$LDFLAGS -L/Users/knutfd/Software/hdf-4.2.5/lib"
>> and obviously you are going to need the include files also:
>> export CPPFLAGS="$CPPFLAGS -I/Users/knutfd/Software/hdf-4.2.5/include"
>>
>> I am not quite sure if export is going to work or setenv
>> in setenv you don't need the equal I am not an expert in c shell
>>
>> this kind of problem is because the tools are not install in a standard
>> path library
>> like /usr/lib and /usr/include so you have to define compilation flags
>>
>>
>>
>> On Wed, Apr 20, 2011 at 6:11 AM, Knut-Frode Dagestad
>> <knutfrodesoppel at hotmail.com <mailto:knutfrodesoppel at hotmail.com>> wrote:
>>
>>    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
>>        <knutfrodesoppel at hotmail.com
>>        <mailto:knutfrodesoppel at hotmail.com>
>>        <mailto:knutfrodesoppel at hotmail.com
>>        <mailto:knutfrodesoppel at hotmail.com>>> 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
>>        gdal-dev at lists.osgeo.org <mailto:gdal-dev at lists.osgeo.org>
>>        <mailto:gdal-dev at lists.osgeo.org <mailto:gdal-dev at lists.osgeo.org
>> >>
>>
>>        http://lists.osgeo.org/mailman/listinfo/gdal-dev
>>
>>
>>
>>
>>        _______________________________________________
>>        gdal-dev mailing list
>>        gdal-dev at lists.osgeo.org <mailto:gdal-dev at lists.osgeo.org>
>>        http://lists.osgeo.org/mailman/listinfo/gdal-dev
>>
>>
>>
>>    _______________________________________________
>>    gdal-dev mailing list
>>    gdal-dev at lists.osgeo.org <mailto:gdal-dev at lists.osgeo.org>
>>    http://lists.osgeo.org/mailman/listinfo/gdal-dev
>>
>>
>>
>>
>> _______________________________________________
>> gdal-dev mailing list
>> gdal-dev at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>>
>
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20110420/f5b783db/attachment.html


More information about the gdal-dev mailing list