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 -> Statically linking external routines

Statically linking external routines

From: Peter Kühn <peter.m.kuehn_at_t-online.de>
Date: Sun, 08 Oct 2000 20:49:06 +0200
Message-ID: <39E0C1A2.99877C25@t-online.de>

Hi

we have a problem with the restrictions concerning external routines as described in the Oracle Administrators Guide:

...
Be aware that the external library (DLL file) must be statically linked. In other words, it must not reference any external symbols from other external libraries (DLL files). These symbols are not resolved and can cause your external procedure to fail. ...

our shared lib will be created as:

cc -c -I. -I/opt/mqm/inc -I../../inc -I../api/include - I../../kis_client -o kexport.o kexport.c ld -G -L/opt/oracle/product/8.1.6/lib -L/opt/mqm/lib - R/opt/oracle/product/8.1.6/lib -R/opt/mqm/lib -o libkexport.so kexport.o

according to the limitations above, the error message below by calling a function from that lib is just clear to me:

ORA-06520: PL/SQL: Error loading external library ORA-06522: ld.so.1: extprocextproc_VDBMI_816: fatal: relocation error: file
/opt/vdora/lib/libkexport.so: symbol MQPUT: referenced symbol not found

ORA-06512: at "KEXPORT.KEXPORT", line 109
ORA-06512: at "KEXPORT.KEXPORT", line 968
ORA-06520: PL/SQL: Error loading external library
ORA-06522: ld.so.1: extprocextproc_VDBMI_816: fatal: relocation error:
file
/opt/vdora/lib/libkexport.so: symbol MQPUT: referenced symbol not found

I'm not a shared libraries Guru (SUN Solaris), so I have the the following questions:

  1. Our third party libraries (IBM MQ Series) are all shared libs, so is there any way/tool converting these into static archive libs. What about further dependencies like socket lib...
  2. What is the reason for this restriction that makes external routines pretty useless :-(((
  3. libc and the Oracle libs are also shared objects. Why is calling functions from there not a problem? Is there any workaround by using special linker switches for our shared lib (libkexport.so)?
  4. if there is no way to get my lib to work, what should I do instead - dbms_pipe ?

Please help
Thank you in advance

Peter Kuehn Received on Sun Oct 08 2000 - 13:49:06 CDT

Original text of this message

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