Consultor Eletrônico



Kbase 16151: How to set ORALIB for Progress version 7.3D and Oracle 7.3
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   10/05/1998
How to set ORALIB for Progress version 7.3D and Oracle 7.3


INTRODUCTION:
=============
This Product Services Technical Support Knowledgebase entry
describes how to apply the patch to replace the buildenv
and Makefile originally sent with 7.3D which automatically
sets the ORACLE environment variable. Changes are required
in these files to support the commercial release of
ORACLE version 7.3. This "manual" patch is required for
Progress 7.3D only; this issue no longer exist for 8.0B
or 7.3E (when it becames available).

The ORALIB environment is defined to include a list of ORACLE
libraries used in the linking the ORACLE dataserver executables.
The link is performed by the scripts which are generated by
probuild (example: ldpro).

WHY YOU NEED TO KNOW THIS:
===========================
The ORACLE Dataserver Documentation describes a method of
defining the ORALIB environment variable using the unix make
utility. This method has been found to be difficult to use
and if not followed properly results in an incomplete or
inaccurate list of libraries. This is especially difficult
when migrating to different versions of ORACLE.

Example:
When the ORALIB is not defined properly the result of running
the ldpro script will generate link errors and not produce
an executable. The link errors vary based on the unix platform
and the installed Oracle product.

PROCEDURAL APPROACH:
====================
There are two files needed for this patch; the buildenv script
and a Makefile. Perform the following steps to apply the patch.

Step 1:

Copy the buildenv script located in the $DLC/proload/eucapp
directory to buildenv.sav. Note: This buildenv.sav is only
necessary to keep around if you need to go back to the older
version.

Step 2:

Using your favorite unix editor edit the buildenv script
and at the bottom of this script add the following lines:

# If ORALIB is not set already, attempt to set it
# ORACLE_HOME must be set for the following to work.
# Error if unset.
if [ "x$ORALIB" = x -a "x$ORACLE_HOME" != x ] ; then
# Execute ('source' into current environment) oralib.sh
# if it exists. (it is assumed to be a Bourne-shell
# compatible script which, when finished, has defined
# an appropriate value for $ORALIB.
if [ -x $DLC/probuild/oracle/oralib.sh ] ; then
. $DLC/probuild/oracle/oralib.sh
else
# Oracle 7.3 does not have oracle.mk - we use this instead
if [ -f $ORACLE_HOME/rdbms/lib/ins_rdbms.mk ] ; then
ORALIB="`make -f $DLC/probuild/oracle/Makefile
ORAMAKEFILE=$ORACLE_HOME/rdbms/lib/ins_rdbms.mk`"
else
ORALIB="`make -f $DLC/probuild/oracle/Makefile`"
fi
export ORALIB
fi
fi


Step 3:

Extract the attached Makefile and copy it to
$DLC/probuild/oracle. The name of the file should
simply be called "Makefile".

Once you have edited the buildenv and copied the Makefile
you should check to see if the ORALIB is defined by issuing
the command "echo $ORALIB". The buildenv will not define the
ORALIB if it has been set. To use the new definition you
must unset the environment variable by issuing the command
"unset ORALIB".

ONLINE PROCEDURES OR UTILITIES:
===============================
If you are having difficulties with make or are still
getting link errors make sure that the $PATH environment
variable includes the directory where make is installed
as well as $ORACLE_HOME. In addition, the ORACLE_HOME
environment variable should contain the location of
the oracle installed product.

Example:
$echo $ORACLE_HOME
$/usr2/oracle/product/7.3.2

REFERENCES TO WRITTEN DOCUMENTATION:
====================================
DataServer for Oracle Guide
Oracle documentation
Manpages on Make utility

------------------- Makefile - Cut Here ------------------
# Makefile - Display correct $ORALIB value

# SunSoft ParallelMake has a problem running this in parallel. The
# following directive seriallizes the make, eliminating the problem.
.NO_PARALLEL:

ORAMAKEFILE = $(ORACLE_HOME)/rdbms/lib/oracle.mk

# OCILDLIBS = The OCI LD Libraries. Can't use, as it appears to have
# multiple definitions in some instances of oracle.mk.
# OCILDLIBS = $(LIBOCIC) $(TTLIBS) $(LLIBCORE)
oralib:
@echo $(LDFLAGS) $(LIBOCIC) $(TTLIBS) $(LLIBCORE)

include $(ORAMAKEFILE)

---------------------- end Makefile ------------------------

Progress Software Technical Support Note # 16151