this might help to fix you configure:<br><pre>sed -i 's|-lmfhdf -ldf|-L$libdir/hdf -lmfhdf -ldf|g' configure<br></pre><br><br><div class="gmail_quote">On Wed, Apr 20, 2011 at 8:27 AM, Knut-Frode <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;">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.<br>
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.<br>
<br>
Best regards from Knut-Frode<br>
<br>
<br>
<br>
Den 20.04.2011 17:03, skrev Nikolaos Hatzopoulos:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
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<br>
path library<br>
like /usr/lib and /usr/include so you have to define compilation flags<br>
<br>
<br>
<br>
On Wed, Apr 20, 2011 at 6:11 AM, Knut-Frode Dagestad<br>
<<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 forgot to say, but I have also tried by specifying the location of<br>
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<br>
"/Users/knutfd/Software/hdf-4.2.5/", but neither hdf4 nor mfhdf lib<br>
found<br>
...<br>
<br>
HDF4 library is there, but somehow configure is not able to detect<br>
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<br>
installation points, and prebuilt binaries. And I compiled with<br>
options --disable-fortran --disable-netcdf --with-pic, as suggested<br>
on<br>
<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<br>
know if that would solve this problem?<br>
<br>
<br>
Best regards from Knut-Frode<br>
<br>
<br>
<br>
<br>
On 19/04/2011 21:51, Nikolaos Hatzopoulos wrote:<br>
<br>
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>
<<a href="mailto:knutfrodesoppel@hotmail.com" target="_blank">knutfrodesoppel@hotmail.com</a><br>
<mailto:<a href="mailto:knutfrodesoppel@hotmail.com" target="_blank">knutfrodesoppel@hotmail.com</a>><br>
<mailto:<a href="mailto:knutfrodesoppel@hotmail.com" target="_blank">knutfrodesoppel@hotmail.com</a><br>
<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<br>
HDF4 with:<br>
<br>
./configure --with-hdf4<br>
<br>
but get complaints about missing libraries, see extract from<br>
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<br>
-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<br>
"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>
<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>><br>
<mailto:<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>>><br>
<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> <mailto:<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>
<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> <mailto:<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>
<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>
</blockquote>
<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>
</blockquote></div><br>