current directory: /Users/admin/.rbenv/versions/1.9.3-p550/lib/ruby/gems/1.9.1/gems/ruby-oci8-2.2.1/ext/oci8
/Users/admin/.rbenv/versions/1.9.3-p550/bin/ruby -r ./siteconf20160331-19444-18x4baq.rb extconf.rb
checking for load library path...
* extconf.rb failed *
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/Users/admin/.rbenv/versions/1.9.3-p550/bin/ruby
--with-instant-client
--without-instant-client
/Users/admin/.rbenv/versions/1.9.3-p550/lib/ruby/gems/1.9.1/gems/ruby-oci8-2.2.1/ext/oci8/oraconf.rb:578:in check_ic_dir': RuntimeError (RuntimeError) from /Users/admin/.rbenv/versions/1.9.3-p550/lib/ruby/gems/1.9.1/gems/ruby-oci8-2.2.1/ext/oci8/oraconf.rb:316:inget'
from extconf.rb:22:in `'
DYLD_LIBRARY_PATH is not set.
checking DYLD_FALLBACK_LIBRARY_PATH...
checking /Users/admin/lib... no
checking /usr/local/lib... no
checking /lib... no
checking /usr/lib... no
checking OCI_DIR...
Error Message:
Set the environment variable DYLD_LIBRARY_PATH, DYLD_FALLBACK_LIBRARY_PATH or
OCI_DIR to point to the Instant client directory.
If DYLD_LIBRARY_PATH or DYLD_FALLBACK_LIBRARY_PATH is set, the environment
variable must be set at runtime also.
If OCI_DIR is set, dependent shared library paths are checked. If the checking
is passed, ruby-oci8 works without DYLD_LIBRARY_PATH or DYLD_FALLBACK_LIBRARY_PATH.
Note: OCIDIR should be absolute path.
Note: DYLD* environment variables are unavailable for security reasons on OS X 10.11 El Capitan.
dmins-MacBook-Pro-2:ruby-oci8-2.2.1 admin$ tail -100 ext/oci8/mkmf.log
tail: ext/oci8/mkmf.log: No such file or directory
admins-MacBook-Pro-2:ruby-oci8-2.2.1 admin$ tail -100 mkmf.log
/* end */
Hi I am following http://www.rubydoc.info/github/kubo/ruby-oci8/file/docs/install-on-osx.md to install ruby-oci8 gem.
I am getting this error in my console.
current directory: /Users/admin/.rbenv/versions/1.9.3-p550/lib/ruby/gems/1.9.1/gems/ruby-oci8-2.2.1/ext/oci8 /Users/admin/.rbenv/versions/1.9.3-p550/bin/ruby -r ./siteconf20160331-19444-18x4baq.rb extconf.rb checking for load library path... * extconf.rb failed * Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options.
Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=/Users/admin/.rbenv/versions/1.9.3-p550/bin/ruby --with-instant-client --without-instant-client /Users/admin/.rbenv/versions/1.9.3-p550/lib/ruby/gems/1.9.1/gems/ruby-oci8-2.2.1/ext/oci8/oraconf.rb:578:in'
DYLD_LIBRARY_PATH is not set.
checking DYLD_FALLBACK_LIBRARY_PATH...
checking /Users/admin/lib... no
checking /usr/local/lib... no
checking /lib... no
checking /usr/lib... no
check_ic_dir': RuntimeError (RuntimeError) from /Users/admin/.rbenv/versions/1.9.3-p550/lib/ruby/gems/1.9.1/gems/ruby-oci8-2.2.1/ext/oci8/oraconf.rb:316:in
get' from extconf.rb:22:in `checking OCI_DIR...
Error Message: Set the environment variable DYLD_LIBRARY_PATH, DYLD_FALLBACK_LIBRARY_PATH or OCI_DIR to point to the Instant client directory.
If DYLD_LIBRARY_PATH or DYLD_FALLBACK_LIBRARY_PATH is set, the environment variable must be set at runtime also.
If OCI_DIR is set, dependent shared library paths are checked. If the checking is passed, ruby-oci8 works without DYLD_LIBRARY_PATH or DYLD_FALLBACK_LIBRARY_PATH.
Note: OCIDIR should be absolute path. Note: DYLD* environment variables are unavailable for security reasons on OS X 10.11 El Capitan.
Backtrace: /Users/admin/.rbenv/versions/1.9.3-p550/lib/ruby/gems/1.9.1/gems/ruby-oci8-2.2.1/ext/oci8/oraconf.rb:578:in
check_ic_dir' /Users/admin/.rbenv/versions/1.9.3-p550/lib/ruby/gems/1.9.1/gems/ruby-oci8-2.2.1/ext/oci8/oraconf.rb:316:in
get'extconf.rb:22:in `'
See:
extconf failed, exit code 1
# mkmf.log file \ tail -100 /ruby-oci8-2.2.1/mkmf.log**
dmins-MacBook-Pro-2:ruby-oci8-2.2.1 admin$ tail -100 ext/oci8/mkmf.log tail: ext/oci8/mkmf.log: No such file or directory admins-MacBook-Pro-2:ruby-oci8-2.2.1 admin$ tail -100 mkmf.log /* end */
"clang -o conftest -I/Users/admin/.rbenv/versions/1.9.3-p550/include/ruby-1.9.1/x86_64-darwin15.4.0 -I/Users/admin/.rbenv/versions/1.9.3-p550/include/ruby-1.9.1/ruby/backward -I/Users/admin/.rbenv/versions/1.9.3-p550/include/ruby-1.9.1 -I. -I/Users/admin/.rbenv/versions/1.9.3-p550/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -I/Users/admin/.rbenv/versions/1.9.3-p550/include -O3 -Wno-error=shorten-64-to-32 -pipe -I/opt/oracle/instantclient_11_2/sdk/include -Wall conftest.c -L. -L/Users/admin/.rbenv/versions/1.9.3-p550/lib -L. -L/Users/admin/.rbenv/versions/1.9.3-p550/lib -L/opt/oracle/instantclient_11_2 -Wl,-rpath,/opt/oracle/instantclient_11_2 -lclntsh -lruby-static -L/opt/oracle/instantclient_11_2 -Wl,-rpath,/opt/oracle/instantclient_11_2 -lclntsh -lpthread -ldl -lobjc " conftest.c:3:10: fatal error: 'ruby/thread.h' file not found
include <ruby/thread.h>
1 error generated. checked program was: /* begin _/ 1: #include "ruby.h" 2: 3: #include <ruby/thread.h> 4: 5: /top/ 6: int t() { rb_thread_call_without_gvl(); return 0; } 7: int main(int argc, char _argv) 8: { 9: if (argc > 1000000) { 10: printf("%p", &t); 11: } 12: 13: return 0; 14: } /* end /
have_func: checking for rb_sym2str() in ruby.h... -------------------- no
"clang -o conftest -I/Users/admin/.rbenv/versions/1.9.3-p550/include/ruby-1.9.1/x86_64-darwin15.4.0 -I/Users/admin/.rbenv/versions/1.9.3-p550/include/ruby-1.9.1/ruby/backward -I/Users/admin/.rbenv/versions/1.9.3-p550/include/ruby-1.9.1 -I. -I/Users/admin/.rbenv/versions/1.9.3-p550/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -I/Users/admin/.rbenv/versions/1.9.3-p550/include -O3 -Wno-error=shorten-64-to-32 -pipe -I/opt/oracle/instantclient_11_2/sdk/include -Wall conftest.c -L. -L/Users/admin/.rbenv/versions/1.9.3-p550/lib -L. -L/Users/admin/.rbenv/versions/1.9.3-p550/lib -L/opt/oracle/instantclient_11_2 -Wl,-rpath,/opt/oracle/instantclient_11_2 -lclntsh -lruby-static -L/opt/oracle/instantclient_11_2 -Wl,-rpath,/opt/oracle/instantclient_11_2 -lclntsh -lpthread -ldl -lobjc " conftest.c:6:53: error: use of undeclared identifier 'rb_sym2str' int t() { void ((volatile p)()); p = (void (()()))rbsym2str; return 0; } ^ 1 error generated. checked program was: /* begin / 1: #include "ruby.h" 2: 3: #include
4:
5: /top/
6: int t() { void ((volatile p)()); p = (void (()()))rb_sym2str; return 0; }
7: int main(int argc, char _argv)
8: {
9: if (argc > 1000000) {
10: printf("%p", &t);
11: }
12:
13: return 0;
14: }
/* end /
"clang -o conftest -I/Users/admin/.rbenv/versions/1.9.3-p550/include/ruby-1.9.1/x86_64-darwin15.4.0 -I/Users/admin/.rbenv/versions/1.9.3-p550/include/ruby-1.9.1/ruby/backward -I/Users/admin/.rbenv/versions/1.9.3-p550/include/ruby-1.9.1 -I. -I/Users/admin/.rbenv/versions/1.9.3-p550/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -I/Users/admin/.rbenv/versions/1.9.3-p550/include -O3 -Wno-error=shorten-64-to-32 -pipe -I/opt/oracle/instantclient_11_2/sdk/include -Wall conftest.c -L. -L/Users/admin/.rbenv/versions/1.9.3-p550/lib -L. -L/Users/admin/.rbenv/versions/1.9.3-p550/lib -L/opt/oracle/instantclient_11_2 -Wl,-rpath,/opt/oracle/instantclient_11_2 -lclntsh -lruby-static -L/opt/oracle/instantclient_11_2 -Wl,-rpath,/opt/oracle/instantclient_11_2 -lclntsh -lpthread -ldl -lobjc " conftest.c:6:11: warning: implicit declaration of function 'rb_sym2str' is invalid in C99 [-Wimplicit-function-declaration] int t() { rb_sym2str(); return 0; } ^ 1 warning generated. Undefined symbols for architecture x86_64: "_rb_sym2str", referenced from: _t in conftest-4635ba.o ld: symbol(s) not found for architecture x8664 clang: error: linker command failed with exit code 1 (use -v to see invocation) checked program was: /* begin / 1: #include "ruby.h" 2: 3: #include
4:
5: /top/
6: int t() { rb_sym2str(); return 0; }
7: int main(int argc, char _argv)
8: {
9: if (argc > 1000000) {
10: printf("%p", &t);
11: }
12:
13: return 0;
14: }
/* end /
"clang -I/Users/admin/.rbenv/versions/1.9.3-p550/include/ruby-1.9.1/x86_64-darwin15.4.0 -I/Users/admin/.rbenv/versions/1.9.3-p550/include/ruby-1.9.1/ruby/backward -I/Users/admin/.rbenv/versions/1.9.3-p550/include/ruby-1.9.1 -I. -I/Users/admin/.rbenv/versions/1.9.3-p550/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -I/Users/admin/.rbenv/versions/1.9.3-p550/include -O3 -Wno-error=shorten-64-to-32 -pipe -I/opt/oracle/instantclient_11_2/sdk/include -Wall -c ./plthookosx.c" extconf.h is: /* begin / 1: #ifndef EXTCONF_H 2: #define EXTCONF_H 3: #define HAVE_SYS_TYPES_H 1 4: #define HAVE_OCIENVCREATE 1 5: #define ORACLE_CLIENT_VERSION 0x0b200000 6: #define HAVE_LOCALTIME_R 1 7: #define HAVE_DLADDR 1 8: #define HAVE_RB_CLASS_SUPERCLASS 1 9: #define HAVE_PLTHOOK 1 10: #define Init_oci8lib Init_oci8lib_191 11: #define oci8lib oci8lib_191 12: #define OCI8LIBVERSION "2.2.1" 13: #endif / end */
admins-MacBook-Pro-2:ruby-oci8-2.2.1 admin$
file
which ruby
admins-MacBook-Pro-2:ruby-oci8-2.2.1 admin$ filewhich ruby
/Users/admin/.rbenv/shims/ruby: a bash script text executableruby --version admins-MacBook-Pro-2:ruby-oci8-2.2.1 admin$ ruby --version ruby 1.9.3p551 (2014-11-13 revision 48407) [x86_64-darwin15.3.0]
ruby -r RbConfig -e "p Config::CONFIG['host']" admins-MacBook-Pro-2:ruby-oci8-2.2.1 admin$ ruby -r RbConfig -e "p Config::CONFIG['host']" /Users/admin/.rbenv/versions/1.9.3-p551/lib/ruby/1.9.1/x86_64-darwin15.3.0/RbConfig.rb:9: warning: already initialized constant TOPDIR /Users/admin/.rbenv/versions/1.9.3-p551/lib/ruby/1.9.1/x86_64-darwin15.3.0/RbConfig.rb:11: warning: already initialized constant CONFIG /Users/admin/.rbenv/versions/1.9.3-p551/lib/ruby/1.9.1/x86_64-darwin15.3.0/RbConfig.rb:206: warning: already initialized constant MAKEFILE_CONFIG -e:1: Use RbConfig instead of obsolete and deprecated Config. "x86_64-apple-darwin15.3.0"
ruby -r RbConfig -e "p Config::CONFIG['CC']" admins-MacBook-Pro-2:ruby-oci8-2.2.1 admin$ ruby -r RbConfig -e "p Config::CONFIG['CC']" /Users/admin/.rbenv/versions/1.9.3-p551/lib/ruby/1.9.1/x86_64-darwin15.3.0/RbConfig.rb:9: warning: already initialized constant TOPDIR /Users/admin/.rbenv/versions/1.9.3-p551/lib/ruby/1.9.1/x86_64-darwin15.3.0/RbConfig.rb:11: warning: already initialized constant CONFIG /Users/admin/.rbenv/versions/1.9.3-p551/lib/ruby/1.9.1/x86_64-darwin15.3.0/RbConfig.rb:206: warning: already initialized constant MAKEFILE_CONFIG -e:1: Use RbConfig instead of obsolete and deprecated Config. "clang"
\ ruby -r RbConfig -e "p Config::CONFIG['CFLAGS']"** admins-MacBook-Pro-2:ruby-oci8-2.2.1 admin$ ruby -r RbConfig -e "p Config::CONFIG['CFLAGS']" /Users/admin/.rbenv/versions/1.9.3-p551/lib/ruby/1.9.1/x86_64-darwin15.3.0/RbConfig.rb:9: warning: already initialized constant TOPDIR /Users/admin/.rbenv/versions/1.9.3-p551/lib/ruby/1.9.1/x86_64-darwin15.3.0/RbConfig.rb:11: warning: already initialized constant CONFIG /Users/admin/.rbenv/versions/1.9.3-p551/lib/ruby/1.9.1/x86_64-darwin15.3.0/RbConfig.rb:206: warning: already initialized constant MAKEFILE_CONFIG -e:1: Use RbConfig instead of obsolete and deprecated Config. " -O3 -Wno-error=shorten-64-to-32 -pipe"
ruby -r RbConfig -e "p Config::CONFIG['LDSHARED']" admins-MacBook-Pro-2:ruby-oci8-2.2.1 admin$ ruby -r RbConfig -e "p Config::CONFIG['LDSHARED']" /Users/admin/.rbenv/versions/1.9.3-p551/lib/ruby/1.9.1/x86_64-darwin15.3.0/RbConfig.rb:9: warning: already initialized constant TOPDIR /Users/admin/.rbenv/versions/1.9.3-p551/lib/ruby/1.9.1/x86_64-darwin15.3.0/RbConfig.rb:11: warning: already initialized constant CONFIG /Users/admin/.rbenv/versions/1.9.3-p551/lib/ruby/1.9.1/x86_64-darwin15.3.0/RbConfig.rb:206: warning: already initialized constant MAKEFILE_CONFIG -e:1: Use RbConfig instead of obsolete and deprecated Config. "clang -dynamic -bundle"
ruby -r RbConfig -e "p Config::CONFIG['LDFLAGS']" admins-MacBook-Pro-2:ruby-oci8-2.2.1 admin$ ruby -r RbConfig -e "p Config::CONFIG['LDFLAGS']" /Users/admin/.rbenv/versions/1.9.3-p551/lib/ruby/1.9.1/x86_64-darwin15.3.0/RbConfig.rb:9: warning: already initialized constant TOPDIR /Users/admin/.rbenv/versions/1.9.3-p551/lib/ruby/1.9.1/x86_64-darwin15.3.0/RbConfig.rb:11: warning: already initialized constant CONFIG /Users/admin/.rbenv/versions/1.9.3-p551/lib/ruby/1.9.1/x86_64-darwin15.3.0/RbConfig.rb:206: warning: already initialized constant MAKEFILE_CONFIG -e:1: Use RbConfig instead of obsolete and deprecated Config. "-L. -L/Users/admin/.rbenv/versions/1.9.3-p551/lib "
ruby -r RbConfig -e "p Config::CONFIG['DLDLAGS']" admins-MacBook-Pro-2:ruby-oci8-2.2.1 admin$ ruby -r RbConfig -e "p Config::CONFIG['DLDLAGS']" /Users/admin/.rbenv/versions/1.9.3-p551/lib/ruby/1.9.1/x86_64-darwin15.3.0/RbConfig.rb:9: warning: already initialized constant TOPDIR /Users/admin/.rbenv/versions/1.9.3-p551/lib/ruby/1.9.1/x86_64-darwin15.3.0/RbConfig.rb:11: warning: already initialized constant CONFIG /Users/admin/.rbenv/versions/1.9.3-p551/lib/ruby/1.9.1/x86_64-darwin15.3.0/RbConfig.rb:206: warning: already initialized constant MAKEFILE_CONFIG -e:1: Use RbConfig instead of obsolete and deprecated Config. nil
ruby -r RbConfig -e "p Config::CONFIG['LIBS']" admins-MacBook-Pro-2:ruby-oci8-2.2.1 admin$ ruby -r RbConfig -e "p Config::CONFIG['LIBS']" /Users/admin/.rbenv/versions/1.9.3-p551/lib/ruby/1.9.1/x86_64-darwin15.3.0/RbConfig.rb:9: warning: already initialized constant TOPDIR /Users/admin/.rbenv/versions/1.9.3-p551/lib/ruby/1.9.1/x86_64-darwin15.3.0/RbConfig.rb:11: warning: already initialized constant CONFIG /Users/admin/.rbenv/versions/1.9.3-p551/lib/ruby/1.9.1/x86_64-darwin15.3.0/RbConfig.rb:206: warning: already initialized constant MAKEFILE_CONFIG -e:1: Use RbConfig instead of obsolete and deprecated Config. "-lpthread -ldl -lobjc"
\ ruby -r RbConfig -e "p Config::CONFIG['GNU_LD']"** admins-MacBook-Pro-2:ruby-oci8-2.2.1 admin$ ruby -r RbConfig -e "p Config::CONFIG['GNU_LD']" /Users/admin/.rbenv/versions/1.9.3-p551/lib/ruby/1.9.1/x86_64-darwin15.3.0/RbConfig.rb:9: warning: already initialized constant TOPDIR /Users/admin/.rbenv/versions/1.9.3-p551/lib/ruby/1.9.1/x86_64-darwin15.3.0/RbConfig.rb:11: warning: already initialized constant CONFIG /Users/admin/.rbenv/versions/1.9.3-p551/lib/ruby/1.9.1/x86_64-darwin15.3.0/RbConfig.rb:206: warning: already initialized constant MAKEFILE_CONFIG -e:1: Use RbConfig instead of obsolete and deprecated Config. "no"
\ # if you use gcc,** admins-MacBook-Pro-2:ruby-oci8-2.2.1 admin$ gcc --print-prog-name=ld /Library/Developer/CommandLineTools/usr/bin/ld admins-MacBook-Pro-2:ruby-oci8-2.2.1 admin$ gcc --print-prog-name=as /Library/Developer/CommandLineTools/usr/bin/as admins-MacBook-Pro-2:ruby-oci8-2.2.1 admin$
# Oracle Instant client. admins-MacBook-Pro-2:ruby-oci8-2.2.1 admin$ file /opt/oracle/instantclient_11_2/libclntsh.* /opt/oracle/instantclient_11_2/libclntsh.dylib: Mach-O 64-bit dynamically linked shared library x86_64 /opt/oracle/instantclient_11_2/libclntsh.dylib.11.1: Mach-O 64-bit dynamically linked shared library x86_64
Path Variables admins-MacBook-Pro-2:ruby-oci8-2.2.1 admin$ echo $DYLD_LIBRARY_PATH
admins-MacBook-Pro-2:ruby-oci8-2.2.1 admin$ echo $OCI_DIR /opt/oracle/instantclient_11_2 admins-MacBook-Pro-2:ruby-oci8-2.2.1 admin$