From: shiwei zhang Date: 2006-11-08T17:50:09+09:00 Subject: Re: ruby-oci8 install problem. Oracle instant client + os x + rails ------=_Part_21836_26075299.1162975806896 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi, Keeny, I have no OS X environment, I just have Linux environment. But for now, I still have one thing to hint you: It seems that you had not set env variable $LD_LIBRARY_PATH or $DYLD_LIBRARY_PATH before you ran "ruby setup.rb config -- --with-instant-client=/opt > > /oracle/instantclient10_1/". I think this might be the cause. So if you > had not, pls do set the env variable and have a try again. > Rgds, Shiwei On 11/8/06, keenytn1@hotmail.com wrote: > > Hi all, > > Perhaps some of you may be able to shed some light on the following. I > have oracle express installed on a window machine. I have installed > oracle instant client on my macbook and can connect with sqlplus and > via > a browser no problem. > > So far so good. > > Now I want to install OCI8 driver to use oracle with rails. I run the > following command: > > > ruby setup.rb config -- > --with-instant-client=/opt/oracle/instantclient10_1/ > > But it halts at this point: > > > checking for gcc... no > > checking for LP64... no > > checking for ruby header... ok > > checking for OCIInitialize()... No > > I have no idea what's going on here. I have attached some logs & error > messages below (apologies for length of this post). Perhaps someone can > point me in the right direction? > > Many Thanks, > > Barry. > > > > > -------------------------------------------- > error message from command > -------------------------------------------- > checking for gcc... no > > checking for LP64... no > > checking for ruby header... ok > > checking for OCIInitialize()... no > > --------------- common error message -------------- > > If you use Oracle instant client, try with --with-instant-client. > > > > zip package: > > ruby setup.rb config -- > --with-instant-client=/path/to/instantclient10_1 > > > > rpm package: > > ruby setup.rb config -- --with-instant-client > > > > The latest version of oraconf.rb may solve the problem. > > > > http://rubyforge.org/cgi-bin/viewcvs.cgi/ruby-oci8/ext/oci8/oraconf.rb?cvsroot=ruby-oci8&only_with_tag=MAIN > > > > If it could not be solved, send the following information to > kubo@jiubao.org. > > > > * error messages except 'common error message'. > > * last 100 lines of 'ext/oci8/mkmf.log'. > > * results of the following commands: > > ruby --version > > ruby -r rbconfig -e "p Config::CONFIG['host']" > > ruby -r rbconfig -e "p Config::CONFIG['CC']" > > ruby -r rbconfig -e "p Config::CONFIG['CFLAGS']" > > ruby -r rbconfig -e "p Config::CONFIG['LDSHARED']" > > ruby -r rbconfig -e "p Config::CONFIG['LDFLAGS']" > > ruby -r rbconfig -e "p Config::CONFIG['DLDFLAGS']" > > ruby -r rbconfig -e "p Config::CONFIG['LIBS']" > > ruby -r rbconfig -e "p Config::CONFIG['GNU_LD']" > > * if you use gcc: > > gcc --print-prog-name=ld > > gcc --print-prog-name=as > > * on platforms which can use both 32bit/64bit binaries: > > file $ORACLE_HOME/bin/oracle > > file `which ruby` > > echo $LD_LIBRARY_PATH > > echo $LIBPATH # AIX > > echo $SHLIB_PATH # HP-UX > > ------------------ error message ------------------ > > Could not compile with Oracle instant client. > > You may need to set a environment variable: > > DYLD_LIBRARY_PATH=/opt/oracle/instantclient10_1/ > > export DYLD_LIBRARY_PATH > > > > -------------------------------------------- > mkmf.log > -------------------------------------------- > "gcc -c -I. -I/usr/local/lib/ruby/1.8/i686-darwin8.6.2 -g -O2 -pipe > -fno-common conftest.c" > gcc: installation problem, cannot exec `cc1': No such file or directory > checked program was: > /* begin */ > /*top*/ > #ifndef __GNUC__ > # error > >>>>>> __GNUC__ undefined <<<<<< > #endif > /* end */ > > "gcc -o conftest -I. -I/usr/local/lib/ruby/1.8/i686-darwin8.6.2 -g -O2 > -pipe -fno-common conftest.c -L"/usr/local/lib" -lruby-static > -lpthread -ldl -lobjc " > gcc: installation problem, cannot exec `cc1': No such file or directory > checked program was: > /* begin */ > int main() { return sizeof(long) == 8 ? 0 : 1; } > /* end */ > > have_func: checking for OCIInitialize()... -------------------- no > > "gcc -o conftest -I. -I/usr/local/lib/ruby/1.8/i686-darwin8.6.2 -g -O2 > -pipe -fno-common -I/opt/oracle/instantclient10_1//sdk/include > conftest.c -L"/usr/local/lib" -L/usr/local/lib > -L/opt/oracle/instantclient10_1/ -lclntsh -lruby-static > -L/usr/local/lib -L/opt/oracle/instantclient10_1/ -lclntsh -lpthread > -ldl -lobjc " > gcc: installation problem, cannot exec `cc1': No such file or directory > checked program was: > /* begin */ > #include > > /*top*/ > int main() { return 0; } > int t() { OCIInitialize(); return 0; } > /* end */ > > "gcc -o conftest -I. -I/usr/local/lib/ruby/1.8/i686-darwin8.6.2 -g -O2 > -pipe -fno-common -I/opt/oracle/instantclient10_1//sdk/include > conftest.c -L"/usr/local/lib" -L/usr/local/lib > -L/opt/oracle/instantclient10_1/ -lclntsh -lruby-static > -L/usr/local/lib -L/opt/oracle/instantclient10_1/ -lclntsh -lpthread > -ldl -lobjc " > gcc: installation problem, cannot exec `cc1': No such file or directory > checked program was: > /* begin */ > > #include > > /*top*/ > int main() { return 0; } > int t() { void ((*volatile p)()); p = (void ((*)()))OCIInitialize; > return 0; } > /* end */ > > > > > -------------------------------------------- > Flags > -------------------------------------------- > Last login: Tue Nov 7 11:43:39 on ttyp4 > > Welcome to Darwin! > > io:~ keeny$ ruby --version > > ruby 1.8.4 (2005-12-24) [i686-darwin8.6.2] > > io:~ keeny$ ruby -r rbconfig -e "p Config::CONFIG['host']" > > "i686-apple-darwin8.6.2" > > io:~ keeny$ ruby -r rbconfig -e "p Config::CONFIG['CC']" > > "gcc" > > io:~ keeny$ ruby -r rbconfig -e "p Config::CONFIG['CFLAGS']" > > "-g -O2 -pipe -fno-common" > > io:~ keeny$ ruby -r rbconfig -e "p Config::CONFIG['LDSHARED']" > > "cc -dynamic -bundle -undefined suppress -flat_namespace" > > io:~ keeny$ ruby -r rbconfig -e "p Config::CONFIG['LDFLAGS']" > > "" > > io:~ keeny$ ruby -r rbconfig -e "p Config::CONFIG['DLDFLAGS']" > > "" > > io:~ keeny$ ruby -r rbconfig -e "p Config::CONFIG['LIBS']" > > "-lpthread -ldl -lobjc " > > io:~ keeny$ ruby -r rbconfig -e "p Config::CONFIG['GNU_LD']" > > "no" > > io:~ keeny$ GCC --print-prog-name=ld > > ld > > io:~ keeny$ GCC --print-prog-name=as > > /usr/libexec/gcc/darwin/i386/as > > io:~ keeny$ file `which ruby` > > /usr/local/bin/ruby: Mach-O executable i386 > > io:~ keeny$ echo $LD_LIBRARY_PATH > > /opt/oracle/instantclient10_1 > > io:~ keeny$ echo $LIBPATH > > > > io:~ keeny$ > > > ------=_Part_21836_26075299.1162975806896--