Following 846325, I am attempting to install DBI and DBD::Oracle under a newer version of Perl. DBI was successful. For DBD::Oracle, I:

  1. Exported my $ORACLE_HOME and added $ORACLE_HOME/lib to $LD_LIBRARY_PATH.
  2. Added use lib '/home/hbm/perllib/DBI' to Makefile.PL.
  3. Ran perl Makefile.PL LIB=/home/hbm/perllib -m $ORACLE_HOME/rdbms/demo/demo_rdbms.mk, and got "kit… looks good".
  4. Ran make and got:
    cp Oracle.pm blib/lib/DBD/Oracle.pm cp oraperl.ph blib/lib/oraperl.ph cp dbdimp.h blib/arch/auto/DBD/Oracle/dbdimp.h cp ocitrace.h blib/arch/auto/DBD/Oracle/ocitrace.h cp Oraperl.pm blib/lib/Oraperl.pm cp Oracle.h blib/arch/auto/DBD/Oracle/Oracle.h cp lib/DBD/Oracle/Object.pm blib/lib/DBD/Oracle/Object.pm cp mk.pm blib/arch/auto/DBD/Oracle/mk.pm cp lib/DBD/Oracle/GetInfo.pm blib/lib/DBD/Oracle/GetInfo.pm /usr/bin/perl/bin/perl -p -e "s/~DRIVER~/Oracle/g" /home/hbm/perllib/s +un4-solaris/auto/DBI/Driver.xst > Oracle.xsi /usr/bin/perl/bin/perl /usr/bin/perl/lib/5.8.3/ExtUtils/xsubpp -typem +ap /usr/bin/perl/lib/5.8.3/ExtUtils/typemap -typemap typemap Oracle. +xs > Oracle.xsc && mv Oracle.xsc Oracle.c gcc -B/usr/ccs/bin/ -c -I/orahome/rdbms/public -I/orahome/rdbms/demo +-I/orahome/rdbms/demo -I/orahome/rdbms/public -I/orahome/plsql/public + -I/orahome/network/public -I/home/hbm/perllib/sun4-solaris/auto/DBI +-fno-strict-aliasing -I/usr/local/include -I/opt/local/include -D_LAR +GEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O -DVERSION=\"1.24\" -DXS_VER +SION=\"1.24\" -fPIC "-I/usr/bin/perl/lib/5.8.3/sun4-solaris/CORE" -W +all -Wno-comment -DUTF8_SUPPORT -DORA_OCI_VERSION=\"8.1.7.0\" -DUSE_O +RA_OCI_STMNT_FETCH Oracle.c cc1: Invalid option '-fno-strict-aliasing' In file included from Oracle.xs:1: Oracle.h:135: parse error before 'OCIXMLType' Oracle.xs: In function 'XS_DBD__Oracle__db_ora_lob_append': Oracle.xs:358: warning: unused variable `startp' Oracle.c: In function 'boot_DBD__Oracle': Oracle.c:1845: 'OCI_FETCH_CURRENT' undeclared (first use this function +) Oracle.c:1845: (Each undeclared identifier is reported only once Oracle.c:1845: for each function it appears in.) gcc: file path prefix '/usr/ccs/bin/' never used make: *** [Oracle.o] Error 1
  5. I commented out -fno-strict-aliasing from Makefile, but that didn’t get me further.

Node 765053 was promising, but my line of Oracle.h looks fine (I think?):

sword OCIXMLTypeCreateFromSrc( OCISvcCtx *svchp, OCIError *errhp, OCIDuration dur, ub1 src_type, dvoid *src_ptr, sb4 ind, OCIXMLType **retInstance );

Any advice? Thanks.

 

Update:

Thank you almut and mje! I didn't confirm your theories individually, but I believe you were both correct. I started over with DBD::Oracle v1.17 and put a newer version of gcc in my PATH. Those changes got me past make.

  1. Then make test failed, unable to find DBI.
  2. I added use lib qw(/home/hbm/perllib/DBI) to t/*.
  3. That improved things, but one test failed, "ld.so.1: perl: fatal: libmm.so.12".
  4. Per 598996, I ran ldd -s blib/arch/auto/DBD/Oracle/Oracle.so. (Thanks again, almut!)
  5. I located libmm.so.12 and added its path to LD_LIBRARY_PATH.
  6. Almost there, I exported ORACLE_USERID="myuser/pass" and ORACLE_SID="mysid".
  7. All tests passed; it installed; and no more segmentation fault!

In reply to DBD::Oracle install errors by hbm

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.