Oracle FAQ Your Portal to the Oracle Knowledge Grid

Home -> Community -> Usenet -> c.d.o.server -> Re: Library question and problem on Oracle on AIX

Re: Library question and problem on Oracle on AIX

From: Prakash Ranganathan <>
Date: 19 Jul 2002 07:40:02 -0700
Message-ID: <>

> 1/ The first one, is why the OCI libraries being provided as .a and
> not .so?
> This is true for both AIX Client and Basically a .a
> is an
> archive of a .o whith added entry points. If I extract the .o with ar,
> I can
> then call dynamically the library normally as I would in a Linux
> system.
> Is this the normal policy for AIX system, how are we expected to call
> dynamically the library wihout have to link the application with all
> possibles versions of the library first (in fact in the same
> application we are calling dynimacally either the Oracle OCI or DB2
> client or Sybase ct/lib.

On AIX, ".a" does not mean it is static library and all it says  is, it is an archive file, which can contain "sharedobject and/or static objects". if you are taking libc.a, which contain "shr.o" shared object as well as static object. You can extract shared object from the archive file and use it as a dynamic library.

> 2/ On AIX with the follwing sample c program, I get an SIGILL signal
> error
> at the end of the program after the end (long after the main) in the
> __exit
> when the deallocation of resources are done. I reduced it to a sample
> test
> case program to isolate the problem. Any idea of what is wrong,
> something I
> should do and I don't ?
> The server titanium is a 8.0.5 (but this is repeatable on any Oracle
> DBMS) and can be called OK from the AIX 5
> client.
> #include <dlfcn.h>
> int main()
> {
> void *hDll;
> void *pfnorlon, *pfnologof, *pfnocof;
> char ociLda [1024];
> char ociHda [256];
> int rc;
> hDll = dlopen("libclntsh.o", RTLD_NOW);
> pfnorlon = dlsym(hDll, "orlon");
> pfnologof = dlsym(hDll, "ologof");
> pfnocof = dlsym(hDll, "ocof");
> /* Connection */
> rc = ((int (*)(char*, char*, char*, int, void*, int,
> int))pfnorlon)(ociLda, ociHda,
> "system/manager_at_titanium", -1, 0, -1, 0);
> rc = ((int (*) (char*))pfnologof)(ociLda);
> dlclose(hDll);
> }
> Any ideas ?



    I suspect some of the library which your program requires might     got unloaded, check the libraries loaded before/after dlclose and     in the corefile.


    Check your order libraries while building the application, libc.a/libC.a     should come first. Received on Fri Jul 19 2002 - 09:40:02 CDT

Original text of this message