kubo / ruby-oci8

Ruby-oci8 - Oracle interface for ruby
Other
169 stars 75 forks source link

Could it (oci8) be build include dependencies instead of links to the oracle_home path? #170

Closed jliang888 closed 6 years ago

jliang888 commented 6 years ago

I am new to this package, when it's build/install, it requires the ORACLE_HOME, which means that will looking for dependencies, and I saw a lot of linkages show up, example something like: libclntsh.so.11.1 => /u01/oracle/product/11.2.0.4/db_1/lib/libclntsh.so.11.1 (0x00007f521119e000) which means that installation is not portable at all, if the different box, the ORACLE_HOME/version is slightly different, it will break, have to install on each box individually, is it possible to build a generic one without the linkage(i.e. dependencies included)? I am looking a build ruby gem of oci8 which allow me to distribute my network via puppy rollout.

Thanks.

kubo commented 6 years ago

You can make a ruby-oci8 binary gem and distribute it.

$ wget https://dl.bintray.com/kubo/generic/ruby-oci8-2.2.4.1.tar.gz
$ tar xvfz ruby-oci8-2.2.4.1.tar.gz
$ cd ruby-oci8-2.2.4.1
$ export LD_LIBRARY_PATH=...
$ ruby setup.rb config -- --with-runtime-check
$ make
$ gem build ruby-oci8.gemspec -- current
$ ls -l ruby-oci8-2.2.4.1-x86_64-linux.gem

This gem file includes oci8lib_???.so which loads Oracle libraries and checks available functions at runtime. ??? is ruby ABI version. It is 240 for ruby 2.4.x.

jliang888 commented 6 years ago

What LD_LIBRARY_PATH would be in this case? $ORACLE_HOME/lib? i.e. /u01/oracle/product/11.2.0.4/db_1/lib/ ?

Thanks.

jliang888 commented 6 years ago

seems right: export LD_LIBRARY_PATH=$ORACLE_HOME/lib

jliang888 commented 6 years ago

Kubo, Thank you for your quick response, I got it installed and tested, it will run after I set ENV such as ORACLE_HOME,ORACLE_SID, PATH, LD_LIBRARY_PATH and etc. in the shell. However, I'd like to set those ENV inside the ruby script instead of shell, the reason is that I have multiple versions on the box, I need to set those env variable inside my script based on the input of arguments(SID, or port...), I tried to do something like:

!/usr/bin/ruby

ORACLE_HOME='/u01/app/oracle/product/11.2.0/xe' ENV['ORACLE_HOME']=ORACLE_HOME ENV['ORACLE_SID']='XE' ENV['NLS_LANG']=#{ORACLE_HOME}/bin/nls_lang.sh.strip ENV['PATH']="#{ORACLE_HOME}/bin:#{ENV['PATH']}" ENV['LD_LIBRARY_PATH']="#{ORACLE_HOME}/lib" require 'oci8'

But it will be error out: /vagrant/.rbenv/linux-2.6-libc-2.5-x86_64/versions/1.9.3-p392/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in require': libclntsh.so.12.1: cannot open shared object file: No such file or directory; libclntsh.so.11.1: cannot open shared object file: No such file or directory; libclntsh.so.10.1: cannot open shared object file: No such file or directory; libclntsh.so.9.0: cannot open shared object file: No such file or directory; libclntsh.so.8.0: cannot open shared object file: No such file or directory; (LoadError) from /vagrant/.rbenv/linux-2.6-libc-2.5-x86_64/versions/1.9.3-p392/lib/ruby/1.9.1/rubygems/custom_require.rb:36:inrequire' from /vagrant/.rbenv/linux-2.6-libc-2.5-x86_64/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/ruby-oci8-2.2.4.1-x86_64-linux/lib/oci8.rb:107:in <top (required)>' from /vagrant/.rbenv/linux-2.6-libc-2.5-x86_64/versions/1.9.3-p392/lib/ruby/1.9.1/rubygems/custom_require.rb:60:inrequire' from /vagrant/.rbenv/linux-2.6-libc-2.5-x86_64/versions/1.9.3-p392/lib/ruby/1.9.1/rubygems/custom_require.rb:60:in rescue in require' from /vagrant/.rbenv/linux-2.6-libc-2.5-x86_64/versions/1.9.3-p392/lib/ruby/1.9.1/rubygems/custom_require.rb:35:inrequire' from testoci.rb:9:in `

'

So, is there a way to do this? Thank you in advance.

kubo commented 6 years ago

LD_LIBRARY_PATH is checked only at process initialization. Changing it in ruby has no effect except child processes.

If you use ORACLE_HOME-based clients only, use the latest ruby-oci8, which will be ruby-oci8 2.2.5, in the github repository

$ git clone https://github.com/kubo/ruby-oci8.git
$ cd ruby-oci8
$ export LD_LIBRARY_PATH=...
$ ruby setup.rb config -- --with-runtime-check
$ make
$ gem build ruby-oci8.gemspec -- current

If you use instant clients also, you need to start a new ruby process after LD_LIBRARY_PATH is set.

jliang888 commented 6 years ago

I am not using oracle instance client at all, does it mean I don't need to export LD_LIBRARY_PATH=...? or only need for building?

I cloned https://github.com/kubo/ruby-oci8.git and installed, the gem built is still ruby-oci8-2.2.4.1-x86_64-linux.gem which is .rbenv/linux-2.6-libc-2.5-x86_64/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/ruby-oci8-2.2.4.1-x86_64-linux/lib/oci8lib_191.so, not see oci8lib_225.so, I didn't see difference yet.

Thanks.

jliang888 commented 6 years ago

So, there is no way to set oracle env(ORACLE_HOME/SID and etc.) inside the ruby process and make oci8 find the library files?

kubo commented 6 years ago

I might confused you. The version number of ruby-oci8 is updated when I release new version. You need the following feature to use ORACLE_HOME-based client without LD_LIBRARY_PATH when runtime api check is enabled. The feature will be included in ruby-oci8 2.2.5 but the version number in the github repository and the generated gem version is still 2.2.4.1.

$ git log --oneline | grep d6f8494
d6f8494 Try to load $ORACLE_HOME/lib/libclntsh.so also when runtime api check is enabled on Unix.

The number in oci8lib_xxx.so depends on ruby version, not on ruby-oci8 version. It is used to include more than one oci8lib_xxx.so file in one binary gem. For example ruby-oci8 binary gem for Windows 32-bit includes oci8lib_191.so, oci8lib_200.so, oci8lib_210.so, oci8lib_220.so, oci8lib_230.so and oci8lib_240.so.

So, there is no way to set oracle env(ORACLE_HOME/SID and etc.) inside the ruby process and make oci8 find the library files?

You can set ORACLE_HOME, ORACLE_SID, etc. inside the ruby process. What you cannot set is LD_LIBRARY_PATH only. (Strictly speaking, you can set it but it has no effect inside the process itself. It affects child processes created after it is set.)

jliang888 commented 6 years ago

Kubo, Thanks for your quick response, based on your comment: _> You can set ORACLE_HOME, ORACLE_SID, etc. inside the ruby process. What you cannot set is LD_LIBRARYPATH only. (Strictly speaking, you can set it but it has no effect inside the process itself. It affects child processes created after it is set.)

I played a bit, yes, except LD_LIBRARY_PATH can't be set inside ruby child process, all other env can be reset. However, LD_LIBRARY_PATH can't be override is very inconvenient, seems like even I don't use instance client at all, I still need to set it, if I can't set LD_LIBRARY_PATH inside my ruby script then set other ORACLE env variable will be not useful, because set 1 or N env variables are samething... Could you make that happen in the next release? It will be very useful for everyone I believe. Think about this, when a child class inherits the methods/variables from parent, we always respect child class's override, so, the LD_LIBRARY_PATH override is very necessary. Another confusion I have here, I have a full client, why I still need the LD_LIBRARY_PATH? When I build it, I setup ORACLE_HOME/SID, but not LD_LIBRARY_PATH, build and install are fine: $ git clone https://github.com/kubo/ruby-oci8.git $ cd ruby-oci8 $ ruby setup.rb config -- --with-runtime-check $ make $ gem build ruby-oci8.gemspec -- current My current LD_LIBRARY_PATH=:/vagrant/.rbenv/linux-2.6-libc-2.5-x86_64/lib-ext have nothing to do with ORACLE library path. Why when I run it error out: /vagrant/.rbenv/linux-2.6-libc-2.5-x86_64/versions/1.9.3-p392/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': libclntsh.so.12.1: cannot open shared object file: No such file or directory; libclntsh.so.11.1: cannot open shared object file: No such file or directory; libclntsh.so.10.1: cannot open shared object file: No such file or directory; libnnz11.so: cannot open shared object file: No such file or directory; (LoadError) After I set: export LD_LIBRARY_PATH=$ORACLE_HOME/lib Then no more error. Why? My guess is what you mean by --with-runtime-check. However, I believe that when I set the $ORACLE_HOME, oci8 shouldn't only lookup env LD_LIBRARY_PATH, or say, oci8 could lookup $ORACLE_HOME/lib instead or both if any available, anyway, is it possible to work around of this?

Thank you very much in advance again.

kubo commented 6 years ago

Did you move ORACLE_HOME after the Oracle was installed?

Could you run the following command?

$ readelf -d $ORACLE_HOME/lib/libclntsh.so | grep RPATH

It should output the following line when ORACLE_HOME is /u01/app/oracle/product/11.2.0/xe.

0x000000000000000f (RPATH)              Library rpath: [/u01/app/oracle/product/11.2.0/xe/lib]

RPATH has same effect with LD_LIBRARY_PATH. libclntsh.so can find libnnz11.so in the RPATH directory without LD_LIBRARY_PATH when RPATH is set correctly.

LD_LIBRARY_PATH is checked by ld.so (/lib64/ld-linux-x86-64.so.2 on Linux x86_64) at process initialization before ruby's main function is executed. Ruby-oci8 and any functions cannot make ld.so check it again.

jliang888 commented 6 years ago

Kubo, No, I didn't remove ORACLE_HOME at all. [root@centos65 vagrant]# ll /u01/app/oracle/product/11.2.0/xe/lib/libclntsh.so lrwxrwxrwx 1 oracle dba 17 Sep 15 14:17 /u01/app/oracle/product/11.2.0/xe/lib/libclntsh.so -> libclntsh.so.11.1 [root@centos65 vagrant]# readelf -d $ORACLE_HOME/lib/libclntsh.so | grep RPATH Nothing return. [root@centos65 vagrant]# readelf -d /u01/app/oracle/product/11.2.0/xe/lib/libclntsh.so

Dynamic section at offset 0x2594060 contains 27 entries: Tag Type Name/Value 0x0000000000000001 (NEEDED) Shared library: [libnnz11.so] 0x0000000000000001 (NEEDED) Shared library: [libdl.so.2] 0x0000000000000001 (NEEDED) Shared library: [libm.so.6] 0x0000000000000001 (NEEDED) Shared library: [libpthread.so.0] 0x0000000000000001 (NEEDED) Shared library: [libnsl.so.1] 0x0000000000000001 (NEEDED) Shared library: [libc.so.6] 0x0000000000000001 (NEEDED) Shared library: [libaio.so.1] 0x000000000000000e (SONAME) Library soname: [libclntsh.so.11.1] 0x000000000000000c (INIT) 0x4091b8 0x000000000000000d (FINI) 0x211afa0 0x0000000000000004 (HASH) 0x158 0x0000000000000005 (STRTAB) 0xc2df8 0x0000000000000006 (SYMTAB) 0x29a68 0x000000000000000a (STRSZ) 377074 (bytes) 0x000000000000000b (SYMENT) 24 (bytes) 0x0000000000000003 (PLTGOT) 0x26985c8 0x0000000000000002 (PLTRELSZ) 364584 (bytes) 0x0000000000000014 (PLTREL) RELA 0x0000000000000017 (JMPREL) 0x3b0190 0x0000000000000007 (RELA) 0x12bc58 0x0000000000000008 (RELASZ) 2639160 (bytes) 0x0000000000000009 (RELAENT) 24 (bytes) 0x000000006ffffffe (VERNEED) 0x12bb38 0x000000006fffffff (VERNEEDNUM) 6 0x000000006ffffff0 (VERSYM) 0x11eeea 0x000000006ffffff9 (RELACOUNT) 101786 0x0000000000000000 (NULL) 0x0 [root@centos65 vagrant]#

Not have the RPATH at all, hmm. I am going reinstall it again to see if I can have luck.

jliang888 commented 6 years ago

[root@centos65 vagrant]# gem uninstall ruby-oci8

[root@centos65 vagrant]# cd ruby-oci8 [root@centos65 ruby-oci8]# ruby setup.rb config -- --with-runtime-check ---> lib ---> lib/dbd <--- lib/dbd ---> lib/oci8 <--- lib/oci8 <--- lib ---> ext ---> ext/oci8 /vagrant/.rbenv/linux-2.6-libc-2.5-x86_64/versions/1.9.3-p392/bin/ruby /vagrant/ruby-oci8/ext/oci8/extconf.rb --with-runtime-check checking for load library path... LD_LIBRARY_PATH... checking /vagrant/.rbenv/linux-2.6-libc-2.5-x86_64/lib-ext... no checking /vagrant/.rbenv/linux-2.6-libc-2.5-x86_64/lib-ext... no checking /vagrant/.rbenv/linux-2.6-libc-2.5-x86_64/lib-ext... no checking ld.so.conf... no checking for cc... ok checking for gcc... yes checking for LP64... yes checking for sys/types.h... yes checking for ruby header... ok Get the version of Oracle from SQL*Plus... 1120 try -I/u01/app/oracle/product/11.2.0/xe/rdbms/public checking for oci.h... yes checking for OCIEnvCreate() in oci.h... yes checking for OCI_MAJOR_VERSION in oci.h... 11 checking for OCI_MINOR_VERSION in oci.h... 2 checking for localtime_r()... yes checking for dladdr()... yes checking for dlmodinfo()... no checking for dlgetname()... no checking for ruby/thread.h... no checking for rb_class_superclass() in ruby.h... yes checking for rb_thread_call_without_gvl() in ruby/thread.h... no checking for rb_sym2str() in ruby.h... no checking for plthook... plthook_elf.c creating extconf.h creating Makefile <--- ext/oci8 <--- ext [root@centos65 ruby-oci8]# make ruby -w setup.rb setup setup.rb:280: warning: assigned but unused variable - vname setup.rb:280: warning: assigned but unused variable - desc setup.rb:280: warning: assigned but unused variable - default2 ---> lib ---> lib/dbd <--- lib/dbd ---> lib/oci8 <--- lib/oci8 <--- lib ---> ext ---> ext/oci8 make make[1]: Entering directory /vagrant/ruby-oci8/ext/oci8' compiling oci8lib.c compiling env.c compiling error.c compiling oci8.c compiling ocihandle.c compiling connection_pool.c compiling stmt.c compiling bind.c compiling metadata.c compiling attr.c compiling lob.c compiling oradate.c compiling ocinumber.c compiling ocidatetime.c compiling object.c compiling apiwrap.c compiling encoding.c compiling oranumber_util.c compiling thread_util.c compiling util.c compiling plthook_elf.c compiling hook_funcs.c linking shared-object oci8lib_191.so make[1]: Leaving directory/vagrant/ruby-oci8/ext/oci8' <--- ext/oci8 <--- ext [root@centos65 ruby-oci8]# gem build ruby-oci8.gemspec -- current Binary gem for ruby 191 Successfully built RubyGem Name: ruby-oci8 Version: 2.2.4.1 File: ruby-oci8-2.2.4.1-x86_64-linux.gem [root@centos65 ruby-oci8]# gem install ./ruby-oci8-2.2.4.1-x86_64-linux.gem Successfully installed ruby-oci8-2.2.4.1-x86_64-linux 1 gem installed [root@centos65 ruby-oci8]# readelf -d $ORACLE_HOME/lib/libclntsh.so | grep RPATH [root@centos65 ruby-oci8]# readelf -d $ORACLE_HOME/lib/libclntsh.so

Dynamic section at offset 0x2594060 contains 27 entries: Tag Type Name/Value 0x0000000000000001 (NEEDED) Shared library: [libnnz11.so] 0x0000000000000001 (NEEDED) Shared library: [libdl.so.2] 0x0000000000000001 (NEEDED) Shared library: [libm.so.6] 0x0000000000000001 (NEEDED) Shared library: [libpthread.so.0] 0x0000000000000001 (NEEDED) Shared library: [libnsl.so.1] 0x0000000000000001 (NEEDED) Shared library: [libc.so.6] 0x0000000000000001 (NEEDED) Shared library: [libaio.so.1] 0x000000000000000e (SONAME) Library soname: [libclntsh.so.11.1] 0x000000000000000c (INIT) 0x4091b8 0x000000000000000d (FINI) 0x211afa0 0x0000000000000004 (HASH) 0x158 0x0000000000000005 (STRTAB) 0xc2df8 0x0000000000000006 (SYMTAB) 0x29a68 0x000000000000000a (STRSZ) 377074 (bytes) 0x000000000000000b (SYMENT) 24 (bytes) 0x0000000000000003 (PLTGOT) 0x26985c8 0x0000000000000002 (PLTRELSZ) 364584 (bytes) 0x0000000000000014 (PLTREL) RELA 0x0000000000000017 (JMPREL) 0x3b0190 0x0000000000000007 (RELA) 0x12bc58 0x0000000000000008 (RELASZ) 2639160 (bytes) 0x0000000000000009 (RELAENT) 24 (bytes) 0x000000006ffffffe (VERNEED) 0x12bb38 0x000000006fffffff (VERNEEDNUM) 6 0x000000006ffffff0 (VERSYM) 0x11eeea 0x000000006ffffff9 (RELACOUNT) 101786 0x0000000000000000 (NULL) 0x0 [root@centos65 ruby-oci8]#

No luck, not RPATH here, something I missed?

Thanks.

jliang888 commented 6 years ago

So, this RPATH will change when $ORACLE_HOME change? which means I can reset it inside my ruby script?

Thanks.

jliang888 commented 6 years ago

_> RPATH has same effect with LD_LIBRARY_PATH. libclntsh.so can find libnnz11.so in the RPATH directory without LD_LIBRARYPATH when RPATH is set correctly. Let me ask question in this way, does RPATH well follow to $ORACLE_HOME when its change? say distribute my build gem through the network, the ORACLE_HOME on each box might be different because ORACLE_HOME contains the SID and version#, so how RPATH adjust itself? BY set ORACLE_HOME?

kubo commented 6 years ago

Let me ask question in this way, does RPATH well follow to $ORACLE_HOME when its change?

No. Oracle universal installer creates libclntsh.so to set RPATH during Oracle installation. (not during ruby-oci8 installation.) How did you install the Oracle? Did the Oracle installation stopped before relink step? Otherwise, is it really a full client? libclntsh.so in instant clients doesn't have RPATH.

kubo commented 6 years ago

Do you use Oracle Express Edition? I checked libclntsh.so in it. It doesn't have RPATH.

kubo commented 6 years ago

Could you append /u01/app/oracle/product/11.2.0/xe/lib to /etc/ld.so.conf and run ldconfig to update /etc/ld.so.cache in hosts where Oracle express edition is installed in advance? RPATH is checked before files in /etc/ld.so.cache according to ld.so document. So even when a host has two oracle installations (one isn't express edition and the another is express edition), libclntsh.so in the former finds libnnz11.so in RPATH and libclntsh.so in the latter finds libnnz11.so in /etc/ld.so.cache.

jliang888 commented 6 years ago

Yes, I have XE installed on my VM for testing only, real production will be 11/12g, according to our conversation, seems like no way to specify oracle env (specify LIB PATH) inside my ruby script to make oci8 work, have to define LD_LIBRARY_PATH=... or RPATH is predefined before my ruby script run, correct? If libclntsh.so file works for any version of oracle connection, that might not be a problem, so I can always do export LD_LIBRARY_PATH=$(dirname find /u01 -name libclntsh.so|head -1), then I can connect any of my databases no matter 11/12g, say you have 11g and 12g installed on same box, which libclntsh.so you will use, doesn't matter, correct?

Thanks.

kubo commented 6 years ago

Could you update ruby-oci8 source code to the latest? I changed order to load libclntsh.so today.

Yes, I have XE installed on my VM for testing only, real production will be 11/12g, according to our conversation, seems like no way to specify oracle env (specify LIB PATH) inside my ruby script to make oci8 work, have to define LD_LIBRARY_PATH=... or RPATH is predefined before my ruby script run, correct?

Yes.

When ruby-oci8 is configured with --with-runtime-check and made from source code in github,

If libclntsh.so file works for any version of oracle connection, that might not be a problem, so I can always do export LD_LIBRARY_PATH=$(dirname find /u01 -name libclntsh.so|head -1), then I can connect any of my databases no matter 11/12g, say you have 11g and 12g installed on same box, which libclntsh.so you will use, doesn't matter, correct?

No.

You should set LD_LIBRARY_PATH=/u01/app/oracle/product/11.2.0/xe/lib when Oracle XE is installed.

libclntsh.so depends on libnnz11.so. (It depends on libnnz12.so when it is Oracle 12 client.)

$ readelf -d $ORACLE_HOME/lib/libclntsh.so
  ...
0x0000000000000001 (NEEDED) Shared library: [libnnz11.so]
  ...

According to ld.so document libnnz11.so is searched in the following order:

Assume the following case:

In case that LD_LIBRARY_PATH=/u01/app/oracle/product/11.2.0/xe/lib there are no problems.

In case that LD_LIBRARY_PATH=/u01/oracle/product/11.2.0.4/db_1/lib it may not work fine.

You should not use LD_LIBRARY_PATH=$(dirname `find /u01 -name libclntsh.so|head -1`) because it may choose /u01/oracle/product/11.2.0.4/db_1/lib.

Oracle installer set RPATH to libclntsh.so when the Oracle is standard edition or enterprise edition now. But if Oracle installer set RUNPATH instead of RPATH in future, this won't work because LD_LIBRARY_PATH is checked before RUNPATH. /etc/ld.so.cache should be set in that case.

jliang888 commented 6 years ago

Kubo, You mean follow this to get latest version? $ git clone https://github.com/kubo/ruby-oci8.git (or wget https://dl.bintray.com/kubo/generic/ruby-oci8-2.2.4.1.tar.gz which one I should use?) $ cd ruby-oci8

export LD_LIBRARY_PATH=... <- this is not needed at all

$ ruby setup.rb config -- --with-runtime-check $ make $ gem build ruby-oci8.gemspec -- current So, according to your explanation, oracle standard edition installation, the RPATH is always set, so I don't need LD_LIBRARY_PATH at all, I can set ORACLE_HOME inside of my ruby script, and oci8 should be able to find the right path and works, correct? Thanks.

kubo commented 6 years ago

You mean follow this to get latest version? $ git clone https://github.com/kubo/ruby-oci8.git (or wget https://dl.bintray.com/kubo/generic/ruby-oci8-2.2.4.1.tar.gz which one I should use?)

git clone https://github.com/kubo/ruby-oci8.git or git pull if you have cloned it already.

export LD_LIBRARY_PATH=... <- this is not needed at all

This is needed at compilation in any Oracle edition. This isn't needed at runtime when the Oracle is standard edition or enterprise edition.

So, according to your explanation, oracle standard edition installation, the RPATH is always set, so I don't need LD_LIBRARY_PATH at all, I can set ORACLE_HOME inside of my ruby script, and oci8 should be able to find the right path and works, correct?

Yes.

jliang888 commented 6 years ago

Thank you very much, I will get feedback to you after we get latest versions build and play with it.

export LD_LIBRARY_PATH=... <- this is not needed at all

This is needed at compilation in any Oracle edition. This isn't needed at runtime when the Oracle is standard edition or enterprise edition.

But this seems doesn't make much sense to me, I build it on one box, and distribute the gem via network, the LD_LIBRARY_PATH on this box is invalid on the other box, why I need it to compile?

kubo commented 6 years ago

Sorry, it isn't correct but by different reason. LD_LIBRARY_PATH is needed at compilation only for instant clients. It isn't for standard, enterprise and express edition.

But this seems doesn't make much sense to me, I build it on one box, and distribute the gem via network, the LD_LIBRARY_PATH on this box is invalid on the other box, why I need it to compile?

If LD_LIBRARY_PATH at compilation was stored to compiled binary oci8lib_xxx.so, the binary would have invalid LD_LIBRARY_PATH at runtime. But it isn't. LD_LIBRARY_PATH at compilation is independent of that at runtime.

jliang888 commented 6 years ago

Sorry, I get confuse a bit again, I don't use oracle instant clients at all. Do I need LD_LIBRARY_PATH at compilation? We only use standard/enterprise edition (full client). I remember that I can compile without set LD_LIBRARY_PATH.

Thanks.

jliang888 commented 6 years ago

LD_LIBRARY_PATH is needed at compilation only for instant clients. It isn't for standard, enterprise and express edition.

Oh, I don't need to set LD_LIBRARY_PATH if I don't use oracle instance client. Thanks.

jliang888 commented 6 years ago

Will this version have its own stock sha1 release tag? since we need reproducibility.

jliang888 commented 6 years ago

Does oci8 have property to set number of format: It outputs e format by default: ruby -r oci8 -e "OCI8.new('scott/tiger').exec('select count(1) from all_users') do |r| puts r.join(','); end" 0.14E2 I am expecting: 14

Thanks.

kubo commented 6 years ago

Will this version have its own stock sha1 release tag? since we need reproducibility.

$ git log -1

Does oci8 have property to set number of format:

Could you open a new issue when you post a question unrelated to this issue?

jliang888 commented 6 years ago

Thanks.

jliang888 commented 6 years ago

https://rubygems.org/gems/ruby-oci8/versions/2.2.2 and https://bintray.com/kubo/generic/ruby-oci8 are still stay June 17, 2017, does this means: commit 68affbad2f920a7bb9abab25e4ef3038cb2a414d (HEAD -> master, origin/master, origin/HEAD) Author: Kubo Takehiro kubo@jiubao.org Date: Wed Sep 27 21:29:55 2017 +0900

Change order to load libclntsh when runtime api check is enabled on Unix.

Is not an official release yet? Could I rely on it? Thanks.

kubo commented 6 years ago

I'll release ruby-oci8 2.2.5 in a few weeks to include a commit fixing #172. I'll not make a new release for each commit unless it fixes a critical issue. I think this isn't critical but #172 is so.

jliang888 commented 6 years ago

All right, I will keep eye on the next release, thank you.

kubo commented 6 years ago

@jliang888 FYI. Ruby-oci8 2.2.5 was released.