[Gdal-dev] OCI support for Oracle 9i
Mateusz Loskot
mateusz at loskot.net
Thu May 17 08:41:24 EDT 2007
Otto Dassau wrote:
> Mateusz Loskot <mateusz at loskot.net> wrote:
>> Otto Dassau wrote:
>>>
>>> I am trying to build gdal 1.4.1 with OCI support but with no
>>> success. The database is an oracle 9i. In the configure script I
>>> provide:
>>>
>>> --with-oci=/usr/lib/oracle/9.2.0/OraHome \
>>> --with-oci-lib=/usr/lib/oracle/9.2.0/OraHome/lib
>> Otto,
>>
>> You should use
>>
>> --with-oci
>>
>> *or* pair of options
>>
>> --with-oci-include --with-oci-lib
>
> yes, but the header files are in two folders - so I use:
>
> --with-oci-include='/usr/lib/oracle/9.2.0/OraHome/rdbms/public \
> /usr/lib/oracle/9.2.0/OraHome/rdbms/demo'
Otto,
Unfortunately, this hack won't work.
I'm a little surprised that ./configure can not detect your headers.
Some time ago, I fixed support for older Oracle versions in the
./configure and m4/ax_oracle_oci.m4 macro
Here, you can see that for older Oracle, headers are checked in two
locations:
http://trac.osgeo.org/gdal/browser/trunk/gdal/m4/ax_oracle_oci.m4#L102
http://trac.osgeo.org/gdal/browser/trunk/gdal/m4/ax_oracle_oci.m4#L175
ORACLE_HOME/rdbms/public
and
ORACLE_HOME/rdbms/demo
AFAIR, some users confirmed that this fix works.
>>> b) checking for Oracle OCI libraries in
>>> /usr/lib/oracle/9.2.0/OraHome/lib
>>>
>>> here I get following error message that -lnnz10 is missing:
>>>
>>> #configure:26066: checking for Oracle OCI libraries in
>>> #/usr/lib/oracle/9.2.0/OraHome/lib configure:26097: g++ -o
>>> conftest -g -O2 #-I/usr/lib/oracle/9.2.0/OraHome/rdbms/public
>>> #-L/usr/lib/oracle/9.2.0/OraHome/lib -lclntsh -lnnz10 conftest.cc
>>> -L/usr/lib #-lxerces-c -lpthread -ljasper -lmfhdf -ldf -lgif
>>> -ljpeg -ltiff -lpng -lnetcdf #-lcfitsio -lpq -L/usr/lib -lpq -lz
>>> -lpthread -lm -lrt -ldl >&5 /usr/bin/ld: #cannot find -lnnz10
>>> collect2: ld returned 1 exit status
Older Oracle versions does not have nnz10 library.
As I see in your files list, you don't have it indeed.
Although, this issue seems to be also filtered in the ./configure script:
http://trac.osgeo.org/gdal/browser/trunk/gdal/m4/ax_oracle_oci.m4#L263
If version is >=10.x, then add -lnnz10, otherwise not.
I suppose there may be two issues:
1) problem with detecting version of Oracle
2) the ./configure script has not been regenerated (by ./autogen.sh)
before releasing, so changes in the ax_oracle_oci.m4 macro are not
present there
Otto, would it be possible for you to try GDAL from SVN ?
Just for this issue, to test if SVN works for older Oracle.
Unfortunately, I have only access to Oracle 10g so it's very hard to
catch all subtle differences.
Thanks for your help!
Cheers
--
Mateusz Loskot
http://mateusz.loskot.net
More information about the Gdal-dev
mailing list