K2InformaticsGmbH / erloci

Erlang Oracle native driver - DEPRECATED, see https://github.com/K2InformaticsGmbH/oranif instead
Apache License 2.0
37 stars 11 forks source link

Updated MacOS Makefile to use libnnz12 #57

Closed nkezhaya closed 6 years ago

nkezhaya commented 6 years ago

This is being shipped now in the latest version of Instant Client for MacOS.

c-bik commented 6 years ago

@whitepaperclip Thanks 👍

@acautin or @seanhinde Can you please check it out in your mac?

acautin commented 6 years ago

@c-bik this seems to be correct as @seanhinde had to fix it to compile using the latest oci client version.

c-bik commented 6 years ago

Thanks for your contribution @whitepaperclip 👍

seanhinde commented 6 years ago

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

c-bik commented 6 years ago

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?)

seanhinde commented 6 years ago

could run instantclient_12_2/sqlplus -V and parse out the numbers from there

seanhinde commented 6 years ago

More specifically: INSTANT_CLIENT_LIB_PATH/sqlpus -V

nkezhaya commented 6 years ago

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.

c-bik commented 6 years ago

@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...

seanhinde commented 6 years ago

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?

c-bik commented 6 years ago

True, my bad!

seanhinde commented 6 years ago

how about grepping out OCI_MAJOR_VERSION from oci.h ?

nkezhaya commented 6 years ago

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.

nkezhaya commented 6 years ago

(Perhaps a bit safer: ls oracle/macos/lib/libnnz??\.dylib | grep -oE '[0-9]+')

cjbj commented 6 years ago

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.