#1976 closed enhancement (fixed)
compile with OCI using oracle instantclient
Reported by: | jml | Owned by: | Mateusz Łoskot |
---|---|---|---|
Priority: | normal | Milestone: | 1.5.0 |
Component: | ConfigBuild | Version: | 1.4.3 |
Severity: | normal | Keywords: | oracle instantclient |
Cc: | warmerdam |
Description
Trying to configure using the -with-oci=path option fails, if the oracle instantclient is used instead of the full client, because the instantclient has a different directory structure.
I changed the line 26003 of configure from
- oracle_include_dir="$oracle_home_dir/rdbms/public"
to + oracle_include_dir="$oracle_home_dir/sdk/include"
and it seems to work for me. Maybe the configure file could be enhanced to do one more check if the full client or the instantclient is used.
I also found an old patch for that from Dion Wooning, on http://lists.maptools.org/pipermail/gdal-dev/2006-February/008057.html. Maybe it could be implemented in future versions.
Attachments (1)
Change History (7)
comment:1 by , 16 years ago
Cc: | added |
---|---|
Component: | default → ConfigBuild |
Milestone: | → 1.5.0 |
Owner: | changed from | to
comment:3 by , 16 years ago
Status: | new → assigned |
---|
I'll check it, but there is no need to manually hack the ./configure script because there are dedicated options that can be used to specify different locations of include and lib directories instead of relying on structure of ORACLE_HOME (for more ./configure --help):
--with-oci-include=$ORACLE_HOME/sdk/include --with-oci-lib=$ORACLE_HOME/sdk/lib
comment:4 by , 16 years ago
Note: There is no need to set the $ORACLE_HOME variable using the instantclient. I could not get ./configure to finish correctly, using the options mentioned above (with full path).
by , 16 years ago
Attachment: | instantclient-basic-and-sdk-tree.txt added |
---|
Listing with content of Oracle IC files (basic + sdk) I used to test the ./configure script
comment:5 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
jml,
Yes, I understand there is no need to use the ORACLE_HOME env variable, I just used it in the example above as a placeholder, so it should be read this way:
--with-oci-include=/path/to/instantclient_11_1/sdk/include
I tested current version of ./configure with Instant Client and it works for me. Here is how I called the ./configure and what options I used:
./configure --with-oci=yes \ --with-oci-include=/home/mloskot/usr/instantclient_11_1/sdk/include \ --with-oci-lib=/home/mloskot/usr/instantclient_11_1
The attached file instantclient-basic-and-sdk-tree.txt includes complete listing of my IC installation (basic + sdk).
I had to create one symbolic link in the IC installation directory:
ln -s libclntsh.so.11.1 libclntsh.so
This is required to make the -lclntsh findable. Also, don't forget to export LD_LIBRARY_PATH=/path/to/instantclient.
I assume current version of the ./configure works with Instant Client. The IC installation differs quite much from the regular Oracle installation and libraries and include files are placed in different locations and it is required to point these locations separately for headers and libraries (as shown above). Also, because there are installation differences between Oracle versions as well as between Oracle and Instant Client, I would also prefer to not to apply any patches making the script too complex, especially if current version makes it possible to build with both Oracle clients, full and IC without any problems.
comment:6 by , 16 years ago
I've forgot to add that I tested Instant Client 11, so I also needed to make following symlink:
ln -s libnnz11.so libnnz10.so
because -lnnz10 is used.
Perhaps it would be better to use -lnnz and require uses to link to libnnz.so.
Mateusz,
Can you look into this when you dig into Oracle problems? I think some work has already been done on instant client support, so I'm a bit surprised by this report. Perhaps it was only done in trunk? If so, that's fine. At this point I'm not keen on taking risky configure changes back into 1.4.x.