Closed kubo closed 7 years ago
@kubo Thanks. Did you test those changes on Solaris yourself?
Sorry, I have not tested it on Solaris. I wrote it from my memory. -R,$(OCI_LIB_DIR)
should be -R$(OCI_LIB_DIR)
.
As far as I checked, -Wl,-rpath,$(OCI_LIB)
is also okay on recent Solaris, at least Solaris 11.3 I tested. It had not been okay on old Solaris according to my memory.
I suspect the -R$(OCI_LIB_DIR)
is required for a different compiler. So I'll wait on that until I can test on a Solaris VM.
I have rpath on Linux on my list - like we do for node-oracledb.
Setting RPATH when compiling ODPI-C or a driver like cx_Oracle and node-oracledb won't help due to the fact that there is no RPATH set on libclntsh.so in Oracle Instant Client. If you have a full client, however, ODPI-C now automatically locates and loads the library.
Okay, thanks!
Could you set
-Wl,-rpath,$(OCI_LIB_DIR)
toLDFLAGS
on Linux and-R,$(OCI_LIB_DIR)
on Solaris in addition to macOS?If rpath is set, client programs depending on odpi have no need to use LD_LIBRARY_PATH to know the directory containing Oracle client libraries.