Forum Stats

  • 3,854,668 Users
  • 2,264,397 Discussions
  • 7,905,749 Comments

Discussions

Statically build oci driver

I am trying to build an oci driver. It works fine dynamically, with libclntsh.so.12.1. 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?

Thanks.

Answers

  • 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:


    linux-vdso.so.1 =>  (0x00007fff007f0000)

    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f47f642e000)

    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f47f622a000)

    librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f47f6021000)

    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f47f5e04000)

    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f47f5a44000)

    /lib64/ld-linux-x86-64.so.2 (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?

    44e74a9b-e5d8-4a87-8684-9bd3d7e40f37
  • 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.