GDAL spawn library conflict [message #92466] |
Tue, 22 December 2015 14:23  |
Christopher Anderson
Messages: 3 Registered: November 2015
|
Junior Member |
|
|
Hello,
I am trying to use IDL's spawn to call OGR/GDAL binaries but am experiencing some conflicts in the libraries IDL points to. It will call the executable I want, but it finds OGR/GDAL library references that were not part of the current GDAL build. They appear to be the ones that come installed with IDL. An example:
$ ogrinfo -al all_calibration_plots.shp | head -5
INFO: Open of `all_calibration_plots.shp'
using driver `ESRI Shapefile' successful.
Layer name: all_calibration_plots
Geometry: Polygon
Feature Count: 81
$ idl
IDL> spawn,'ogrinfo -al all_calibration_plots.shp | head -5'
ogrinfo: /usr/local/itt/idl/idl80/bin/bin.linux.x86_64/libgdal.so.1: no version information available (required by ogrinfo)
ERROR 1: ogrinfo was compiled against GDAL 1.10 but current library version is 1.6
Any way to get around this? I'm guessing its a path reference we need to change somewhere.
|
|
|
Re: GDAL spawn library conflict [message #92467 is a reply to message #92466] |
Tue, 22 December 2015 19:09   |
Jim Pendleton
Messages: 165 Registered: November 2011
|
Senior Member |
|
|
On Tuesday, December 22, 2015 at 3:23:25 PM UTC-7, Christopher Anderson wrote:
> Hello,
>
> I am trying to use IDL's spawn to call OGR/GDAL binaries but am experiencing some conflicts in the libraries IDL points to. It will call the executable I want, but it finds OGR/GDAL library references that were not part of the current GDAL build. They appear to be the ones that come installed with IDL. An example:
>
> $ ogrinfo -al all_calibration_plots.shp | head -5
> INFO: Open of `all_calibration_plots.shp'
> using driver `ESRI Shapefile' successful.
>
> Layer name: all_calibration_plots
> Geometry: Polygon
> Feature Count: 81
>
> $ idl
> IDL> spawn,'ogrinfo -al all_calibration_plots.shp | head -5'
> ogrinfo: /usr/local/itt/idl/idl80/bin/bin.linux.x86_64/libgdal.so.1: no version information available (required by ogrinfo)
> ERROR 1: ogrinfo was compiled against GDAL 1.10 but current library version is 1.6
>
> Any way to get around this? I'm guessing its a path reference we need to change somewhere.
Depending on the flavor of Linux, you may need to appending your shell's LD_LIBRARY_PATH onto the beginning of your SPAWN command, or spawn a script that's responsible for setting LD_LIBRARY_PATH first.
Compare and contrast :
$ echo $LD_LIBRARY_PATH
IDL> print, getenv('LD_LIBRARY_PATH')
Jim P.
|
|
|
|