Fixing the Dreaded *.mk Error in DBD::Oracle insalls

Jun 4, 2010 / By John Scoles

Tags: , ,

If you have ever had this message:

Unable to locate an oracle.mk, proc.mk or other suitable *.mk
file in your Oracle installation. (I looked in…)

It can be a very frustrating one to track down.

I have seen it across almost all platforms and versions of Oracle but what it boils down to is that you are quite simply:

1) Missing some part of your Oracle Client or
2) Part of your Oracle Client is some place where the Makefile.PL cannot find it or
3) Part of your Oracle Client is buried inside a resource or a symbolic link or
4) Oracle has moved or removed files that DBD::Oracle needs to compile.

Well what to do then??

There is no 100% answer for this problem but there seems to be two main scenarios where I have encountered this and have come up with somewhat of a solution:

1) If you are attempting to build against any of Oracle’s Instantclients you most likely have only have the basic install available. To correct this simply make sure you get the SDK and SQLPlus downloads as well and try compiling again.

2) If you are installing against an 11g instance (Oracle seems to have moved a number of things about depending on the platform) then you best bet would be to give this a try:

Perl Makefile.PL -l

which forces the compile to user the “direct link” method thus bypassing the *.mk files. Expect much more output and a longer compile time when you take this route but it should work exactly the same.

Cheeers
John Scoles

5 Responses to “Fixing the Dreaded *.mk Error in DBD::Oracle insalls”

  • Moisés says:

    Hi John,

    I had the same problem to, but fortunately your help made me pass to make test. Im trying to compile to an 11G install and it seems that Oracle removed lib32. Now I problably need a 64 bit perl and all the required modules. Dont know if they exist.

    See ya,
    Moisés

  • Tom says:

    Thanks alot John , had the #2 problem compiling it against oracle 11g , great work !

  • Boris says:

    Hi,

    the step perl Makefile.PL -l helped me pass to the next step.

    Now when trying to compile it, I get the following error message:
    ld: fatal: file : open failed: No such file or directory
    ld: fatal: file /opt/app/oracle/product/11.2/lib/libclntsh.so: wrong ELF class: ELFCLASS64
    ld: fatal: File processing errors. No output written to blib/arch/auto/DBD/Oracle/Oracle.so
    collect2: ld returned 1 exit status
    make: *** [blib/arch/auto/DBD/Oracle/Oracle.so] Error 1

    Any hints?

    Thanks, Boris

  • Dhara Desai says:

    hey John,

    Thanks alot. It helped me.
    Great work.

  • Prashant says:

    Thank you. it resolved my issue

Leave a Reply

  • (will not be published)

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>