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

Discussion in 'Ruby' started by keenytn1@hotmail.com, Nov 7, 2006.

  1. Guest

    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/viewcv...aconf.rb?cvsroot=ruby-oci8&only_with_tag=MAIN



    If it could not be solved, send the following information to
    .



    * 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$
     
    , Nov 7, 2006
    #1
    1. Advertising

  2. On 11/7/06, <> 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.
     
    Wilson Bilkovich, Nov 7, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. tormod
    Replies:
    3
    Views:
    1,339
    Hans Mulder
    Aug 13, 2010
  2. Curt Hibbs
    Replies:
    0
    Views:
    100
    Curt Hibbs
    Feb 3, 2006
  3. Replies:
    1
    Views:
    130
    KUBO Takehiro
    Feb 14, 2006
  4. Dheeraj Gambhir
    Replies:
    0
    Views:
    142
    Dheeraj Gambhir
    Jul 27, 2009
  5. Feyruz
    Replies:
    4
    Views:
    2,186
    Sherm Pendley
    Oct 14, 2005
Loading...

Share This Page