ivan stojic
life is a low fidelity experience

Tora on Debian doesn’t work with Oracle Client 10.2

November 29th, 2007, 13:57.

It seems that there’s something seriously broken on Debian regarding Tora and Oracle.

To be specific, Debian’s Tora package depends on iODBC, which in turn doesn’t seem to work with Oracle’s Linux client. The resulting situation is that the Oracle’s driver screams this:

1: SQLDriverConnect = [iODBC][Driver Manager]/opt/instantclient_10_2/libsqora.so.10.1: undefined symbol: bcuMsgBoxError (0) SQLSTATE=00000

I’ve traced this to the fact that UnixODBC exposes a bcuMsgBoxError function, which doesn’t seem to exist in iODBC.

Now the question is, can I manually unpin Tora from using iODBC without recompiling it. I’m currently working on finding this out. I hope it works out because I would really love to use Tora on Linux.

Technorati Tags: , , , , ,

One Response to "Tora on Debian doesn’t work with Oracle Client 10.2"

Hugh Williams:

Hi Ivan,

By default iODBC uses the RTLD_NOW argument to the dlopen function to
make sure all symbols can be referenced in the target driver. It is
clear the new Oracle ODBC driver on Linux is missing a symbol, so
iODBC refuses to load the driver.

We can change iODBC to use RTLD_LAZY which delays the referencing of
symbols until they are actually used. As long as this missing symbol
is not called from any of the ODBC API functions, you should
not have a problem. However it could lead to an application crash on
some systems if that function is somehow called at some stage, so its
something Oracle should really resolve.

Here is the patch for iODBC 3.52.4 current release, to enable it to be recompiled to use ‘Lazy Loading’ which is what UnixODBC must be using. On older versions this file was located in iodbc/dlf.h.

Index: iodbcinst/dlf.h
===================================================================
RCS file: /opldev/source/CVS-MASTER/iODBC/iodbcinst/dlf.h,v
retrieving revision 1.2
diff -u -r1.2 dlf.h
— iodbcinst/dlf.h 20 Jan 2006 15:58:35 -0000 1.2
+++ iodbcinst/dlf.h 11 May 2006 11:12:54 -0000
@@ -234,7 +234,7 @@
#define RTLD_LAZY 1
#endif

-#ifdef RTLD_NOW
+#ifdef NO_RTLD_NOW
#define OPL_DL_MODE (RTLD_NOW | RTLD_LOCAL)
#else
#define OPL_DL_MODE (RTLD_LAZY | RTLD_LOCAL)

This patch makes sure the load mode is set to RTLD_LAZY.

Best Regards,
Hugh Williams
Professional Services
OpenLink Software

 

Leave a Reply