Forum Stats

  • 3,854,668 Users
  • 2,264,397 Discussions


Statically build oci driver

I am trying to build an oci driver. It works fine dynamically, with But I wanted statically, and from my understanding I should generate and use the libclntst12.a.
But this library gives me undefined references, like this one:

/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../lib/libclntst.a(ippdcmerged_pdclzo_split_u8_ippsEncodeLZO_8u.o): In function `u8_ippsEncodeLZO_8u':

pdclzo_split_u8_ippsEncodeLZO_8u.i:(.text+0x79): undefined reference to `u8_ownEncodeLZO1X_asm'

Is there another library I need to use, or what should I do?



  • 44e74a9b-e5d8-4a87-8684-9bd3d7e40f37
    edited Dec 16, 2015 3:28PM

    I managed to use only static oracle libraries by importing -lclntst -lippsmerged -lippdcmerged, so now I only get these dynamic dependencies: =>  (0x00007fff007f0000) => /lib/x86_64-linux-gnu/ (0x00007f47f642e000) => /lib/x86_64-linux-gnu/ (0x00007f47f622a000) => /lib/x86_64-linux-gnu/ (0x00007f47f6021000) => /lib/x86_64-linux-gnu/ (0x00007f47f5e04000) => /lib/x86_64-linux-gnu/ (0x00007f47f5a44000)

    /lib64/ (0x00007f47f6735000)

    However if I try to compile statically I get this:

    /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../lib/libclntst.a(generic12_skgnfs.o): In function `skgnfs_bind':

    skgnfs.c:(text.unlikely+0xeb0): undefined reference to `bindresvport'

    Is there a way to solve this problem?

  • asy
    asy Member Posts: 285
    edited Jan 21, 2016 8:09AM

    (BTW: I ended up with a $ORACLE_HOME/lib/libclntst12.a of size zero. If I would have tried, I would have got undefined references like 'OCIEnvCreate', so that is not comparable to your problem. See Linux: Preferred method to link / locate libclnt(sh)?)

    I am interested why someone would want to link statically? I guess you are restricting to a certain client version (which may lead you into some trouble), but you hope to avoid the database client installations on target computers, are you?

This discussion has been closed.