Kbase 21513: Alternative Method To Set ORALIB Manually
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  27/01/2006 |
|
Status: Verified
GOAL:
What are alternative methods to setting ORALIB manually.
FIX:
The following method can be used instead of performing the steps outlined within Progress formal documentation; ORACLE DataServer Guide, "Setting ORALIB" section.
While the original documentation is correct, the steps and the objects referenced are outdated. Also, at times, the MAKE method may not work appropriately on some UNIX systems due to configuration and setup problems. Thus, seeking alternatives to be able to statically link ORACLE objects within a Progress module are needed.
1) Set ORACLE_HOME environment variable, include $ORACLE_HOME/bin and
compiler bin directory in your PATH environment variable.
2) cp $DLC/probuild/oracle/Makefile to the working directory
The following example content is from Makefile for Solaris:
"Makefile" [Read only] 16 lines, 502 characters
# Makefile - Display correct $ORALIB value
# SunSoft ParallelMake has a problem running this in parallel. The
# following directive serializes 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)
3) Please note that depending on which version of ORACLE version being used,
ORAMAKEFILE line will need to be adjusted.
-Prior to ORACLE version 7.3, the ORACLE.mk file exists
in $ORACLE_HOME/rdbms/lib directory
-In ORACLE version 7.3, the ORACLE.mk file exists
in $ORACLE_HOME/rdbms/demo directory
-In ORACLE version 8, the make file is $ORACLE_HOME/rdbms/demo/demo_rdbms.mk,
Depending on the ORACLE release, the location
of this file can change.
4) Type "make" at the prompt. A list of objects will appear.
Here is an example of what is seen.
-L/gateways/solaris/oracle/product/7.3.2/lib -L/gateways/solaris/oracle/product/7.3.2/rdbms/lib -lsqlnet -lncr -lsqlnet -lclient -lcommon -lgeneric -lsqlnet -lncr -lsqlnet -lclient -lcommon -lgeneric -lepc -lnlsrtl3 -lc3v6 -lcore3 -lnlsrtl3 -lcore3 -lnlsrtl3 -lsocket -lnsl -lm -ldl -R /opt/SUNWcluster/lib -Y P,/xwin/solaris/X11R5/lib::/usr/dt/lib:/usr/lib:/usr/openwin/lib:/opt/SUNWcluster/lib:/usr/ccs/lib:/usr/lib -Qy -lc /gateways/solaris/oracle/product/7.3.2/lib/crtn.o -lm -lcore3
5) Set and export ORALIB to the list of objects.
Here's an example:
ORALIB=-L/gateways/solaris/oracle/product/7.3.2/lib -L/gateways/solaris/oracle/product/7.3.2/rdbms/lib -lsqlnet -lncr -lsqlnet -lclient -lcommon -lgeneric -lsqlnet -lncr -lsqlnet -lclient -lcommon -lgeneric -lepc -lnlsrtl3 -lc3v6 -lcore3 -lnlsrtl3 -lcore3 -lnlsrtl3 -lsocket -lnsl -lm -ldl -R /opt/SUNWcluster/lib -Y P,/xwin/solaris/X11R5/lib::/usr/dt/lib:/usr/lib:/usr/openwin/lib:/opt/SUNWcluster/lib:/usr/ccs/lib:/usr/lib -Qy -lc /gateways/solaris/oracle/product/7.3.2/lib/crtn.o -lm -lcore3