[gdal-dev] Build GDAL with OCI support on Linux
Rui Cavaco
rcavaco at sig2000.pt
Mon Apr 29 13:29:09 PDT 2013
Hello!
I'm trying to get OCI support in GDAL / OGR in Ubuntu 12.04 32-bit.
I've successfully installed Oracle Instant Client 11_2 . SQLPlus works
flawlessly.
Building GDAL also ended with no errors.
But executing ogrinfo --formats, OCI format is not listed.
Building script is:
export LDFLAGS="-Wl,-no-as-needed"
./configure \
--with-python --with-libkml=no --with-geotiff=internal \
--with-threads --with-libtiff=internal --with-geotiff=internal
--with-jpeg=internal --with-gif=internal --with-png=internal
--with-libz=internal \
--with-oci=yes \
--with-oci-include=/usr/lib/oracle/instantclient_11_2/sdk/include \
--with-oci-lib=/usr/lib/oracle/instantclient_11_2
make
sudo make install
Environment variables:
LD_LIBRARY_PATH=/usr/local/pgsql/lib:/usr/lib/oracle/instantclient_11_2:/usr/local/lib:
PATH=/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/lib/oracle/instantclient_11_2
In Config.log, we can see:
configure:22485: checking for Oracle OCI headers in
/usr/lib/oracle/instantclient_11_2/sdk/include
configure:22518: g++ -c -g -O2
-I/usr/lib/oracle/instantclient_11_2/sdk/include conftest.cpp >&5
configure:22518: $? = 0
configure:22531: result: yes
configure:22552: checking for Oracle OCI libraries in
/usr/lib/oracle/instantclient_11_2
configure:22578: g++ -o conftest -g -O2
-I/usr/lib/oracle/instantclient_11_2/sdk/include -Wl,-no-as-needed
-L/usr/lib/oracle/instantclient_11_2 -lclntsh conftest.cpp -L/usr/lib
-lpq -lpthread -lm -lrt -ldl >&5
configure:22578: $? = 0
configure:22582: result: yes
configure:22626: checking if Oracle OCI version is >= 10.0.1
configure:22646: result: yes
configure:22649: checking for Oracle version >= 10.x to use -lnnz10 flag
configure:22654: result: yes
configure:22675: checking if Oracle support is enabled
configure:22689: result: yes
configure:24105: checking for Oracle OCI headers in
/usr/lib/oracle/instantclient_11_2/sdk/include
configure:24138: g++ -c -g -O2
-I/usr/lib/oracle/instantclient_11_2/sdk/include conftest.cpp >&5
configure:24138: $? = 0
configure:24151: result: yes
configure:24172: checking for Oracle OCI libraries in
/usr/lib/oracle/instantclient_11_2
configure:24198: g++ -o conftest -g -O2
-I/usr/lib/oracle/instantclient_11_2/sdk/include -Wl,-no-as-needed
-L/usr/lib/oracle/instantclient_11_2 -lclntsh conftest.cpp -lexpat
-L/usr/lib -lpq -lpthread -lm -lrt -ldl >&5
configure:24198: $? = 0
configure:24202: result: yes
configure:24246: checking if Oracle OCI version is >= 8.1.7
configure:24266: result: yes
configure:24269: checking for Oracle version >= 10.x to use -lnnz10 flag
configure:24274: result: yes
configure:24295: checking if Oracle support is enabled
configure:24309: result: yes
Apparently, no errors to be found.
But OGR tools cannot access Oracle datasources.
Hoping to get some help on this,
--
Rui Cavaco
Mail: rcavaco at sig2000.pt
More information about the gdal-dev
mailing list