Pro-C and ORACLE_HOME weirdness

From: Sten J. Olsson <stolsson_at_cis.clarion.edu>
Date: 25 Jun 2002 17:29:17 -0700
Message-ID: <a5da5092.0206251629.2586cbe0_at_posting.google.com>


I'm having a problem getting the Pro-C precompiler to work when $ORACLE_HOME is a UNIX symbolic link.

If I set ORACLE_HOME to real directory where ORACLE resides, proc works:
// BEGIN UNIX shell output
cmmgr_at_tower02:/skyline/surface.dev.22/bip/bdb/src
=> ls -ld /oracle

drwxr-xr-x 56 oracle oinstall 1536 Jun 18 19:40 /oracle/ cmmgr_at_tower02:/skyline/surface.dev.22/bip/bdb/src
=> export ORACLE_HOME=/oracle

cmmgr_at_tower02:/skyline/surface.dev.22/bip/bdb/src
=> make -ef *.mak base_db.o

proc sqlcheck=full user=cdm/atm_cdm code=cpp iname=base_db

Pro*C/C++: Release 9.0.1.0.0 - Production on Tue Jun 25 23:58:43 2002

(c) Copyright 2001 Oracle Corporation. All rights reserved.

System default option values taken from: /oracle/precomp/admin/pcscfg.cfg
// END UNIX shell output

If I set ORACLE_HOME to the symbolic link to the real directory and proc does not work:
// BEGIN UNIX shell output
cmmgr_at_tower02:/skyline/surface.dev.22/bip/bdb/src
=> ls -ld /til/oracle

lrwxrwxrwx 1 cmmgr cmmgr 7 Jun 25 23:28 /til/oracle -> /oracle/
cmmgr_at_tower02:/skyline/surface.dev.22/bip/bdb/src
=> export ORACLE_HOME=/til/oracle

cmmgr_at_tower02:/skyline/surface.dev.22/bip/bdb/src
=> make -ef *.mak base_db.o

proc sqlcheck=full user=cdm/atm_cdm code=cpp iname=base_db

Pro*C/C++: Release 9.0.1.0.0 - Production on Wed Jun 26 00:01:42 2002

(c) Copyright 2001 Oracle Corporation. All rights reserved.

System default option values taken from: /til/oracle/precomp/admin/pcscfg.cfg

PCC-F-02104, Unable to connect to Oracle *** Error code 1
make: Fatal error: Command failed for target `base_db.o' // END UNIX shell output

Here is the output of uname -a:
SunOS tower02 5.8 Generic_108528-13 sun4u sparc SUNW,Sun-Blade-1000

and from the PROC output above, I'm using ORACLE 9.0.1.0.0

Any idea why ORACLE cares if I give it a symbolic link for ORACLE_HOME? BTW, I also tried //oracle instead of /oracle and it doesn't let you have //oracle (is it comparing the string or something???) /oracle != //oracle and /oracle != /./oracle

On a related but separate issue, it does not seem possible to set the ORACLE_HOME that proc uses from the command line (ie via command line option to proc) I'm trying to avoid having the developer set a bunch of environment variables if possible, but it looks like setting this variable in the build environment is the only way to get this to work (as opposed to setting it in a "system" makefile where we have all other commercially available software locations defined) For example for Rogue Wave, X11, and a few others we have their locations set in a system makefile so that if they ever change 20 developers wouldn't have to update all their .profile. Also since these locations sometimes change based on different OS and we build on several different OSs, it's nice to have this sort of thing.

An option to proc like:
proc sqlcheck=full user=cdm/atm_cdm code=cpp iname=base_db oracle_home=/til/oracle

Would be nice... Received on Wed Jun 26 2002 - 02:29:17 CEST

Original text of this message