Consultor Eletrônico



Kbase 15444: ORACLE DSV: 7.3C Automatic setting of ORALIB on-line patch
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   5/10/1998
ORACLE DSV: 7.3C Automatic setting of ORALIB on-line patch


INTRODUCTION:
=============
This Product Services Technical Support Knowledgebase entry
describes how to apply the patch to automatically set the
ORALIB environment variable. This environment variable is
defined to include a list of ORACLE libraries used in 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
# set $ORALIB to the output of the following make
# command
ORALIB="`make -f $DLC/probuild/oracle/Makefile`"
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 issueing
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 issueing 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.1.6


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:

# 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)
# NOTE: Use the TAB key to create the indented line rather
# than 8 spaces. Many MAKE utilities are particular about this.
oralib:
@echo $(LDFLAGS) $(LIBOCIC) $(TTLIBS) $(LLIBCORE)

include $(ORACLE_HOME)/rdbms/lib/oracle.mk

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


:


ONLINE PROCEDURES OR UTILITIES:
===============================


REFERENCES TO WRITTEN DOCUMENTATION:
====================================

Progress Software Technical Support Note # 15444