On 07/11/11 17:56, John Scoles wrote:
> 

>> What am I doing wrong?
> 
> Most likely nothing:)

It turns out that I was doing something quite seriously wrong:(

The make file Oracle recommend for building OCI programs, such as
DBD::Oracle, is demo-rdbms.mk (or demo-rdms32.mk - see below). These
make files should be found in the directory $ORACLE_HOM/rdbms/demo.

In Oracle 11, these make files are not included either on the
database media or on the client media. The are on the examples
media.

So, to get everything you need to compile and link an OCI
program, you need to install the examples. This will increase
the size of your ORACLE_HOME by >600Mb. That's life.

Installing the examples completely fixed the problem for my
data base server, on which everything is 64-bit.

However, it did NOT fix the problem on my client box, which is
all 32-bit. On this box, Makefile.PL gave up because it could
not find demo-rdms32.mk. This is wrong. demo-rdms32.mk is only
shipped with 64-bit Oracle distributions. It is intended only for
compiling 32-bit programs on 64-bit platforms. On a 32-bit
platform, demo-rdbms.mk should be used.See
http://download.oracle.com/docs/cd/E11882_01/server.112/e10839/prcmp_cll_int.htm#BABDGIDJ

I will prepare a patch for Maekfile.PL to do two things:

  1. Generate a warning for Oracle 11 non-instant ORACLE_HOMEs
     which do not have rdbms/demo/demo-rdbms.mk, suggesting that
     the examples should be installed.
  2. Use demo-rdbms.mk for 32-bit compilations in 32-bit
     environments.

> Are you setting the 'LD_LIBRARY_PATH' ENV value??

I have never found this to be necessary except with Instant Clients.
-- 
Charles Jardine - Computing Service, University of Cambridge
c...@cam.ac.uk    Tel: +44 1223 334506, Fax: +44 1223 334679

>> Date: Mon, 7 Nov 2011 17:15:47 +0000
>> From: c...@cam.ac.uk
>> To: dbi-users@perl.org
>> Subject: Building DBD::Oracle against Oracle full installs.
>>
>> Operating System: SLES 11 SP 2 on x86-64
>> Perl: 5.14.2
>> Oracle: 11.2.0.3.0
>> DBD::Oracle: 1.34
>>
>> If I try to build DBD::Oracle against a Server installation of Oracle,
>> the output of Makefile.PL includes the following strong warning message
>> mentioning this mailing list. Despite the warning message, the build
>> is successful.
>>
>>> + /usr/local/perl/5.14.2-A/bin/perl Makefile.PL
>>> Using DBI 1.616 (for perl 5.014002 on x86_64-linux-thread-multi) installed 
>>> in 
>>> /usr/local/perl/5.14.2-A/lib/site_perl/5.14.2/x86_64-linux-thread-multi/auto/DBI/
>>>
>>> Configuring DBD::Oracle for perl 5.014002 on linux 
>>> (x86_64-linux-thread-multi)
>>>
>>> Remember to actually *READ* the README file! Especially if you have any 
>>> problems.
>>>
>>> Installing on a linux, Ver#2.6
>>> Using Oracle in /oracle/base/orahome/11.2.0.3.0
>>> DEFINE _SQLPLUS_RELEASE = "1102000300" (CHAR)
>>> Oracle version 11.2.0.3 (11.2)
>>> Found /oracle/base/orahome/11.2.0.3.0/rdbms/lib/ins_rdbms.mk
>>> Using /oracle/base/orahome/11.2.0.3.0/rdbms/lib/ins_rdbms.mk
>>> Your LD_LIBRARY_PATH env var is set to ''
>>> WARNING: Your LD_LIBRARY_PATH env var doesn't include 
>>> '/oracle/base/orahome/11.2.0.3.0/lib' but probably needs to.
>>> Reading /oracle/base/orahome/11.2.0.3.0/rdbms/lib/ins_rdbms.mk
>>> Reading /oracle/base/orahome/11.2.0.3.0/rdbms/lib/env_rdbms.mk
>>> WARNING: Oracle /oracle/base/orahome/11.2.0.3.0/rdbms/lib/ins_rdbms.mk 
>>> doesn't define a 'build' rule.
>>>
>>> WARNING: I will now try to guess how to build and link DBD::Oracle for 
>>> you.^G
>>> This kind of guess work is very error prone and Oracle-version sensitive.
>>> It is possible that it won't be supported in future versions of DBD::Oracle.
>>> *PLEASE* notify dbi-users about exactly _why_ you had to build it this way.
>>>
>>> Found header files in /oracle/base/orahome/11.2.0.3.0/rdbms/public.
>>>
>>> client_version=11.2
>>
>>
>> If I try to build against a full Oracle client installation,
>> I get the following fatal error. However, if I follow the advice
>> given in the error message, and add the following option to the Makefile.PL
>>
>> -m /local/oracle/client.11.2.0.3.0/rdbms/lib/ins_rdbms.mk
>>
>> the behaviour changes, and I get a warning like the one above, and a
>> successful build.
>>
>>> + /local/oracle/perl/5.14.2-A/bin/perl Makefile.PL
>>> Using DBI 1.616 (for perl 5.014002 on i686-linux-thread-multi) installed in 
>>> /local/oracle/perl/5.14.2-A/lib/site_perl/5.14.2/i686-linux-thread-multi/auto/DBI/
>>>
>>> Configuring DBD::Oracle for perl 5.014002 on linux (i686-linux-thread-multi)
>>>
>>> Remember to actually *READ* the README file! Especially if you have any 
>>> problems.
>>>
>>> Installing on a linux, Ver#2.6
>>> Using Oracle in /local/oracle/client.11.2.0.3.0
>>> DEFINE _SQLPLUS_RELEASE = "1102000300" (CHAR)
>>> Oracle version 11.2.0.3 (11.2)
>>>
>>> Unable to locate an oracle.mk or other suitable *.mk
>>> file in your Oracle installation. (I looked in
>>> /local/oracle/client.11.2.0.3.0/rdbms/demo/demo_xe.mk 
>>> /local/oracle/client.11.2.0.3.0/rdbms/demo/demo_rdbms32.mk under 
>>> /local/oracle/client.11.2.0.3.0)
>>>
>>> The oracle.mk (or demo_rdbms.mk) file is part of the Oracle
>>> RDBMS product. You need to build DBD::Oracle on a
>>> system which has one of these Oracle components installed.
>>> (Other *.mk files such as the env_*.mk files will not work.)
>>> Alternatively you can use Oracle Instant Client.
>>>
>>> In the unlikely event that a suitable *.mk file is installed
>>> somewhere non-standard you can specify where it is using the -m option:
>>> perl Makefile.PL -m /path/to/your.mk
>>>
>>> See the appropriate README file for your OS for more information and some 
>>> alternatives.
>>>
>>> at Makefile.PL line 1185.
>>
>> What am I doing wrong?
>>
>> -- 
>> Charles Jardine - Computing Service, University of Cambridge
>> c...@cam.ac.uk Tel: +44 1223 334506, Fax: +44 1223 334679
>                                         

Reply via email to