Re: Problem compiling DBD::Oracle on FreeBSD with Oracle 10g Instant Client
[email protected] (John Scoles)
| Newsgroups | perl.dbi.users |
|---|---|
| Message-ID | <[email protected]> |
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 > > >