Ticket #1651 (assigned defect)

Opened 1 year ago

Last modified 4 months ago

OCI Support for Oracle 9i

Reported by: dassau Assigned to: mloskot (accepted)
Priority: normal Milestone: 1.5.3
Component: OGR_SF Version: svn-trunk
Severity: normal Keywords: OCI
Cc:

Description

Hi,

I try to build GDAL packages under debian sarge with OCI support for a oracle 9i database. Therefore I have header and lib provided as .deb packages. The header files a provided in two folders: /usr/lib/oracle/9.2.0/OraHome/rdbms/public and /usr/lib/oracle/9.2.0/OraHome/rdbms/demo

When I try to configure GDAL with following parameters:

--with-oci-include='/usr/lib/oracle/9.2.0/OraHome/rdbms/public \

/usr/lib/oracle/9.2.0/OraHome/rdbms/demo' \

--with-oci-lib=/usr/lib/oracle/9.2.0/OraHome/lib

I get following error:

checking for Oracle OCI headers in /usr/lib/oracle/9.2.0/OraHome/rdbms/public /usr/lib/oracle/9.2.0/OraHome/rdbms/demo... not found checking if Oracle support is enabled... no

config.log: configure:22465: checking for Oracle OCI headers in /usr/lib/oracle/9.2.0/OraHome/rdbms/public /usr/lib/oracle/9.2.0/OraHome/rdbms/demo configure:22503: g++ -c -g -O2 -I/usr/lib/oracle/9.2.0/OraHome/rdbms/public /usr/lib/oracle/9.2.0/OraHome/rdbms/demo conftest.cc >&5 conftest.cc:68:17: oci.h: No such file or directory conftest.cc:81:4: #error Oracle oci.h header not found

When I switch the order of the two oci-include directories:

--with-oci-include='/usr/lib/oracle/9.2.0/OraHome/rdbms/demo \

/usr/lib/oracle/9.2.0/OraHome/rdbms/public' \

--with-oci-lib=/usr/lib/oracle/9.2.0/OraHome/lib

I get following error:

checking for Oracle OCI headers in /usr/lib/oracle/9.2.0/OraHome/rdbms/demo /usr/lib/oracle/9.2.0/OraHome/rdbms/public... not found checking if Oracle support is enabled... no

config.log configure:22465: checking for Oracle OCI headers in /usr/lib/oracle/9.2.0/OraHome/rdbms/demo /usr/lib/oracle/9.2.0/OraHome/rdbms/public configure:22503: g++ -c -g -O2 -I/usr/lib/oracle/9.2.0/OraHome/rdbms/demo /usr/lib/oracle/9.2.0/OraHome/rdbms/public conftest.cc >&5 In file included from conftest.cc:68: /usr/lib/oracle/9.2.0/OraHome/rdbms/demo/oci.h:2159:21: ociextp.h: No such file or directory In file included from /usr/lib/oracle/9.2.0/OraHome/rdbms/demo/oci.h:2164,

from conftest.cc:68:

/usr/lib/oracle/9.2.0/OraHome/rdbms/demo/ociap.h:192:17: nzt.h: No such file or directory In file included from /usr/lib/oracle/9.2.0/OraHome/rdbms/demo/oci.h:2164,

from conftest.cc:68:

/usr/lib/oracle/9.2.0/OraHome/rdbms/demo/ociap.h:6607: error: type specifier

omitted for parameter `nzttWallet'

/usr/lib/oracle/9.2.0/OraHome/rdbms/demo/ociap.h:6607: error: parse error

before `*' token

/usr/lib/oracle/9.2.0/OraHome/rdbms/demo/ociap.h:6611: error: type specifier

omitted for parameter `nzttWallet'

/usr/lib/oracle/9.2.0/OraHome/rdbms/demo/ociap.h:6611: error: parse error

before `*' token

... [snip]

It seems, that only the first path provided with the "--with-oci-include" parameter is checked. When I look into the config.log file, in the beginning it says:

less config.log: Invocation command line was $ ./configure --prefix=/usr --mandir=/share/man --with-threads --with-grass=no --with-geotiff=internal --with-xerces --with-netcdf --with-jasper --with-odbc=no --with-python --with-postgresql --with-oci-include=/usr/lib/oracle/9.2.0/OraHome/rdbms/demo /usr/lib/oracle/9.2.0/OraHome/rdbms/public --with-oci-lib=/usr/lib/oracle/9.2.0/OraHome/lib

Here the quotation marks are missing for the 2 "--with-oci-include" pathes. Maybe they are not added and used for configuration?

I hope someone has a clue for this.

thanks

Otto

PS: I checked with version 1.4.1 and svn checkout this morning.

Change History

05/31/07 09:14:32 changed by dassau

some additional info:

hi,

when I put all header files into a folder "test" it works (see below) except that there seems to be a problem detecting the correct Oracle version.

checking for Oracle OCI headers in /usr/lib/oracle/9.2.0/OraHome/rdbms/test... yes checking for Oracle OCI libraries in /usr/lib/oracle/9.2.0/OraHome/lib... yes checking if Oracle OCI version is >= 8.1.7... no configure: WARNING: Oracle version unknown, probably OCI older than 10.2 is available checking if Oracle support is enabled... yes

regards,

Otto

05/31/07 12:05:26 changed by dassau

Hi,

found that it works (better) only defining:

./configure --with-oci=/usr/lib/oracle/9.2.0/OraHome

but it still doesn't get the oracle version:

checking for Oracle OCI headers in /usr/lib/oracle/9.2.0/OraHome/rdbms/public... yes checking for Oracle OCI libraries in /usr/lib/oracle/9.2.0/OraHome/lib... yes cat: /usr/lib/oracle/9.2.0/OraHome/rdbms/public/oci.h: No such file or directory cat: /usr/lib/oracle/9.2.0/OraHome/rdbms/public/oci.h: No such file or directory checking if Oracle OCI version is >= 8.1.7... no configure: WARNING: Oracle version unknown, probably OCI older than 10.2 is available checking if Oracle support is enabled... yes

that's one the one hand, because oci.h is located in rdbms/demo and not in rdbms/public as assumed and on the other hand, because following lines in m4/ax_oracle_oci.m4 dont work:

oracle_version_major=`cat $oracle_include_dir/oci.h \

| grep '#define.*OCI_MAJOR_VERSION.*' \ | sed -e 's/#define OCI_MAJOR_VERSION *//' \ | sed -e 's/ *\/\*.*\*\///'`

oracle_version_minor=`cat $oracle_include_dir/oci.h \

| grep '#define.*OCI_MINOR_VERSION.*' \ | sed -e 's/#define OCI_MINOR_VERSION *//' \ | sed -e 's/ *\/\*.*\*\///'`

because these variables OCI_MAJOR_VERSION and OCI_MINOR_VERSION don't exist in rdbms/demo/oci.h of the oracle 9i. At least not in my installation.

regards,

Otto

05/31/07 14:06:42 changed by dassau

Hi,

gdal 1.4.1 and current svn now configures and compiles, but there are still some problems with oracle 9i databases as described above which could be optimized. If you like I can try to help.

1) The header files are provided in two folders: rdbms/public and rdbms/demo. Trying to configure GDAL fails with:

--with-oci-include='/usr/lib/oracle/9.2.0/OraHome/rdbms/public \

/usr/lib/oracle/9.2.0/OraHome/rdbms/demo' \

--with-oci-lib=/usr/lib/oracle/9.2.0/OraHome/lib

and only works with:

--with-oci=/usr/lib/oracle/9.2.0/OraHome

2) during configuration gdal does not find the oracle version, because:

a) oci.h is located in rdbms/demo and not in rdbms/public as assumed when no pathes are provided with "--with-oci-include" b) variables OCI_MAJOR_VERSION and OCI_MINOR_VERSION as used in ax_oracle_oci.m4 don't exist in rdbms/demo/oci.h. At least not in my oracle 9i.

kind regards,

Otto

06/01/07 06:47:16 changed by mloskot

  • status changed from new to assigned.
  • owner changed from warmerdam to mloskot.

06/21/07 13:55:18 changed by warmerdam

  • milestone set to 1.4.3.

If there are fixes to be made, I'm hopefully this could be addressed in 1.4.3. Milestone set.

09/14/07 09:55:41 changed by warmerdam

  • milestone changed from 1.4.3 to 1.5.0.

Moving to 1.5 to lighten 1.4.3 load.

12/04/07 13:00:35 changed by warmerdam

  • keywords set to OCI.
  • component changed from default to OGR_SF.
  • milestone changed from 1.5.0 to 1.5.1.

OCI issues deferred to 1.5.1.

03/04/08 16:20:18 changed by warmerdam

  • milestone changed from 1.5.1 to 1.5.2.