Skip to content

Commit 2c29cbd

Browse files
committed
Make the default client library directory names version number independent
1 parent e697c17 commit 2c29cbd

File tree

2 files changed

+17
-18
lines changed

2 files changed

+17
-18
lines changed

INSTALL.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,8 @@ and
199199
cd /opt/oracle
200200
unzip instantclient-basic-linux.x64-12.1.0.2.0.zip
201201
unzip instantclient-sdk-linux.x64-12.1.0.2.0.zip
202-
cd instantclient_12_1
202+
mv instantclient_12_1 instantclient
203+
cd instantclient
203204
ln -s libclntsh.so.12.1 libclntsh.so
204205
ln -s libocci.so.12.1 libocci.so
205206
```
@@ -209,23 +210,23 @@ Make sure that `libaio` is installed.
209210
To run applications, you will need to set the link path:
210211

211212
```
212-
export LD_LIBRARY_PATH=/opt/oracle/instantclient_12_1
213+
export LD_LIBRARY_PATH=/opt/oracle/instantclient
213214
```
214215

215216
Alternatively, if there is no other Oracle software on the machine
216217
that will be impacted, permanently add Instant Client to the run-time
217218
link path. Do this on Linux by creating a file
218219
`/etc/ld.so.conf.d/oracle-instantclient.conf` that contains the library
219-
location `/opt/oracle/instantclient_12_1`, and then run `ldconfig` as
220+
location `/opt/oracle/instantclient`, and then run `ldconfig` as
220221
the root user.
221222

222223
### 3.4 Install the driver
223224

224225
Tell the installer where you installed Instant Client:
225226

226227
```
227-
export OCI_LIB_DIR=/opt/oracle/instantclient_12_1
228-
export OCI_INC_DIR=/opt/oracle/instantclient_12_1/sdk/include
228+
export OCI_LIB_DIR=/opt/oracle/instantclient
229+
export OCI_INC_DIR=/opt/oracle/instantclient/sdk/include
229230
```
230231

231232
Run the installer:
@@ -405,12 +406,12 @@ export DYLD_LIBRARY_PATH=/opt/oracle/instantclient
405406
### 5.5 Install the driver
406407

407408
The installer will automatically locate Instant Client in
408-
`/opt/oracle/instantclient`. If it elsewhere, tell the installer
409+
`/opt/oracle/instantclient`. If it is elsewhere, tell the installer
409410
where to find it:
410411

411412
```
412-
export OCI_LIB_DIR=/whereever/instantclient_11_2
413-
export OCI_INC_DIR=/whereever/instantclient_11_2/sdk/include
413+
export OCI_LIB_DIR=/whereever/instantclient
414+
export OCI_INC_DIR=/whereever/instantclient/sdk/include
414415
```
415416

416417
Run the installer:

binding.gyp

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@
4040
"GCC_ENABLE_CPP_RTTI": "YES"
4141
},
4242
"variables" : {
43-
"oci_inc_dir%" : "<!(if [ -z $OCI_INC_DIR ]; then echo \"/opt/oracle/instantclient_11_2/sdk/include/\"; else echo $OCI_INC_DIR; fi)",
44-
"oci_lib_dir%" : "<!(if [ -z $OCI_LIB_DIR ]; then echo \"/opt/oracle/instantclient_11_2/\"; else echo $OCI_LIB_DIR; fi)",
45-
},
43+
"oci_inc_dir%" : "<!(if [ -z $OCI_INC_DIR ]; then echo \"/opt/oracle/instantclient/sdk/include/\"; else echo $OCI_INC_DIR; fi)",
44+
"oci_lib_dir%" : "<!(if [ -z $OCI_LIB_DIR ]; then echo \"/opt/oracle/instantclient/\"; else echo $OCI_LIB_DIR; fi)",
45+
},
4646
"cflags" : ['-fexceptions'],
4747
"cflags_cc" : ['-fexceptions'],
4848
"libraries" : ["-lclntsh"],
@@ -54,9 +54,9 @@
5454
[
5555
'OS=="solaris"', {
5656
"variables" : {
57-
"oci_inc_dir%" : "<!(if [ -z $OCI_INC_DIR ]; then echo \"/opt/oracle/instantclient_12_1/sdk/include/\"; else echo $OCI_INC_DIR; fi)",
58-
"oci_lib_dir%" : "<!(if [ -z $OCI_LIB_DIR ]; then echo \"/opt/oracle/instantclient_12_1/\"; else echo $OCI_LIB_DIR; fi)",
59-
},
57+
"oci_inc_dir%" : "<!(if [ -z $OCI_INC_DIR ]; then echo \"/opt/oracle/instantclient/sdk/include/\"; else echo $OCI_INC_DIR; fi)",
58+
"oci_lib_dir%" : "<!(if [ -z $OCI_LIB_DIR ]; then echo \"/opt/oracle/instantclient/\"; else echo $OCI_LIB_DIR; fi)",
59+
},
6060
"libraries" : ["-lclntsh"],
6161
"cflags" : ['-fexceptions'],
6262
"cflags_cc" : ['-fexceptions'],
@@ -67,8 +67,8 @@
6767
],
6868
["OS=='win'", {
6969
"variables" : {
70-
"oci_inc_dir%" : "C:/instantclient_12_1/sdk/include",
71-
"oci_lib_dir%" : "C:/instantclient_12_1/sdk/lib/msvc",
70+
"oci_inc_dir%" : "C:/instantclient/sdk/include",
71+
"oci_lib_dir%" : "C:/instantclient/sdk/lib/msvc",
7272
},
7373
"configurations" : {
7474
"Release" : {
@@ -92,8 +92,6 @@
9292
}
9393
],
9494
],
95-
96-
9795
"include_dirs" : [ "<(oci_inc_dir)",
9896
"src/dpi/src/",
9997
"src/dpi/include/"

0 commit comments

Comments
 (0)