Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Perl Oracle DBD on Ubuntu?

Re: Perl Oracle DBD on Ubuntu?

From: Andy Hassall <andy_at_andyh.co.uk>
Date: Sat, 14 Oct 2006 20:02:39 +0100
Message-ID: <53b2j2hmngs68610kf6kbgrnue356sh4d8@4ax.com>


On Sat, 14 Oct 2006 17:26:20 +0000 (UTC), Stan Brown <stanb_at_panix.com> wrote:

>In <7s42j2he9u326jta8gog3b19jek8hl5e90_at_4ax.com> Andy Hassall <andy_at_andyh.co.uk> writes:
>
>>On Sat, 14 Oct 2006 15:42:55 +0000 (UTC), Stan Brown <stanb_at_panix.com> wrote:
>
>>>I need to get the perl DBD module working on a Ubuntu machine.
>>>
>
>I downloaded the following from CPAN DBD-Oracle-1.18 Installed the perl DBI
>from the Ubuntu packages, set the following environemtn variables:
>
>ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
>PATH=$PATH:/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin
>TWO_TASK=XE
>LD_LIBRARY_PATH=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib

 Good. You may also need ORACLE_USERID set further down the line so the tests can connect to a database - XE doesn't have the scott/tiger default login so you have to override it.

>Did a perl Makefile.PL, which did not look too happy, and trie make, which
>failed miserably. Here's the log of the session:
>
>Script started on Sat 14 Oct 2006 09:19:46 AM EDT
>root_at_phsepi2:/usr/local/src/pd/perl_modules/dbd-oracle/DBD-Oracle-1.18# perl Mak efile.PL

>Argument "6.30_01" isn't numeric in subroutine entry at Makefile.PL line 8
> main::BEGIN() called at /usr/share/perl/5.8/ExtUtils/MakeMaker.pm line 8
> eval {...} called at /usr/share/perl/5.8/ExtUtils/MakeMaker.pm line 8

 Hopefully harmless, and probably resolvable by upgrading ExtUtils::MakeMaker to the latest version which has a more "normal" version number (6.31).

>Using DBI 1.51 (for perl 5.008008 on i486-linux-gnu-thread-multi) installed in /usr/lib/perl5/auto/DBI/
>Argument "6.30_01" isn't numeric in numeric ge (>=) at Makefile.PL line 59.
>
>Configuring DBD::Oracle for perl 5.008008 on linux (i486-linux-gnu-thread-multi)
>
>Remember to actually *READ* the README file! Especially if you have any problems.
>
>Using Oracle in /usr/lib/oracle/xe/app/oracle/product/10.2.0/server
>DEFINE _SQLPLUS_RELEASE = "1002000100" (CHAR)
>Oracle version 10.2.0.1 (10.2)
>Found /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/rdbms/demo/demo_xe.mk
>Using /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/rdbms/demo/demo_xe.mk
>Looks like Oracle XE (/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/rdbms/demo/demo_xe.mk)
>Reading /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/rdbms/demo/demo_xe.mk
>Your LD_LIBRARY_PATH env var is set to '/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib'

 This is good, it's picking up paths and files as expected.

>Checking for functioning wait.ph
>Constant subroutine __USE_POSIX undefined at /usr/lib/perl/5.8/features.ph line 8.

 Not sure what causes this, but there's some hits on Google to do with Debian, and that they're not necessarily serious warnings.

>Warning: the following files are missing in your kit:
> META.yml
>Please inform the author.

 Harmless, and I believe the maintainer is including this file again in the next version.

>LD_RUN_PATH=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib
>Using DBD::Oracle 1.18.
>Using DBD::Oracle 1.18.
>Using DBI 1.51 (for perl 5.008008 on i486-linux-gnu-thread-multi) installed in /usr/lib/perl5/auto/DBI/
>Writing Makefile for DBD::Oracle
>
>*** If you have problems...
> read all the log printed above, and the README and README.help.txt files.
> (Of course, you have read README by now anyway, haven't you?)

 Despite the warnings, I think that's actually successful.

>root_at_phsepi2:/usr/local/src/pd/perl_modules/dbd-oracle/DBD-Oracle-1.18# make
>cp Oracle.pm blib/lib/DBD/Oracle.pm
>cp mkta.pl blib/lib/DBD/mkta.pl
>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 mk.pm blib/arch/auto/DBD/Oracle/mk.pm
>cp lib/DBD/Oracle/GetInfo.pm blib/lib/DBD/Oracle/GetInfo.pm
>/usr/bin/perl -p -e "s/~DRIVER~/Oracle/g" /usr/lib/perl5/auto/DBI/Driver.xst > Oracle.xsi
>/usr/bin/perl /usr/share/perl/5.8/ExtUtils/xsubpp -typemap /usr/share/perl/5.8/ExtUtils/typemap -typemap typemap Oracle.xs > Oracle.xsc && mv Oracle.xsc Oracle.c
>cc -c -I/usr/lib/perl5/auto/DBI -I/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/rdbms/public/ -DLINUX -D_GNU_SOURCE -D_REENTRANT -g -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBIAN -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -DVERSION=\"1.18\" -DXS_VERSION=\"1.18\" -fPIC "-I/usr/lib/perl/5.8/CORE" -Wall -Wno-comment -DUTF8_SUPPORT -DNEW_OCI_INIT -DORA_OCI_VERSION=\"10.2.0.1\" Oracle.c
>In file included from /usr/lib/perl5/auto/DBI/DBIXS.h:19,
> from Oracle.h:13,
> from Oracle.xs:1:
>/usr/lib/perl/5.8/CORE/perl.h:420:24: error: sys/types.h: No such file or directory
>/usr/lib/perl/5.8/CORE/perl.h:451:19: error: ctype.h: No such file or directory
>/usr/lib/perl/5.8/CORE/perl.h:463:23: error: locale.h: No such file or directory
>/usr/lib/perl/5.8/CORE/perl.h:480:20: error: setjmp.h: No such file or directory

 Compiler can't find various core include files. The rest probably stems from this. Does /usr/include/sys/types.h exist on your system? Have you been able to compile any other modules or applications from source on this machine?

-- 
Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Received on Sat Oct 14 2006 - 14:02:39 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US