-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for ORACLE_HOME #20
Comments
A few comments about this request:
Any comments? |
oraenv works, I am able to compile and run the test like this (vs oracle XE)
|
It is correct as for instant clients. As far as I checked, however, it isn't correct for ORACLE_HOME-based clients on Linux. $ echo $ORACLE_HOME
/home/ora121/app/ora121/product/12.1.0/dbhome_1
$ readelf -d $ORACLE_HOME/lib/libclntsh.so | grep RPATH
0x000000000000000f (RPATH) Library rpath: [/home/ora121/app/ora121/product/12.1.0/dbhome_1/lib] I made a small C program. $ wget https://gist.githubusercontent.com/kubo/4bbb374e2a3fb05f4a1baef2bf8875ea/raw/46e10020fe413e2710fbac1d48bd56a02dc05fea/dln-load.c
$ cc -o dln-load dln-load.c -ldl
$ env | grep LD_LIBRARY_PATH # verify that LD_LIBRARY_PATH isn't set.
$ ./dln-load /opt/oracle/ic_12102_64/libclntsh.so.12.1 # Instant client
dlopen error: libmql1.so: cannot open shared object file: No such file or directory
$ env | grep ORACLE_HOME
ORACLE_HOME=/home/ora121/app/ora121/product/12.1.0/dbhome_1
$ ./dln-load $ORACLE_HOME/lib/libclntsh.so.12.1 # ORACLE_HOME-based client
OCIEnvCreate() => 0
link map:
(nil):
0x7ffd00cf4000:
0x7f54c5798000: /lib/x86_64-linux-gnu/libdl.so.2
0x7f54c53ce000: /lib/x86_64-linux-gnu/libc.so.6
0x7f54c599c000: /lib64/ld-linux-x86-64.so.2
0x7f54c240f000: /home/ora121/app/ora121/product/12.1.0/dbhome_1/lib/libclntsh.so.12.1
0x7f54c2199000: /home/ora121/app/ora121/product/12.1.0/dbhome_1/lib/libmql1.so
0x7f54c1e1b000: /home/ora121/app/ora121/product/12.1.0/dbhome_1/lib/libipc1.so
0x7f54c1711000: /home/ora121/app/ora121/product/12.1.0/dbhome_1/lib/libnnz12.so
0x7f54c14cc000: /home/ora121/app/ora121/product/12.1.0/dbhome_1/lib/libons.so
0x7f54c11c3000: /lib/x86_64-linux-gnu/libm.so.6
0x7f54c0fa6000: /lib/x86_64-linux-gnu/libpthread.so.0
0x7f54c0d8d000: /lib/x86_64-linux-gnu/libnsl.so.1
0x7f54c0b85000: /lib/x86_64-linux-gnu/librt.so.1
0x7f54c0983000: /lib/x86_64-linux-gnu/libaio.so.1
0x7f54c0411000: /home/ora121/app/ora121/product/12.1.0/dbhome_1/lib/libclntshcore.so.12.1
0x7f54c0208000: /lib/x86_64-linux-gnu/libnss_compat.so.2
0x7f54bfffc000: /lib/x86_64-linux-gnu/libnss_nis.so.2
0x7f54bfdea000: /lib/x86_64-linux-gnu/libnss_files.so.2 |
Thanks, Kubo. Good point about ORACLE_HOME-based clients. That may be worth pursuing. |
We don't use
|
@michael-o I have my own ideas about what should 'just work'. Can you expand a bit more on the various install cases you think need to be covered so we're in agreement on the direction? Cover install, upgrade of interfaces and upgrades of Oracle client. Installs with ORACLE_HOME, Instant Client ZIPs, Instant Client RPMs are also things to think about. |
@cjbj Of course! We install (GUI installer) on all machines (RHEL6, HP-UX 11.31) the full client from MOSC. Set |
@michael-o what's stopping you setting LD_LIBRARY_PATH? |
Nothing actually, but supporting |
@anthony-tuininga So I added |
Good point. I'll discuss with @cjbj and get back to you. |
Perhaps because I tend to have multiple Oracle libs around, I'd only ever use ldconfig when I have a single Instant Client and nothing else installed. BTW, I contributed the installation code to cx_Oracle 5.2 to automatically find & use Instant Client RPMs or ORACLE_HOME, so I get the general install simplification desires. Before 5.2 you would always have needed to fiddle during install, and set The new ODPI-C layer model bring benefits for building and upgrading in scenarios that haven't been discussed in this issue. We've traded one install simplication for others, such as the ability to ship Python wheels. Can linking be improved - sure. I'd like changes to make it easier for apps that distribute Instant Client in arbitrary product directions. And maybe it could add |
…e Oracle client fails, try using $ORACLE_HOME/lib/libclntsh.so (#20).
Suggestion implemented. Thanks! |
It would be nice if odpi would support
ORACLE_HOME
instead of fiddling withLD_LIBRARY_PATH
for those who have the database or full client installed.The text was updated successfully, but these errors were encountered: