Kbase 18379: How to Set ORALIB Manually for Linking Dataserver Executable
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  16/10/2008 |
|
Status: Verified
GOAL:
How to Set ORALIB Manually for Linking Dataserver Executable.
FIX:
To properly set the ORALIB environment variable, you should do the
following steps:
1) Copy files from $ORACLE_HOME/rdbms/demo to another directory.
a) Make sure the environment variable ORACLE_HOME is set to
the directory where ORACLE installed.
b) Create a new directory where the Progress DataServer
executables (e.g. _progres, _orasrv etc...)
will be created.
c) Change to that directory (using UNIX cd command)
d) Copy the files from $ORACLE_HOME/rdbms/demo
to the new directory.
note: The actual files in $ORACLE_HOME/rdbs/demo may
vary from platform to platform and from OS to OS.
The cdemo*.* (c and h ) files should be the same.
example of files you may see:
calldemo.sql
cdemo1.c
cdemo2.c
cdemo3.c
ociapr.h
ocidem.h
..
..
ulcase7s.sql
2) Linking and creating the ORACLE demo program will produce (as
a by-product) a list of libraries that the ORACLE demo needs
to link with. This list of libraries is what Progress
will also need to link with to properly create it's DataServer
executables. This list of libraries is what you will set ORALIB
to. To generate this list, enter the following command to link
ORACLE sample C program and to direct the output to a temporary
file (make sure you are in your newly created directory when
you run this):
make -f $ORACLE_HOME/rdbms/lib/oracle.mk > tmpfile
NOTE: this command or directory may vary according to your
ORACLE version or platform. Please contact ORACLE for
help on running the ORACLE makefile.
The output from this command should contain a line that
looks similar to the following, but may not match exactly:
/bin/idld /gateways2/sco/oracle7.1/lib/ostart.o
-L/gateways2/sco/oracle7.1/lib -o cdemo1 cdemo1.o
/gateways2/sco/oracle7.1/lib/libocic.a
/gateways2/sco/oracle7.1/lib/osntab.o -lsqlnet -lora -lsqlnet -lora
-lnlsrtl -lcv6 -lcore -lnlsrtl -lcv6 -lcore
/gateways2/sco/oracle7.1/lib/olm.o
/gateways2/sco/oracle7.1/lib/old.o -lsocket
/gateways2/sco/oracle7.1/lib/oln.o
/gateways2/sco/oracle7.1/lib/olc.o -lcore
/gateways2/sco/oracle7.1/lib/olm.o
/gateways2/sco/oracle7.1/lib/old.o -lsocket
/gateways2/sco/oracle7.1/lib/oln.o
/gateways2/sco/oracle7.1/lib/olc.o
or
/bin/idld /gateways2/sco/oracle7.1/lib/ostart.o -L/gateways2/
sco/oracle7.1/lib -o cdemo1 cdemo1.o /gateways2/sco/oracle7.1
/lib/libocic.a
/gateways2/sco/oracle7.1/lib/osntab.o
-lsqlnet -lora -lsqlnet -lora -lnlsrtl
-lcv6 -lcore -lnlsrtl -lcv6 -lcore
/gateways2/sco/oracle7.1/lib/olm.o
/gateways2/sco/oracle7.1/lib/old.o
-lsocket /gateways2/sco/oracle7.1/lib/oln.o
/gateways2/sco/oracle7.1/lib/olc.o
-lcore /gateways2/sco/oracle7.1/lib/olm.o
/gateways2/sco/oracle7.1/lib/old.o
-lsocket /gateways2/sco/oracle7.1/lib/oln.o
/gateways2/sco/oracle7.1/lib/olc.o
All of the libraries listed above are located in $ORACLE_HOME/lib;
however, the list may also include some libraries from /usr/lib
or other system libraries. The libraries used may include math
functions, OCI calls, SQLNet, etc.
(Note: The lines above are formatted so that they are
readable in this document. When using your favorite UNIX
editor or "more"ing the tmpfile the line will link continuous.)
3) Remove (using your favorite editor) all references to cdemo
including the executable name, the object name and the "-o".
Also remove any references that include ostart.o, /bin, lsocket,
oln and olc (do not forget to remove the directory path
when removing oln or olc. Remember to preserve the order
of the libraries and not to remove any duplicate entries.
The new line should look as follows, once you have removed
these references (note: the list below is in readable format
for the purposes of this document; however, they will be
continuous in the actual tmpfile).
-L/gateways2/sco/oracle.7.1/lib
/gateways2/sco/oracle7.1/lib/libocic.a
/gateways2/sco/oracle7.1/lib/osntab.o
-lsqlnet -lora -lsqlnet -lora -lnlsrtl
-lcv6 -lcore -lnlsrtl -lcv6 -lcore
/gateways2/sco/oracle7.1/lib/olm.o
/gateways2/sco/oracle7.1/lib/old.o -lcore
4) Next, set the environment variable ORALIB to the library list you
have created at the command line or exit the tmpfile and include
the shell command to set the ORALIB value. This will depend on
the type of shell use are using. If you are using bourne you
need to set the environment variables as follows:
ORALIB="value"; export ORALIB
If you are using csh or ksh you set is this way:
setenv ORALIB="value"
example:
ORALIB="-L/gateways2/sco/oracle7.1/lib
/gateways2/sco/oracle7.1/lib/libocic.a
/gateways2/sco/oracle7.1/lib/osntab.o
-lsqlnet -lora -lsqlnet -lora -lnlsrtl -lcv6 -lcore
-lnlsrtl -lcv6 -lcore
/gateways2/sco/oracle7.1/lib/olm.o
/gateways2/sco/oracle7.1/lib/old.o -lcore";
export ORALIB.
NOTE: Please refer to your UNIX manual for setting environment
variables appropriately.
5) You should now be able to run the ldpro or ldorasrv
scripts that were generated by the PROBUILD utility..