[gdal-dev] GDAL Installation Question
warmerdam at pobox.com
Fri Nov 4 14:20:43 EDT 2011
On 11-11-04 10:41 AM, elliott wrote:
> Hi Everyone,
> I recently rebuilt my gdal-1.8.0 directory to include the HDF4 format. If I run
> the gdal-1.8.0/apps/gdalinfo, it recognizes the HDF4 files. However, if I just
> run ./gdalinfo it does not recognize the new format. I noticed that there is a
> sub directory gdal-1.8.0/apps/.libs that contains the gdalinfo executable as
> well. This gdalinfo executable is a different size than the one in the
> gdal-1.8.0/apps directory and it does not recognize the new format either. It
> appears that the install is done using the executables in the ./libs directory
> and that is why the ./gdalinfo does not work.
> Why are there two directories with the same executables and why are they
> different even though they were both rebuilt at the same time?
One gdalinfo is a script which runs the real executable after setting
up environment settings appropriate to ensure the local development
build of the shared library is used instead of the global system libgdal.so.
This infrastructure is provided by something called "libtool". If you want
to avoid it you can configure GDAL using the --without-libtool switch. But
then you will have to carefully ensure you are using the libgdal.so you want
when you run the executable yourself. I accomplish this by putting my
development gdal directory ahead of global locations in my LD_LIBRARY_PATH.
Note that libtool is widely used on Linux, not just by GDAL.
Alternatively, if you are able to install your development gdal over the
system GDAL your changes should be picked up automatically.
It is often *not* a good idea to install a development GDAL over a
prepackaged GDAL if they are different versions. There are various
workarounds for this but they get messy. I honestly just avoid installing
prepackaged versions of GDAL to avoid conflicts.
> Also, is there a way to tell python scripts where to look for the bindings? The
> PYHTONPATH environment variable does not seem to work. I am trying to run a
> PostGIS python script and it is not recognizing the new HDF4 format probably
> because of the above.
The issues are likely related.
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/warmerda
and watch the world go round - Rush | Geospatial Software Developer
More information about the gdal-dev