Closed nkezhaya closed 6 years ago
@whitepaperclip Thanks 👍
@acautin or @seanhinde Can you please check it out in your mac?
@c-bik this seems to be correct as @seanhinde had to fix it to compile using the latest oci client version.
Thanks for your contribution @whitepaperclip 👍
We should maybe consider a version check for future releases, or at least document this needs to change based on installed version of the Oracle libs
We should maybe consider a version check for future releases, or at least document this needs to change based on installed version of the Oracle libs
@seanhinde do you have an idea how can we do that (installed rpm version check commands in makefile or restructure the project with automake?)
could run instantclient_12_2/sqlplus -V and parse out the numbers from there
More specifically:
INSTANT_CLIENT_LIB_PATH/sqlpus -V
Hmm. I don't know about you guys, but I don't have sqlplus installed. Would it be too ugly to pick whatever version of the libs they have installed, just based on the file name?
On May 1, 2018, at 03:47, seanhinde notifications@github.com wrote:
More specifically: INSTANT_CLIENT_LIB_PATH/sqlpus -V
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
@whitepaperclip alternatively...
rpm -qa | grep oracle-instantclient
oracle-instantclient12.2-devel-12.2.0.1.0-1.x86_64
oracle-instantclient12.2-basic-12.2.0.1.0-1.x86_64
.. then awk
, sed
etc...
Macs won't have rpm so that won't work generically.
I must have installed something more than the basic libs package to end up with sqlplus. @whitepaperclip do you have anything executable in your instantclient directory?
True, my bad!
how about grepping out OCI_MAJOR_VERSION from oci.h ?
For what it's worth, none of the other libraries I have in my directory have version numbers included, other than libnnz12
. So this would work, presumably:
$ ls oracle/macos/lib/libnnz* | grep -oE '[0-9]+'
12
Which could then be used to specify the libnnz
version.
(Perhaps a bit safer: ls oracle/macos/lib/libnnz??\.dylib | grep -oE '[0-9]+'
)
I haven't dug into your build process, but in general we (Oracle) document that on macOS the Oracle libs should be in ~/lib or /usr/local/lib. Your link line could then just use libclntsh, possibly with rpath.
This is being shipped now in the latest version of Instant Client for MacOS.