Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> External functions and SHLIB_PATH

External functions and SHLIB_PATH

From: Steve Baldwin <steven.baldwin_at_hancorp.com.au>
Date: Tue, 21 Sep 1999 10:45:57 +1000
Message-ID: <7s6klk$p1b$1@perki.connect.com.au>


Hi,

I have a situation where I have an external function which makes a call to another 'C' shared library. I'm working on HP-UX (10.20), which gives a link option to search an environment variable SHLIB_PATH at run time when loading shared libraries. The problem I have is when I build my external functions and then copy them to another machine with a different directory structure, they fail to load when I reference them from SQL.

I then thought it may be because the SHLIB_PATH environment variable of the extproc process (ie the process that actually executes the external function) was not set up correctly. So, I wrote a small external function that dumped the Unix environment variables to a file. Sure enough, there was a minimal environment which didn't even contain a SHLIB_PATH environment variable. Since that process is started by Oracle, rather than my own Unix session, that was what I was expecting. My next step was to write my own sessions environment variables to a file, and then read that file in an external function, and create the environment variables (using putenv) to mirror my user session. I then figured any subsequent invocations of external functions would use the new environment. Unfortunately I figured wrong. The environment variables seemed to be set up fine, but it made no difference. The external function still wouldn't load on the other machine.

Is there any way I can get my external functions to execute on the 'other' machine without copying object files over, and re-linking on that machine ??

Your help is much appreciated.

Steve Baldwin

P.S.
Please 'cc' me on steven.baldwin_at_hancorp.com.au as well as posting back to the group. Received on Mon Sep 20 1999 - 19:45:57 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US