[Mono-dev] 64 bit ODBC problem?

Mads Bondo Dydensborg mbd at dbc.dk
Fri Mar 7 08:51:14 EST 2008


Hi there

I am trying to use a Sybase ASA 64 bit databaseserver on an 64 bit machine, 
but have problems with it.

Platform:

$ cat /etc/debian_version
4.0

$ uname -a
Linux nikko 2.6.18-5-amd64 #1 SMP Sat Dec 22 20:43:59 UTC 2007 x86_64 
GNU/Linux

$ cat /proc/cpuinfo
processor       : 0
vendor_id       : AuthenticAMD
cpu family      : 15
model           : 33
model name      : Dual Core AMD Opteron(tm) Processor 270

(snippet, 4 cores in total)

$ mono --version
Mono JIT compiler version 1.9 (/trunk/ r96530)
Copyright (C) 2002-2007 Novell, Inc and Contributors. www.mono-project.com
        TLS:           __thread
        GC:            Included Boehm (with typed GC)
        SIGSEGV:       altstack
        Notifications: epoll
        Architecture:  amd64
        Disabled:      none

$ file /usr/local/mono-svn/bin/mono
/usr/local/mono-svn/bin/mono: ELF 64-bit LSB executable, AMD x86-64, version 1 
(SYSV), for GNU/Linux 2.6.0, dynamically linked (uses shared libs), for 
GNU/Linux 2.6.0, not stripped

$ file /usr/lib/libodbc.so.1.0.0
/usr/lib/libodbc.so.1.0.0: ELF 64-bit LSB shared object, AMD x86-64, version 1 
(SYSV), stripped

And, here is my crash:
$ MONO_LOG_LEVEL="debug" MONO_LOG_MASK="dll" mono --debug 
Bin/Debug/DBC.CheckOut.exe
Connecting to database:  'dbc.data.checkout'/'DBA'/'SQL'
Mono-INFO: DllImport attempting to load: 'libodbc.so'.
Mono-INFO: DllImport loading location: 'libodbc.so.so'.
Mono-INFO: DllImport error loading library: 'libodbc.so.so: cannot open shared 
object file: No such file or directory'.
Mono-INFO: DllImport loading library: './libodbc.so.so'.
Mono-INFO: DllImport error loading library './libodbc.so.so: cannot open 
shared object file: No such file or directory'.
Mono-INFO: DllImport loading: 'libodbc.so'.
Mono-INFO: Searching for 'SQLAllocHandle'.
Mono-INFO: Probing 'SQLAllocHandle'.
Mono-INFO: Found as 'SQLAllocHandle'.
Mono-INFO: DllImport attempting to load: 'libodbc.so'.
Mono-INFO: DllImport loading location: 'libodbc.so.so'.
Mono-INFO: DllImport error loading library: 'libodbc.so.so: cannot open shared 
object file: No such file or directory'.
Mono-INFO: DllImport loading library: './libodbc.so.so'.
Mono-INFO: DllImport error loading library './libodbc.so.so: cannot open 
shared object file: No such file or directory'.
Mono-INFO: DllImport loading: 'libodbc.so'.
Mono-INFO: Searching for 'SQLSetEnvAttr'.
Mono-INFO: Probing 'SQLSetEnvAttr'.
Mono-INFO: Found as 'SQLSetEnvAttr'.
Mono-INFO: DllImport attempting to load: 'libodbc.so'.
Mono-INFO: DllImport loading location: 'libodbc.so.so'.
Mono-INFO: DllImport error loading library: 'libodbc.so.so: cannot open shared 
object file: No such file or directory'.
Mono-INFO: DllImport loading library: './libodbc.so.so'.
Mono-INFO: DllImport error loading library './libodbc.so.so: cannot open 
shared object file: No such file or directory'.
Mono-INFO: DllImport loading: 'libodbc.so'.
Mono-INFO: Searching for 'SQLConnect'.
Mono-INFO: Probing 'SQLConnect'.
Mono-INFO: Found as 'SQLConnect'.
Mono-INFO: DllImport attempting to load: 'libodbc.so'.
Mono-INFO: DllImport loading location: 'libodbc.so.so'.
Mono-INFO: DllImport error loading library: 'libodbc.so.so: cannot open shared 
object file: No such file or directory'.
Mono-INFO: DllImport loading library: './libodbc.so.so'.
Mono-INFO: DllImport error loading library './libodbc.so.so: cannot open 
shared object file: No such file or directory'.
Mono-INFO: DllImport loading: 'libodbc.so'.
Mono-INFO: Searching for 'SQLDriverConnect'.
Mono-INFO: Probing 'SQLDriverConnect'.
Mono-INFO: Found as 'SQLDriverConnect'.
Stacktrace:

  at (wrapper managed-to-native) System.Data.Odbc.libodbc.SQLConnect 
(intptr,string,int16,string,int16,string,int16) <0x000e7>
  at (wrapper managed-to-native) System.Data.Odbc.libodbc.SQLConnect 
(intptr,string,int16,string,int16,string,int16) <0xffffffff>
  at System.Data.Odbc.OdbcConnection.Open () [0x001b8] 
in /home/madsdyd/Compile/Mono/mcs/class/System.Data/System.Data.Odbc/OdbcConnection.cs:376
  at DBC.ORM.SybaseODBCProvider.DBC.ORM.IProvider.Connect 
(string,string,string) [0x000ab] 
in /home/madsdyd/xintegra/trunk/Components/DBC.ORM/Providers/SybaseODBCProvider.cs:75
  at DBC.ORM.Broker.Connect (string,string,string) [0x00011] 
in /home/madsdyd/xintegra/trunk/Components/DBC.ORM/Broker/Broker.cs:108
  at DBC.ORM.BrokerFactory.Create () [0x00020] 
in /home/madsdyd/xintegra/trunk/Components/DBC.ORM/Broker/BrokerPool.cs:41
  at DBC.Common.ThreadAccessPool`1..ctor (DBC.Common.IPoolFactory`1,int,int) 
[0x000c3] 
in /home/madsdyd/xintegra/trunk/Components/DBC.Common/ThreadAccessPool.cs:117
  at DBC.ORM.BrokerPool..ctor (int,string,string,string) [0x00000] 
in /home/madsdyd/xintegra/trunk/Components/DBC.ORM/Broker/BrokerPool.cs:63
  at DBC.CheckOut.CheckOut..ctor () [0x00062] 
in /home/madsdyd/xintegra/trunk/Applications/DBC.CheckOut/CheckOut.cs:356
  at DBC.CheckOut.MainClass.Main (string[]) [0x00060] 
in /home/madsdyd/xintegra/trunk/Applications/DBC.CheckOut/Main.cs:56
  at (wrapper runtime-invoke) 
DBC.CheckOut.MainClass.runtime_invoke_void_string[] 
(object,intptr,intptr,intptr) <0xffffffff>

Native stacktrace:

        mono [0x52b961]
        mono [0x442afd]
        /opt/sybase/SYBSsa9/lib64/libdbtasks9_r.so [0x2aaaacb79738]
        /lib/libpthread.so.0 [0x2ac0f213d410]
        /lib/libc.so.6(strcmp+0) [0x2ac0f243afe0]
        /opt/sybase/SYBSsa9/lib64/libdbodbc9_r.so [0x2aaaaca1dd7e]
        /opt/sybase/SYBSsa9/lib64/libdbodbc9_r.so [0x2aaaaca0661a]
        /opt/sybase/SYBSsa9/lib64/libdbodbc9_r.so [0x2aaaaca06839]
        /opt/sybase/SYBSsa9/lib64/libdbodbc9_r.so [0x2aaaaca06981]
        /opt/sybase/SYBSsa9/lib64/libdbodbc9_r.so [0x2aaaaca0ebde]
        /opt/sybase/SYBSsa9/lib64/libdbodbc9_r.so [0x2aaaac9c1a50]
        /opt/sybase/SYBSsa9/lib64/libdbodbc9_r.so [0x2aaaac99efb6]
        /opt/sybase/SYBSsa9/lib64/libdbodbc9_r.so [0x2aaaac9a1260]
        /opt/sybase/SYBSsa9/lib64/libdbodbc9_r.so(SQLAllocHandle+0xd1) 
[0x2aaaac9a1551]
        /opt/sybase/SYBSsa9/lib/libdbodbc9.so(SQLAllocHandle+0x122) 
[0x2aaaac870cf2]
        /usr/lib/libodbc.so [0x2aaaac50e612]
        /usr/lib/libodbc.so(SQLConnect+0x4aa) [0x2aaaac50edca]
        [0x40268ed7]

Any help greatly appreciated.

Regards

Mads

-- 
Med venlig hilsen/Regards

Systemudvikler/Systemsdeveloper cand.scient.dat, Ph.d., Mads Bondo Dydensborg
Dansk BiblioteksCenter A/S, Tempovej 7-11, 2750 Ballerup, Tlf. +45 44 86 77 34



More information about the Mono-devel-list mailing list