I guess libodbc.so is the one you renamed from libodbchive.so? If so can you ldd libodbc.so and see what other .so files are linked? You can follow the links and do the ldd check for all necessary .so files (libodbchive.so, libhiveclient.so and libthrift.so). Also please make sure all these .so files are compiled to compatible architecture (i.e., all 32-bit or 64-bit) as mentioned in the Hive ODBC wiki.
On Jan 5, 2011, at 10:51 PM, vaibhav negi wrote: > HI Ning , > > output of ldd isql is :- > > [r...@vmlinux3 ~]# ldd /usr/local/bin/isql > linux-gate.so.1 => (0x00d7a000) > libodbc.so.1 => /usr/local/lib/libodbc.so.1 (0x0045c000) > libdl.so.2 => /lib/libdl.so.2 (0x00548000) > libreadline.so.5 => /usr/lib/libreadline.so.5 (0x005ea000) > libncurses.so.5 => /usr/lib/libncurses.so.5 (0x036b1000) > libpthread.so.0 => /lib/libpthread.so.0 (0x0054e000) > libc.so.6 => /lib/libc.so.6 (0x00110000) > /lib/ld-linux.so.2 (0x003b9000) > [r...@vmlinux3 ~]# > > Is there any missing library here? > > Thanks and regards > > Vaibhav Negi > > > On Thu, Jan 6, 2011 at 12:17 AM, Ning Zhang <nzh...@fb.com> wrote: > >> It looks like isql cannot find the dynamically linked libraries. Can you >> ldd isql and see if all dynamically linked libraries are correct? >> >> On Jan 5, 2011, at 5:29 AM, vaibhav negi wrote: >> >>> Hi Carl, >>> >>> Downloaded the patched version of unixODBC from the given link and >>> installed successfully . libodbchive.so gets generated in /usr/local/lib >> . >>> But still the error persists. >>> >>> error output when i run isql hive >>> >>> [-----]SQL_SUCCESS >>> [-----]hEnv = $09BF20A0 phDbc = $0804E2FC >>> [-----]SQL_SUCCESS >>> [ISQL]ERROR: Could not SQLConnect >>> >>> I tried following commands also-- >>> >>> export >>> >> LD_LIBRARY_PATH=/usr/local/lib/libodbchive.so:/usr/local/lib/libhiveclient.so:/usr/local/lib/libthrift.so >>> >>> export LD_PRELOAD=/usr/local/lib/libodbchive.so >>> >>> I think i am missing something very important. >>> >>> Do i need to copy files in /usr/local/lib/ to /lib ? >>> >>> Thanks and Regards >>> Vaibhav Negi >>> >>> >>> On Wed, Jan 5, 2011 at 3:39 PM, Carl Steinbach <c...@cloudera.com> >> wrote: >>> >>>> Hi Vaibhav, >>>> >>>> >>>>> i cannot find libodbchive.so in /usr/local/lib . So i defined odbc hive >>>>> driver as libodbc.so . Is that the problem? >>>>> >>>>> >>>> libodbc.so is the ODBC DriverManager library provided by unixODBC. You >>>> should >>>> not rename or symlink this file. I think your problem is that you forgot >> to >>>> patch >>>> the unixODBC library before building it. The patch attached to HIVE-1101 >>>> must >>>> be applied to the unixODBC-2.2.14 source tree before you build it. This >>>> patch contains >>>> the code and Makefile changes that cause unixODBC to build >> libhiveodbc.so >>>> >>>> Thanks. >>>> >>>> Carl >>>> >> >>