Re: Problem compiling DBD::Oracle on FreeBSD with Oracle 10g Instant Client

2010-10-08 Thread Eric Yellin

 On 05/10/2010 17:44, Scott T. Hildreth wrote:

On Sun, 2010-10-03 at 18:45 +0200, Eric Yellin wrote:

Hi,


I am trying to compile DBD::Oracle that will work with Oracle 10g on
FreeBSD 6.3



Eric,
Are you compiling a linux Perl?  It won't work with out it.  I have
the port emulators/linux_dist-gentoo-stage3 installed.  With a chroot
to the gentoo dir, I am able to compile a linux Perl and DBI,
DBD::Oracle...etc.  I copied the Perl install to /usr/compat/linux.


Thanks Scott,


I am not using a linux compiled Perl so tried following your 
instructions but got stuck when trying to chroot to 
/usr/local/gentoo-stage3:


chroot: /bin/csh: No such file or directory


I also tried setting a chrooted environment and logged in that way, but 
when trying to run the perl configure script (./Configure -de) I 
received the following:

./Configure: line 69: 4: Bad file descriptor

Thanks, Eric




Here is what I have done so far:

1. Installed the 3 Oracle Instant Client ports:

- linux-oracle-instantclient-basic
- linux-oracle-instantclient-sdk
- linux-oracle-instantclient-sqlplus

These install as follows:
_The "basic files install in:_
/usr/compat/linux/usr/lib/Oracle/10.2.0.3/client/lib

_The sqlplus installes in _:
/usr/compat/linux/usr/lib/Oracle/10.2.0.3/client/bin

_The sdk split between:_
/usr/compat/linux/usr/include/Oracle/10.2.0.3/client/lib (the include
directory)
and:
/usr/compat/linux/usr/share/Oracle/10.2.0.3/client/lib (the demo directory)

2. Downloaded latest DBD::Oracle (1.25)

3.  Set Environment variables as follows:
setenv LD_LIBRARY_PATH /usr/compat/linux/usr/lib/oracle/10.2.0.3/client/lib
setenv ORACLE_HOME /usr/compat/linux/usr/lib/oracle/10.2.0.3/client

4. Ran perl Makefile.PL for DBD:Oracle and recieved the follwoing error:
/"Unable to locate an oracle.mk, proc.mk or other suitable *.mk"/

5. changed the ORACLE_HOME variable to: setenv ORACLE_HOME
/usr/compat/linux/usr/lib/oracle/10.2.0.3/client/lib and ran "perl
Makefile.PL" again and now received the following message:
/"I can't find the header files I need in your Oracle installation.
You probably need to install some more Oracle components.
For Instant Client that means the SDK package"/

6. Copied the "sdk" files directly from the ports "work" directory
leaving them in the original structure and placing them under the
/usr/compat/linux/usr/lib/oracle/10.2.0.3/client/lib directory and ran
perl Makefile.PL again. Now it built the Makefile succesfully with a few
warnings:

/WARNING: If you have problems you may need to rebuild perl with
threading enabled.
WARNING: If you have problems you may need to rebuild perl with
-Uusemymalloc.
WARNING: META_MERGE is not a known parameter.
'META_MERGE' is not a known MakeMaker parameter name./

7. Ran 'make' and it compiled smoothly.

8. Ran 'make test'  and got the following error:
/Failed to load Oracle extension and/or shared libraries:
install_driver(Oracle) failed: Can't load
'/home/packages/Oracle/DBD-Oracle-1.25/blib/arch/auto/DBD/Oracle/Oracle.so'
for module DBD::Oracle: Shared object "libdl.so.2" not found, required
by "libclntsh.so.10.1" at /usr/local/lib/perl5/5.8.8/mach/DynaLoader.pm
line 230.
   at (eval 9) line 3
Compilation failed in require at (eval 9) line 3.
Perhaps a required shared library or dll isn't installed where expected
   at t/01base.t line 19
The remaining tests will probably also fail with the same error./

The libdl.so.2 file is located in "/usr/compat/linux/lib" and the
compiled DBD::Oracle module does 'know' not see that directory.

How can I move on from here to link the necessary shared libraries
during runtime ? (Tried doing this with symlinks, but kept getting
errors and eventually reached a dead end where symlinking did not help
anymore. I assume there must be a different way to do it)

Thanks,  Eric





\n\n\n\n

--\n
This email is protected by Reflexion Total Control\n
http://www.migvan.co.il/Reflexion\n
--\n

Re: Problem compiling DBD::Oracle on FreeBSD with Oracle 10g Instant Client

2010-10-05 Thread Scott T. Hildreth
On Sun, 2010-10-03 at 18:45 +0200, Eric Yellin wrote:
> 
> Hi,
> 
> 
> I am trying to compile DBD::Oracle that will work with Oracle 10g on 
> FreeBSD 6.3
> 
> 

Eric, 
   Are you compiling a linux Perl?  It won't work with out it.  I have
the port emulators/linux_dist-gentoo-stage3 installed.  With a chroot
to the gentoo dir, I am able to compile a linux Perl and DBI,
DBD::Oracle...etc.  I copied the Perl install to /usr/compat/linux.

> Here is what I have done so far:
> 
> 1. Installed the 3 Oracle Instant Client ports:
> 
> - linux-oracle-instantclient-basic
> - linux-oracle-instantclient-sdk
> - linux-oracle-instantclient-sqlplus
> 
> These install as follows:
> _The "basic files install in:_
> /usr/compat/linux/usr/lib/Oracle/10.2.0.3/client/lib
> 
> _The sqlplus installes in _:
> /usr/compat/linux/usr/lib/Oracle/10.2.0.3/client/bin
> 
> _The sdk split between:_
> /usr/compat/linux/usr/include/Oracle/10.2.0.3/client/lib (the include 
> directory)
> and:
> /usr/compat/linux/usr/share/Oracle/10.2.0.3/client/lib (the demo directory)
> 
> 2. Downloaded latest DBD::Oracle (1.25)
> 
> 3.  Set Environment variables as follows:
> setenv LD_LIBRARY_PATH /usr/compat/linux/usr/lib/oracle/10.2.0.3/client/lib
> setenv ORACLE_HOME /usr/compat/linux/usr/lib/oracle/10.2.0.3/client
> 
> 4. Ran perl Makefile.PL for DBD:Oracle and recieved the follwoing error:
> /"Unable to locate an oracle.mk, proc.mk or other suitable *.mk"/
> 
> 5. changed the ORACLE_HOME variable to: setenv ORACLE_HOME 
> /usr/compat/linux/usr/lib/oracle/10.2.0.3/client/lib and ran "perl 
> Makefile.PL" again and now received the following message:
> /"I can't find the header files I need in your Oracle installation.
> You probably need to install some more Oracle components.
> For Instant Client that means the SDK package"/
> 
> 6. Copied the "sdk" files directly from the ports "work" directory 
> leaving them in the original structure and placing them under the 
> /usr/compat/linux/usr/lib/oracle/10.2.0.3/client/lib directory and ran 
> perl Makefile.PL again. Now it built the Makefile succesfully with a few 
> warnings:
> 
> /WARNING: If you have problems you may need to rebuild perl with 
> threading enabled.
> WARNING: If you have problems you may need to rebuild perl with 
> -Uusemymalloc.
> WARNING: META_MERGE is not a known parameter.
> 'META_MERGE' is not a known MakeMaker parameter name./
> 
> 7. Ran 'make' and it compiled smoothly.
> 
> 8. Ran 'make test'  and got the following error:
> /Failed to load Oracle extension and/or shared libraries:
> install_driver(Oracle) failed: Can't load 
> '/home/packages/Oracle/DBD-Oracle-1.25/blib/arch/auto/DBD/Oracle/Oracle.so' 
> for module DBD::Oracle: Shared object "libdl.so.2" not found, required 
> by "libclntsh.so.10.1" at /usr/local/lib/perl5/5.8.8/mach/DynaLoader.pm 
> line 230.
>   at (eval 9) line 3
> Compilation failed in require at (eval 9) line 3.
> Perhaps a required shared library or dll isn't installed where expected
>   at t/01base.t line 19
> The remaining tests will probably also fail with the same error./
> 
> The libdl.so.2 file is located in "/usr/compat/linux/lib" and the 
> compiled DBD::Oracle module does 'know' not see that directory.
> 
> How can I move on from here to link the necessary shared libraries 
> during runtime ? (Tried doing this with symlinks, but kept getting 
> errors and eventually reached a dead end where symlinking did not help 
> anymore. I assume there must be a different way to do it)
> 
> Thanks,  Eric
> 
> 



Re: Problem compiling DBD::Oracle on FreeBSD with Oracle 10g Instant Client

2010-10-05 Thread John Scoles

 On 10/5/2010 3:58 AM, Martin J. Evans wrote:

On 03/10/10 17:45, Eric Yellin wrote:


Hi,


I am trying to compile DBD::Oracle that will work with Oracle 10g on
FreeBSD 6.3


Here is what I have done so far:

1. Installed the 3 Oracle Instant Client ports:

- linux-oracle-instantclient-basic
- linux-oracle-instantclient-sdk
- linux-oracle-instantclient-sqlplus

These install as follows:
_The "basic files install in:_
/usr/compat/linux/usr/lib/Oracle/10.2.0.3/client/lib

_The sqlplus installes in _:
/usr/compat/linux/usr/lib/Oracle/10.2.0.3/client/bin

_The sdk split between:_
/usr/compat/linux/usr/include/Oracle/10.2.0.3/client/lib (the include
directory)
and:
/usr/compat/linux/usr/share/Oracle/10.2.0.3/client/lib (the demo directory)

2. Downloaded latest DBD::Oracle (1.25)

3.  Set Environment variables as follows:
setenv LD_LIBRARY_PATH /usr/compat/linux/usr/lib/oracle/10.2.0.3/client/lib
setenv ORACLE_HOME /usr/compat/linux/usr/lib/oracle/10.2.0.3/client

You normally don't need to set ORACLE_HOME for instant client.

Shouldn't that be /usr/compat/linux/usr/lib/oracle/10.2.0.3, i.e. no client/lib 
on the end?


4. Ran perl Makefile.PL for DBD:Oracle and recieved the follwoing error:
/"Unable to locate an oracle.mk, proc.mk or other suitable *.mk"/

5. changed the ORACLE_HOME variable to: setenv ORACLE_HOME
/usr/compat/linux/usr/lib/oracle/10.2.0.3/client/lib and ran "perl
Makefile.PL" again and now received the following message:
/"I can't find the header files I need in your Oracle installation.
You probably need to install some more Oracle components.
For Instant Client that means the SDK package"/

6. Copied the "sdk" files directly from the ports "work" directory
leaving them in the original structure and placing them under the
/usr/compat/linux/usr/lib/oracle/10.2.0.3/client/lib directory and ran
perl Makefile.PL again. Now it built the Makefile succesfully with a few
warnings:

/WARNING: If you have problems you may need to rebuild perl with
threading enabled.
WARNING: If you have problems you may need to rebuild perl with
-Uusemymalloc.
WARNING: META_MERGE is not a known parameter.
'META_MERGE' is not a known MakeMaker parameter name./

I guess the META_MERGE warning is because your ExtUtils::MakeMaker does not 
support it. If that is the case DBD::Oracle should only add META_MERGE after 
testing ExtUtils::MakeMaker version.


7. Ran 'make' and it compiled smoothly.

8. Ran 'make test'  and got the following error:
/Failed to load Oracle extension and/or shared libraries:
install_driver(Oracle) failed: Can't load
'/home/packages/Oracle/DBD-Oracle-1.25/blib/arch/auto/DBD/Oracle/Oracle.so'
for module DBD::Oracle: Shared object "libdl.so.2" not found, required
by "libclntsh.so.10.1" at /usr/local/lib/perl5/5.8.8/mach/DynaLoader.pm
line 230.
  at (eval 9) line 3
Compilation failed in require at (eval 9) line 3.
Perhaps a required shared library or dll isn't installed where expected
  at t/01base.t line 19
The remaining tests will probably also fail with the same error./

The libdl.so.2 file is located in "/usr/compat/linux/lib" and the
compiled DBD::Oracle module does 'know' not see that directory.

How can I move on from here to link the necessary shared libraries
during runtime ? (Tried doing this with symlinks, but kept getting
errors and eventually reached a dead end where symlinking did not help
anymore. I assume there must be a different way to do it)

Thanks,  Eric




Undo the changes you made and try again without client/lib in your 
LD_LIBRARY_PATH and without setting ORACLE_HOME.

Martin

Counter intuitive but that might work.

Pleas give it a try.

That is something that should go in the readme.

cheers
John


Re: Problem compiling DBD::Oracle on FreeBSD with Oracle 10g Instant Client

2010-10-05 Thread Martin J. Evans
On 03/10/10 17:45, Eric Yellin wrote:
> 
> 
> Hi,
> 
> 
> I am trying to compile DBD::Oracle that will work with Oracle 10g on
> FreeBSD 6.3
> 
> 
> Here is what I have done so far:
> 
> 1. Installed the 3 Oracle Instant Client ports:
> 
> - linux-oracle-instantclient-basic
> - linux-oracle-instantclient-sdk
> - linux-oracle-instantclient-sqlplus
> 
> These install as follows:
> _The "basic files install in:_
> /usr/compat/linux/usr/lib/Oracle/10.2.0.3/client/lib
> 
> _The sqlplus installes in _:
> /usr/compat/linux/usr/lib/Oracle/10.2.0.3/client/bin
> 
> _The sdk split between:_
> /usr/compat/linux/usr/include/Oracle/10.2.0.3/client/lib (the include
> directory)
> and:
> /usr/compat/linux/usr/share/Oracle/10.2.0.3/client/lib (the demo directory)
> 
> 2. Downloaded latest DBD::Oracle (1.25)
> 
> 3.  Set Environment variables as follows:
> setenv LD_LIBRARY_PATH /usr/compat/linux/usr/lib/oracle/10.2.0.3/client/lib
> setenv ORACLE_HOME /usr/compat/linux/usr/lib/oracle/10.2.0.3/client

You normally don't need to set ORACLE_HOME for instant client.

Shouldn't that be /usr/compat/linux/usr/lib/oracle/10.2.0.3, i.e. no client/lib 
on the end?

> 4. Ran perl Makefile.PL for DBD:Oracle and recieved the follwoing error:
> /"Unable to locate an oracle.mk, proc.mk or other suitable *.mk"/
> 
> 5. changed the ORACLE_HOME variable to: setenv ORACLE_HOME
> /usr/compat/linux/usr/lib/oracle/10.2.0.3/client/lib and ran "perl
> Makefile.PL" again and now received the following message:
> /"I can't find the header files I need in your Oracle installation.
> You probably need to install some more Oracle components.
> For Instant Client that means the SDK package"/
> 
> 6. Copied the "sdk" files directly from the ports "work" directory
> leaving them in the original structure and placing them under the
> /usr/compat/linux/usr/lib/oracle/10.2.0.3/client/lib directory and ran
> perl Makefile.PL again. Now it built the Makefile succesfully with a few
> warnings:
> 
> /WARNING: If you have problems you may need to rebuild perl with
> threading enabled.
> WARNING: If you have problems you may need to rebuild perl with
> -Uusemymalloc.
> WARNING: META_MERGE is not a known parameter.
> 'META_MERGE' is not a known MakeMaker parameter name./

I guess the META_MERGE warning is because your ExtUtils::MakeMaker does not 
support it. If that is the case DBD::Oracle should only add META_MERGE after 
testing ExtUtils::MakeMaker version.

> 7. Ran 'make' and it compiled smoothly.
> 
> 8. Ran 'make test'  and got the following error:
> /Failed to load Oracle extension and/or shared libraries:
> install_driver(Oracle) failed: Can't load
> '/home/packages/Oracle/DBD-Oracle-1.25/blib/arch/auto/DBD/Oracle/Oracle.so'
> for module DBD::Oracle: Shared object "libdl.so.2" not found, required
> by "libclntsh.so.10.1" at /usr/local/lib/perl5/5.8.8/mach/DynaLoader.pm
> line 230.
>  at (eval 9) line 3
> Compilation failed in require at (eval 9) line 3.
> Perhaps a required shared library or dll isn't installed where expected
>  at t/01base.t line 19
> The remaining tests will probably also fail with the same error./
> 
> The libdl.so.2 file is located in "/usr/compat/linux/lib" and the
> compiled DBD::Oracle module does 'know' not see that directory.
> 
> How can I move on from here to link the necessary shared libraries
> during runtime ? (Tried doing this with symlinks, but kept getting
> errors and eventually reached a dead end where symlinking did not help
> anymore. I assume there must be a different way to do it)
> 
> Thanks,  Eric
> 
> 
> 

Undo the changes you made and try again without client/lib in your 
LD_LIBRARY_PATH and without setting ORACLE_HOME.

Martin
-- 
Martin J. Evans
Easysoft Limited
http://www.easysoft.com


Re: Problem compiling DBD::Oracle on FreeBSD with Oracle 10g Instant Client

2010-10-04 Thread John Scoles

 On 10/3/2010 12:45 PM, Eric Yellin wrote:
I have yet to try an build DBD::Oracle for FreeBSD so the Makefile might 
not be working correctly  here are my comments





Hi,


I am trying to compile DBD::Oracle that will work with Oracle 10g on 
FreeBSD 6.3



Here is what I have done so far:

1. Installed the 3 Oracle Instant Client ports:

- linux-oracle-instantclient-basic
- linux-oracle-instantclient-sdk
- linux-oracle-instantclient-sqlplus

These install as follows:
_The "basic files install in:_
/usr/compat/linux/usr/lib/Oracle/10.2.0.3/client/lib

_The sqlplus installes in _:
/usr/compat/linux/usr/lib/Oracle/10.2.0.3/client/bin

_The sdk split between:_
/usr/compat/linux/usr/include/Oracle/10.2.0.3/client/lib (the include 
directory)

and:
/usr/compat/linux/usr/share/Oracle/10.2.0.3/client/lib (the demo 
directory)


2. Downloaded latest DBD::Oracle (1.25)

3.  Set Environment variables as follows:
setenv LD_LIBRARY_PATH 
/usr/compat/linux/usr/lib/oracle/10.2.0.3/client/lib

setenv ORACLE_HOME /usr/compat/linux/usr/lib/oracle/10.2.0.3/client


this looks ok till this point


4. Ran perl Makefile.PL for DBD:Oracle and recieved the follwoing error:
/"Unable to locate an oracle.mk, proc.mk or other suitable *.mk"/

Nomally in the linux IC the .so files are buried under/in another file 
and you have to make a ln to them like this


 libclntsh.so -> /export/home/ic_112/instantclient_11_2/libclntsh.so.11.1

Did the Makefile make a like like the above for you???




5. changed the ORACLE_HOME variable to: setenv ORACLE_HOME 
/usr/compat/linux/usr/lib/oracle/10.2.0.3/client/lib and ran "perl 
Makefile.PL" again and now received the following message:

/"I can't find the header files I need in your Oracle installation.
You probably need to install some more Oracle components.
For Instant Client that means the SDK package"/

6. Copied the "sdk" files directly from the ports "work" directory 
leaving them in the original structure and placing them under the 
/usr/compat/linux/usr/lib/oracle/10.2.0.3/client/lib directory and ran 
perl Makefile.PL again. Now it built the Makefile succesfully with a 
few warnings:


/WARNING: If you have problems you may need to rebuild perl with 
threading enabled.
WARNING: If you have problems you may need to rebuild perl with 
-Uusemymalloc.

WARNING: META_MERGE is not a known parameter.
'META_MERGE' is not a known MakeMaker parameter name./

7. Ran 'make' and it compiled smoothly.


That would be odd after the first few errors you got.

8. Ran 'make test'  and got the following error:
/Failed to load Oracle extension and/or shared libraries:
install_driver(Oracle) failed: Can't load 
'/home/packages/Oracle/DBD-Oracle-1.25/blib/arch/auto/DBD/Oracle/Oracle.so' 
for module DBD::Oracle: Shared object "libdl.so.2" not found, required 
by "libclntsh.so.10.1" at 
/usr/local/lib/perl5/5.8.8/mach/DynaLoader.pm line 230.

 at (eval 9) line 3


Mos likely related to the bad ln above.  now DBD oracle cannot find its 
.so files.


Hope this helps a little

Compilation failed in require at (eval 9) line 3.
Perhaps a required shared library or dll isn't installed where expected
 at t/01base.t line 19
The remaining tests will probably also fail with the same error./

The libdl.so.2 file is located in "/usr/compat/linux/lib" and the 
compiled DBD::Oracle module does 'know' not see that directory.


How can I move on from here to link the necessary shared libraries 
during runtime ? (Tried doing this with symlinks, but kept getting 
errors and eventually reached a dead end where symlinking did not help 
anymore. I assume there must be a different way to do it)


Thanks,  Eric