|Subject:||Scary warning during install against 11.2 Oracle database server|
Versions: Platform: SLES 11 SP 1 on Intel x86-64 Perl: 5.14.2 64-bit Oracle: 126.96.36.199.0 64-bit While building DBD::Oracle 1.34 against a 64-bit database server ORACLE_HOME, I received the following message from Makefile.PL. WARNING: Oracle /oracle/base/orahome/188.8.131.52.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. 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. Despite this message, an apparently working DBD::Oracle was built. Experiment shows the same result as above for a 64-bit full client install. The behaviour with a 32-bit full client install is the subject of RT#72463. Instant Client builds, of course, work quite differently. I did not find the warning message particularly useful, not did I learn much from dbi-users, so did a bit of research. Two things together cause the warning. 1. The make file Oracle recommend for building OCI applications for Oracle 11 is $ORACLE_HOME/rdbms/demo/. Sees/cd/E11882_01/server.112/e108 39/prcmp_cll_int.htm#BABDGIDJ This file is not shipped as part of either the full client or the server, so I did not have it at the time of the above events. (This file is now bundled into the optional 'Database Examples', which can be installed as a extra in server, or full client ORACLE_HOMEs). 2. The list of suitable make files in @mk_oci64 (near the top of find_mkfile()) in Makefile.PL includes rdbms/lib/ins_rdbms.mk. This is not a make file for building OCI applications. I presume it is for installing Oracle server software. The warning happens because the chosen make file is useless, and Makefile.PL has to fall back on other means of working out how to build an OCI application. It internally sets the dangerous -b=0 option, and continues. I solved this problem for myself by installing the 'Database Examples' (from disc 7 of 7) in my server Oracle Home. This caused Makefile.PL to use the Oracle-recommended make file, and not to hector me. My first thought was the best way forward would be to remove the useless rdbms/lib/ins_rdbms.mk from the list in find_mkfile(). This would cause a different route through Makefile.PL to lead to a fatal error with a message like: Unable to locate an oracle.mk or other suitable *.mk file in your Oracle installation. (I looked in <blah> under <blah>) 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. This message could, in the case of Oracle 11 on Unix, be extended to advise the user either to use the Instant Client or to install the Database Examples. The only reason I have hesitated in producing such a patch is that the Database Examples take up more than 600 Mb of disk and its installer does not offer subsets. That is a lot of disk for one file! What do the maintainers of DBD::Oracle think about this? How serious is the threat that, "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."?