[urgent] resolving myodbc crash

[urgent] resolving myodbc crash

am 01.04.2006 18:54:38 von sunil arora

Hi folks,
This is my first post to this list.

We are trying to port mysql-connector-odbc on SFU environment. SFU is
a unix like environment which is installed as POSIX subsystem on
windows. This subsystem is called Interix. It has GNU's build system.

I was able to build both libmysqlclient_r.a and libmyodbc3.a ( the
static libraries only).
I have compiled libmysqlclient_r.a from mysql-4.1.15 (package) and
myodbc drivers are from the latest stable source 3.51.12.
Following is the configure command I have used for configuring the
mysql-4.1.15 for building the libraries.
../configure --prefix=3D/usr/local/mysql --without-server --with-pic
--with-pthread --enable-thread-safe-client
We are using gnu gcc3.3 for building this library but somehow
configure script says this "ld" doesn't shared library.

Following the configure command I used for building the mysql-connector sou=
rce
../configure --prefix=3D/usr/local/myodbc
--with-unixODBC=3D/usr/local/unixODBC
--with-unixODBC-includes=3D/usr/local/unixODBC/include
--with-unixODBC-libs=3D/usr/local/unixODBC/lib
--with-mysql-path=3D/usr/local/mysql/ --with-gnu-ld=3Dyes
--enable-thread-safe --enable-shared --enable-gui=3Dno
--with-samples=3Dno --enable-test=3Dno

Since its not able to build shared library with this compiler set, I
made shared libraries manually with this command.

gcc -shared -o .libs/libmyodbc3_r.so *.o ../util/*.o
-L/usr/local/mysql/lib/mysql/ -L/usr/local/unixODBC/lib/ -lodbcinst
=96lmysqlclient_r -lz -lc -lpthread

I used to unixODBC's isql utility to check the connectivity with a
test dsn ( we are using mysql-4.1 server) and myodbc's driver's got
invoked and SQLConnect got initiated but very soon it got core dump
with "illegal instruction".

Here are some of the details:

bash-3.00$ ./isql -v test
Illegal instruction (core dumped)

When I run it through gdb, it list following trace.
Program received signal SIGILL, Illegal instruction.

0x00857da0 in cs_value () at /tmp/cczLMK6t.s:12
12 /tmp/cczLMK6t.s: No such file or directory.
in /tmp/cczLMK6t.s
Current language: auto; currently asm
(gdb) bt
#0 0x00857da0 in cs_value () at /tmp/cczLMK6t.s:12
#1 0x0085c988 in my_xml_parse () at /tmp/cczLMK6t.s:12
#2 0x00857909 in my_parse_charset_xml () at /tmp/cczLMK6t.s:12
#3 0x0084ec49 in init_available_charsets () at /tmp/cczLMK6t.s:12
#4 0x0084e4a1 in get_charset_by_csname () at /tmp/cczLMK6t.s:12
#5 0x0084a6e8 in mysql_real_connect () at /tmp/cczLMK6t.s:12
#6 0x00834ce7 in SQLConnect () at /tmp/cczLMK6t.s:12
#7 0x1000c03e in SQLConnect (connection_handle=3D0x1474e0,
server_name=3D0x81fe18 "test", name_length1=3D-3, user_name=3D0x81fce8 "",
name_length2=3D-3, authentication=3D0x81fbb8 "", name_length3=3D-3) at
SQLConnect.c:3721
#8 0x00401ce2 in OpenDatabase (phEnv=3D0x409058, phDbc=3D0x40905c,
szDSN=3D0x81fe18 "test", szUID=3D0x81fce8 "", szPWD=3D0x81fbb8 "") at
isql.c:262
#9 0x004018a2 in main (argc=3D3, argv=3D0x1077c) at isql.c:128

Though, gdb's output is not correct because compiler optimization has
already confused gdb.

Any Idea wht could be going wrong here ?

-sunil

--
MySQL ODBC Mailing List
For list archives: http://lists.mysql.com/myodbc
To unsubscribe: http://lists.mysql.com/myodbc?unsub=3Dgcdmo-myodbc@m.gmane.o rg