Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > ruby-oci8 install problem. Oracle instant client + os x + rails

Reply
Thread Tools

ruby-oci8 install problem. Oracle instant client + os x + rails

 
 
keenytn1@hotmail.com
Guest
Posts: n/a
 
      11-07-2006
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..._with_tag=MAIN



If it could not be solved, send the following information to
http://www.velocityreviews.com/forums/(E-Mail Removed).



* 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 <oci.h>

/*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 <oci.h>

/*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$

 
Reply With Quote
 
 
 
 
Wilson Bilkovich
Guest
Posts: n/a
 
      11-07-2006
On 11/7/06, (E-Mail Removed) <(E-Mail Removed)> 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:


For reasons known only to themselves, Oracle has yet to release an
Instant Client built for the new Intel Macs. One 'fix' (which I
hesitate even to mention) is to build both the client and Ruby itself
for PowerPC. That way OS X will run them under the 'Rosetta' emulation
layer.

A better fix would be opening an Oracle ticket to get them to release
Intel-compatible libraries for the Mac. It's really irritating,
because Ruby works great with Oracle.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
cx_Oracle 5.0.4 + Python 3.1.2 + Oracle Instant Client 10.2.04; DLLLoad failed on import (Win/NT) tormod Python 3 08-13-2010 07:14 PM
install_driver(Oracle) failed: Can't load 'C:/Perl/site/lib/auto/DBD/Oracle/Oracle.dll' for module DBD::Oracle: load_file:The specified procedure could not be found at C:/Perl/lib/DynaLoader.pm line 230. Feyruz Perl Misc 4 10-14-2005 06:47 PM
Exception thrown while accessing Oracle through oracle client =?Utf-8?B?TmVv?= ASP .Net 2 07-12-2005 06:59 PM
rails: gem install rails is bombing J. D. Ruby 9 11-04-2004 06:05 PM
Oracle adapter don't work with Oracle 10.1.0.2 v. Client vaidas gudas ASP .Net 1 10-11-2004 01:11 PM



Advertisments