Just wanted to wrap this up with my final findings for anyone who stumbles onto this thread in the future.

While the solution below did allow me to successfully build and connect to oracle, I also wanted to build with support for PostgreSQL/PostGIS. The PostgreSQL client also requires expat, and so my little -with-expat=no trick didn't allow the postgres support to be included in the build. The final solution was to download the oracle instant client (for linux) - both the "basic" client package and the "SDK" package were required.

Before configuring, I needed to do the following in the instant client directory:

ln -s libclntsh.so.11.1 libclntsh.so
ln -s libocci.so.11.1 libocci.so

And then I needed to specify the paths to where I unzipped the instant client packages (in /opt) to configure:

--with-oci-lib=/opt/instantclient_11_2
--with-oci-include=/opt/instantclient_11_2/sdk/include

And that's it (as it should be). No LDFLAGS or messing with LD_LIBRARY_PATH, no ORACLE_HOME even, just here's the libs, here's the includes, go. This works so much better because the instant client has all of it's pre-req's statically linked in (it's a ridiculously huge library as a result...) whereas the libraries that come in the /lib/ dir of the full oracle package do not (and so are only somewhat less ridiculously large).

Hope that helps someone, someday.

Cheers,
Chris


Chris Hodgson wrote:
Thanks for the confirmation Mike. I'm guessing the oracle instant client was compiled with a bit more care for the use of external developers. However I have managed to get a successful compile after setting the LDFLAGS environment variable to include the oracle lib folder (to get their old expat onto the path):

export LDFLAGS=-L/opt/oracle/product/11.2.0/dbhome_1/lib/

and then configured with the gdal expat turned off (if I leave it on I end up with the same original problem):

./configure --with-oci=/opt/oracle/product/11.2.0/dbhome_1/ --with-expat=no

I still have to test if this actually lets me connect to oracle. If not I'll download the instant client and try configuring/compiling against that.

Thanks,
Chris

Smith, Michael D ERDC-CRREL-NH wrote:
I have the expat 1.95 added via standed RHEL repo and using oracle instant client (11.2) without a problem with GDAL from SVN

I use

./configure \
    --with-libtiff=internal \
    --with-geotiff=internal \
    --with-jpeg=internal \
    --with-libz=internal \
    --with-png=internal \
    --with-oci=/oracle/instantclient_11_1 \
    --with-geos=/usr/local/bin/geos-config \
    --with-curl \
    --with-threads \
    --with-expat=yes \
    --with-libkml \
    --with-python


Mike


--
Michael Smith
Remote Sensing/GIS Center
US Army Corps of Engineers
Hanover, NH




_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to