Re: Upgrade Oracle, break your makefiles...

From: Thomas J. Kyte <tkyte_at_us.oracle.com>
Date: 1996/08/08
Message-ID: <3209eb68.1123866_at_dcsun4>#1/1


Here is the best way I know of creating a portable and upgradeable makefile:

include $(ORACLE_HOME)/proc/demo/proc.mk

PROFLAGS= ireclen=255 lines=yes $(PROC_ENV_FLAGS) \

                   include=$(ORACLE_HOME)/proc/lib
CFLAGS=-I. -g $(CC_ENV_FLAGS)


You fill in the SOURCE= and TARGET= in the makefile to specify what .pc files make up the project and what the executable name should be.

I then include the standard oracle makefile, for versions 7.0, 7.1, 7.2 found in
$ORACLE_HOME/proc/demo/proc.mk, in versoin 7.3 you would change to
$ORACLE_HOME/precomp/demo/proc/proc.mk.

The trick is to link in PROLDLIBS. The PROLDLIBS change from version to version. If you use this symbolic instead of a list of actual files, you will be able to maintain an easy upgrade path.

NOTE: LDFLAGS comes from the standard oracle makefile as well.

      PROFLAGS will be used by the precompiler, the proc.mk file ensures this
        I added PROC_ENV_FLAGS so I can change the PROFLAGS in the environment
        as well
      CFLAGS will be used by CC, the proc.mk file ensures this.
        I added CC_ENV_FLAGS so I can change them in the env. as well

I use the following sh script to build my programs:

----------------- procmk ------------------------------------
SRC=`echo *.pc`
TGT=`pwd | sed 's".*/""'`

echo SRC = $SRC
echo TGT = $TGT
echo Remember you can set PROC_ENV_FLAGS to pass things to ProC echo Remember you can set CC_ENV_FLAGS to pass things to CC

make -f /export/home/tkyte/bin/proc.mk "SOURCE=$SRC" "TARGET=$TGT"


This sh script assumes you are in a directory and all of the .pc files in that dirctory make up your program. It will name the TARGET after the current working directory and precompile/compile/link all of the .pc files in that directory.

On Wed, 07 Aug 1996 14:48:55 -0700, irvin_at_lmsc.lockheed.com (Tim Irvin) wrote:

>    Now that our export problem is out of the way in upgrading from
>Oracle 7.0.16 to 7.2.3 in an HPUX 9 environment, we need to fix at least
>one program which uses the OCI.
>
>    The linker, /bin/ld, comes back with many new unresolved symbols which
>were never a problem under 7.0.16.
>
>    Here's a sample of the unsatisfied symbols:
>
>lxmcpcx, lxhcrenv, lxlsaved, lxmopen, lxmcpen, ....
>
>There are about 50 unresolved symbols in all.  Maybe there are new libraries
>we have to use?  The documentation I saw might be good for gurus, but for
>someone who has just been thrust into this role rather suddenly, well,
>I don't know what to do....
>
>Actually, I can still compile if I set $ORACLE_HOME to the old 7.0.16
>stuff, and it runs fine under 7.2.3, but this is not an acceptable
>long-term solution.
>
>-- 
>Tim Irvin, HP-UX Miracle Worker and Oracle Guy
>Lockheed Martin Missiles and Space, Sunnyvale, California
>e-mail: irvin_at_lmsc.lockheed.com    voice:  (408) 742-0440
>************ all standard disclaimers apply ************

Thomas Kyte
Oracle Government
tkyte_at_us.oracle.com                          

http://govt.us.oracle.com -- Check out our web site! Brand new, uses Oracle Web Server and Database


statements and opinions are mine and do not necessarily reflect the opinions of Oracle Corporation Received on Thu Aug 08 1996 - 00:00:00 CEST

Original text of this message