aam / oracledart

Let Dart talk to Oracle
BSD 2-Clause "Simplified" License
11 stars 2 forks source link

Using Oracle 12.1 on Linux #27

Closed austincummings closed 9 years ago

austincummings commented 9 years ago

Hey @aam,

Just quickly I was wondering if it is possible to use this package on Linux with Oracle 12.1?

Thanks!

aam commented 9 years ago

Hi,

I don't remember whether I tried with Oracle 12.1 on Linux or not. I think I gave it a try with 11.2 and it worked so I didn't explore it further. I can't think of any reasons why it should not.

Alex.

austincummings commented 9 years ago

Here's what ldd shows when I use Oracle 11.1

austin@psyche ~/dev/webquery/DR-489/src/packages/oracledart/src $ ldd liboracledart_native_extension.so
        linux-gate.so.1 =>  (0x009a0000)
        libocci.so.11.1 => /usr/lib/oracle/11.2/client/lib/libocci.so.11.1 (0x00eab000)
        libclntsh.so.11.1 => /usr/lib/oracle/11.2/client/lib/libclntsh.so.11.1 (0xf5730000)
        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00da1000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00cd3000)
        libc.so.6 => /lib/libc.so.6 (0x00352000)
        libm.so.6 => /lib/libm.so.6 (0x001d9000)
        libnnz11.so => /usr/lib/oracle/11.2/client/lib/libnnz11.so (0x004e9000)
        libdl.so.2 => /lib/libdl.so.2 (0x00203000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x00208000)
        libnsl.so.1 => /lib/libnsl.so.1 (0x00ae8000)
        libaio.so.1 => /lib/libaio.so.1 (0x00879000)
        /lib/ld-linux.so.2 (0x00b32000)

And here's what it says when I use Oracle 12.

austin@psyche ~/dev/webquery/DR-489/src/packages/oracledart/src $ ldd liboracledart_native_extension.so
        linux-gate.so.1 =>  (0x0072d000)
        libocci.so.11.1 => not found
        libclntsh.so.11.1 => not found
        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x002dd000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00d96000)
        libc.so.6 => /lib/libc.so.6 (0x003c8000)
        libm.so.6 => /lib/libm.so.6 (0x00976000)
        /lib/ld-linux.so.2 (0x00b32000)

It appears that the .so is only compatible with Oracle instantclient 11.1.

Is there any way I could get a build that works with 12?

Edit: If you're too busy to make another build, could you help me out with building it myself?

aam commented 9 years ago

Yes, right. I will clone existing linux build to use Oracle 12 instead of Oracle 11.

aam commented 9 years ago

You certainly can build oracledart yourself - the scripts are in tools/ folder, the first step is in "To Build" section in README.md. If you look at the Linux(and Mac) sections you can see that version of instant client is hardcoded to be 11.2. You might want to start with that first, make sure that it works for you and then change it 12.1.

aam commented 9 years ago

Can you give https://github.com/aam/oracledart_dist/blob/master/lib/src/liboracledart_native_extension_12_1.so a try to see if it works for you?

aam commented 9 years ago

I'm building and packaging 12.1 binary, so this should be addressed.