Forums | Admin

Discussion Forums: help

Start New Thread Start New Thread

 

By: Jeffrey Damick
RE: Mac OS X 10.6.3 with Oracle full 10.2.0.4 err [ reply ]  
2010-12-09 18:48
In case anyone else finds this thread..

You can also change the arch temporarily without modifying the rbconfig.rb like this:

sudo ORACLE_HOME=$ORACLE_HOME DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH ARCHFLAGS="-arch x86_64" gem install ruby-oci8 -- --with-instant-client

This worked for me.


By: Robert Dewitt
RE: Mac OS X 10.6.3 with Oracle full 10.2.0.4 err [ reply ]  
2010-10-04 19:25
I had the exact same issue and doing the following steps worked for me:

Changed the following line in /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin10.0/rbconfig.rb from this:
'-arch i386 -arch x86_64'

to this:
'-arch x86_64'


Then ran this:
sudo env ORACLE_HOME=$ORACLE_HOME /usr/bin/env DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH /usr/bin/env DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH /usr/bin/gem install ruby-oci8-2.0.4

Thanks for the solution.

By: Kubo Takehiro
RE: Mac OS X 10.6.3 with Oracle full 10.2.0.4 err [ reply ]  
2010-05-04 01:31
Is there no error message such as "Undefined symbols for architecture i386" in the mkmf.log?
Could you send /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin10.0/rbconfig.rb to kubo@jiubao.org? />
Anyway, it may be fixed by setting an environment variable RC_ARCHS=x86_64.
If it doesn't help you, delete all "-arch i386" from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin10.0/rbconfig.rb.

By: Eric Peterson
Mac OS X 10.6.3 with Oracle full 10.2.0.4 err [ reply ]  
2010-05-03 16:52
— —————————————————
— Downloaded and attempting a make
— sqlplus works fine
— LD_LIBRARY_PATH is not set, but I tried setting it to DYLD_LIBRARY_PATH and still get the same errors
— —————————————————
>make
ruby -w setup.rb config
---> lib
---> lib/dbd
<--- lib/dbd
---> lib/oci8
<--- lib/oci8
<--- lib
---> ext
---> ext/oci8
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby /Users/ericdp/test/ruby/ruby-oci8-2.0.4/ext/oci8/extconf.rb
checking for load library path...
DYLD_LIBRARY_PATH...
checking /Users/ericdp/oracle/product/10.2.0/Mac10gR2/lib... yes
/Users/ericdp/oracle/product/10.2.0/Mac10gR2/lib/libclntsh.dylib.10.1 looks like a full client.
checking for cc... ok
checking for gcc... yes
checking for LP64... yes
checking for ruby header... ok
Get the version of Oracle from SQL*Plus... 1020
try -I/Users/ericdp/oracle/product/10.2.0/Mac10gR2/rdbms/public
checking for oci.h... yes
checking for OCIInitialize() in oci.h... no
Running make for $ORACLE_HOME/rdbms/demo/demo_rdbms.mk (build) ...OK
checking for OCIInitialize() in oci.h... no
---------------------------------------------------
Error Message:
cannot compile OCI
Backtrace:
/Users/ericdp/test/ruby/ruby-oci8-2.0.4/ext/oci8/oraconf.rb:729:in `initialize'
/Users/ericdp/test/ruby/ruby-oci8-2.0.4/ext/oci8/oraconf.rb:345:in `new'
/Users/ericdp/test/ruby/ruby-oci8-2.0.4/ext/oci8/oraconf.rb:345:in `get'
/Users/ericdp/test/ruby/ruby-oci8-2.0.4/ext/oci8/extconf.rb:18
---------------------------------------------------
See:
* http://ruby-oci8.rubyforge.org/en/HowToInstall.html
* http://ruby-oci8.rubyforge.org/en/ReportInstallProblem.html

*** /Users/ericdp/test/ruby/ruby-oci8-2.0.4/ext/oci8/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=/Users/ericdp/test/ruby/ruby-oci8-2.0.4/ext/oci8
--curdir
--ruby=/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
--with-instant-client
--without-instant-client
/Users/ericdp/test/ruby/ruby-oci8-2.0.4/ext/oci8/oraconf.rb:729:in `initialize': RuntimeError (RuntimeError)
from /Users/ericdp/test/ruby/ruby-oci8-2.0.4/ext/oci8/oraconf.rb:345:in `new'
from /Users/ericdp/test/ruby/ruby-oci8-2.0.4/ext/oci8/oraconf.rb:345:in `get'
from /Users/ericdp/test/ruby/ruby-oci8-2.0.4/ext/oci8/extconf.rb:18
'system /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby /Users/ericdp/test/ruby/ruby-oci8-2.0.4/ext/oci8/extconf.rb ' failed
Try 'ruby setup.rb --help' for detailed usage.
make: *** [config.save] Error 1




— —————————————————
— From the ruby-oci8 web site it mentioned adding the following:
— —————————————————

ericdp@EricPeterson-MacBook.local:/Users/ericdp/test/ruby/ruby-oci8-2.0.4
>tail -100 ext/oci8/mkmf.log
"gcc -o conftest -I. -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin10.0 -I/Users/ericdp/test/ruby/ruby-oci8-2.0.4/ext/oci8 -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -arch i386 -arch x86_64 -g -Os -pipe -fno-common -DENABLE_DTRACE -fno-common -pipe -fno-common conftest.c -L. -L/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib -L. -arch i386 -arch x86_64 -lruby -lpthread -ldl "
checked program was:
/* begin */
1: int main() { return 0; }
/* end */

./conftest
"gcc -I. -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin10.0 -I/Users/ericdp/test/ruby/ruby-oci8-2.0.4/ext/oci8 -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -arch i386 -arch x86_64 -g -Os -pipe -fno-common -DENABLE_DTRACE -fno-common -pipe -fno-common -c conftest.c"
checked program was:
/* begin */
1: /*top*/
2: #ifndef __GNUC__
3: # error
4: >>>>>> __GNUC__ undefined <<<<<<
5: #endif
/* end */

"gcc -o conftest -I. -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin10.0 -I/Users/ericdp/test/ruby/ruby-oci8-2.0.4/ext/oci8 -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -arch i386 -arch x86_64 -g -Os -pipe -fno-common -DENABLE_DTRACE -fno-common -pipe -fno-common conftest.c -L. -L/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib -L. -arch i386 -arch x86_64 -lruby -lpthread -ldl "
checked program was:
/* begin */
1: int main() { return sizeof(long) == 8 ? 0 : 1; }
/* end */

./conftest


> ruby --version
ruby 1.8.7 (2009-06-08 patchlevel 173) [universal-darwin10.0]

> ruby -r rbconfig -e "p Config::CONFIG['host']"
"i686-apple-darwin10.0"

> ruby -r rbconfig -e "p Config::CONFIG['CC']"
"gcc"

> ruby -r rbconfig -e "p Config::CONFIG['CFLAGS']"
"-arch i386 -arch x86_64 -g -Os -pipe -fno-common -DENABLE_DTRACE -fno-common -pipe -fno-common "

> ruby -r rbconfig -e "p Config::CONFIG['LDSHARED']"
"cc -arch i386 -arch x86_64 -pipe -bundle -undefined dynamic_lookup"

> ruby -r rbconfig -e "p Config::CONFIG['LDFLAGS']"
"-L. -arch i386 -arch x86_64 "

> ruby -r rbconfig -e "p Config::CONFIG['DLDLAGS']"
nil

> ruby -r rbconfig -e "p Config::CONFIG['LIBS']"
"-lpthread -ldl "

> ruby -r rbconfig -e "p Config::CONFIG['GNU_LD']"
"no"

> gcc --print-prog-name=ld
/usr/libexec/gcc/i686-apple-darwin10/4.2.1/ld

> gcc --print-prog-name=as
/usr/libexec/gcc/i686-apple-darwin10/4.2.1/as

> file `which ruby`
/usr/bin/ruby: Mach-O universal binary with 3 architectures
/usr/bin/ruby (for architecture x86_64): Mach-O 64-bit executable x86_64
/usr/bin/ruby (for architecture i386): Mach-O executable i386
/usr/bin/ruby (for architecture ppc7400): Mach-O executable ppc

> file $ORACLE_HOME/bin/oracle # Full Client
/Users/ericdp/oracle/product/10.2.0/Mac10gR2/bin/oracle: setuid setgid Mach-O 64-bit executable x86_64

> file INSTANT_CLIENT_DIRECTORY/libclntsh.* # Instant Client
INSTANT_CLIENT_DIRECTORY/libclntsh.*: cannot open `INSTANT_CLIENT_DIRECTORY/libclntsh.*' (No such file or directory)

> echo $LD_LIBRARY_PATH

> echo $DYLD_LIBRARY_PATH # Mac OS X
/Users/ericdp/oracle/product/10.2.0/Mac10gR2/lib:/Users/ericdp/oracle/product/10.2.0/Mac10gR2/rdbms/lib:.: