when does the gcc ....<br>you must have: -L/Users/knutfd/Software/hdf-4.2.5/lib<br>in order to find the lib<br><br>so you need to do before the compile:<br>export LDFLAGS="$LDFLAGS -L/Users/knutfd/Software/hdf-4.2.5/lib"<br>
and obviously you are going to need the include files also:<br>export CPPFLAGS="$CPPFLAGS -I/Users/knutfd/Software/hdf-4.2.5/include"<br><br>I am not quite sure if export is going to work or setenv<br>in setenv you don't need the equal I am not an expert in c shell<br>
<br>this kind of problem is because the tools are not install in a standard path library<br>like /usr/lib and /usr/include so you have to define compilation flags<br><br><br><br><div class="gmail_quote">On Wed, Apr 20, 2011 at 6:11 AM, Knut-Frode Dagestad <span dir="ltr"><<a href="mailto:knutfrodesoppel@hotmail.com">knutfrodesoppel@hotmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">I forgot to say, but I have also tried by specifying the location of HDF4, with similar error:<br>
<br>
...<br>
checking for SDreaddata in -lmfhdfalt... no<br>
checking for SDreaddata in -lmfhdf... no<br>
checking for SDreaddata in -lhdf4... no<br>
checking for SDreaddata in -lmfhdf... no<br>
checking for SDreaddata in -lmfhdf... no<br>
configure: error: HDF4 support requested with arg "/Users/knutfd/Software/hdf-4.2.5/", but neither hdf4 nor mfhdf lib found<br>
...<br>
<br>
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.<br>
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 <a href="http://osgeo-org.1803224.n2.nabble.com/Error-in-GDAL-compiling-with-HDF4-td3351437.html" target="_blank">http://osgeo-org.1803224.n2.nabble.com/Error-in-GDAL-compiling-with-HDF4-td3351437.html</a><br>
It has been suggested to use a "dev" version of HDF4, but I don't know if that would solve this problem?<div class="im"><br>
<br>
Best regards from Knut-Frode<br>
<br>
<br>
<br>
<br></div><div class="im">
On 19/04/2011 21:51, Nikolaos Hatzopoulos wrote:<br>
</div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="im">
hdf4 libraries not found that's what the log says :)<br>
do a<br>
locate libhdf4<br>
to see where the library is<br>
<br>
<br>
On Tue, Apr 19, 2011 at 10:24 AM, Knut-Frode Dagestad<br></div><div><div></div><div class="h5">
<<a href="mailto:knutfrodesoppel@hotmail.com" target="_blank">knutfrodesoppel@hotmail.com</a> <mailto:<a href="mailto:knutfrodesoppel@hotmail.com" target="_blank">knutfrodesoppel@hotmail.com</a>>> wrote:<br>
<br>
I am trying to compile GDAL from source with support for HDF4 with:<br>
<br>
./configure --with-hdf4<br>
<br>
but get complaints about missing libraries, see extract from config.log:<br>
<br>
ld: library not found for -lmfhdfalt<br>
...<br>
ld: library not found for -lmfhdf<br>
...<br>
ld: library not found for -lhdf4<br>
...<br>
ld: library not found for -lmfhdf<br>
configure:19940: checking for SDreaddata in -lmfhdf<br>
configure:19965: gcc -o conftest -g -O2 conftest.c -lmfhdf -ldf<br>
-lsz -ljpeg -lz -lz -lpthread -ldl >&5<br>
ld: library not found for -lmfhdf<br>
configure:20009: error: HDF4 support requested with arg "yes", but<br>
neither hdf4 nor mfhdf lib found<br>
<br>
<br>
Similar errors are also reported by others, e.g. this one using<br>
mapserver:<br>
<a href="http://osgeo-org.1803224.n2.nabble.com/cannot-find-lmfhdf-td5286909.html" target="_blank">http://osgeo-org.1803224.n2.nabble.com/cannot-find-lmfhdf-td5286909.html</a><br>
<br>
I have tried with various versions of HDF4, both binaries and<br>
compiled from source. The link above (and also<br>
<a href="http://trac.osgeo.org/gdal/wiki/BuildingOnUnix" target="_blank">http://trac.osgeo.org/gdal/wiki/BuildingOnUnix</a>) suggests to try a<br>
"hdf-dev" version. But where can I find such "dev-versions", in my<br>
case for Mac OS X 10.6.7?<br>
<br>
Would it be possible to update GDAL to work with standard HDF4<br>
libraries?<br>
<br>
<br>
Best regards from Knut-Frode<br>
<br>
_______________________________________________<br>
gdal-dev mailing list<br></div></div>
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a> <mailto:<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a>><div class="im"><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
</div></blockquote><div><div></div><div class="h5">
<br>
<br>
_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
</div></div></blockquote></div><br>