Bug #9658 Unresolved symbol 'my_init' in ODBC 3.5.11 connection to MYSQL
Submitted: 5 Apr 2005 18:22 Modified: 6 Apr 2005 6:40
Reporter: Pari Rajaram Email Updates:
Status: Duplicate Impact on me:
None 
Category:Connector / ODBC Severity:S1 (Critical)
Version:ODBC 3.5.11 OS:HP/UX (HPUX 11.11)
Assigned to: CPU Architecture:Any

[5 Apr 2005 18:22] Pari Rajaram
Description:
Hi,

I get this when I connect to mysql 4.1.7 server via ODBC client. 

ODBC Driver is the latest 3.5.11. I also tried with 3.5.10, 3.5.07 and I get the same response. 

# ./bin/isql -v
/usr/lib/dld.sl: Unresolved symbol: my_init (code)  from /project/MATRIXONE/mysql/pari3/MyODBC-3.51.11-hp-hpux11.11-hppa2.0w-64bit/lib/libmyodbc3-3.51.11.sl
Abort (core dumped)

I workaround this unresolved symbol by creating a dummy my_init code and making a shared library and LD_PRELOADing it. If I do that, I get another unresolved symbol.

# setenv LD_PRELOAD /project/MATRIXONE/mysql/db/odbc/my.sl  << fake library preloaded. 
# ./bin/isql -v
my_init initialized
/usr/lib/dld.sl: Unresolved symbol: int2str (code)  from /project/MATRIXONE/mysql/pari3/MyODBC-3.51.11-hp-hpux11.11-hppa2.0w-64bit/lib/libmyodbc3-3.51.11.sl
Abort (core dumped)

Anyways, I am curious how my_init symbol was left out of the shared libraries and is there a resolution to this? Has anyone had similar problems and how did they overcome it.

Thanks.
Pari

How to repeat:
# ./bin/isql -v
/usr/lib/dld.sl: Unresolved symbol: my_init (code)  from /project/MATRIXONE/mysql/pari3/MyODBC-3.51.11-hp-hpux11.11-hppa2.0w-64bit/lib/libmyodbc3-3.51.11.sl
Abort (core dumped)
[7 Apr 2005 16:42] Pari Rajaram
I see the status as duplicate. Is there a resolution to this problem?

Thanks.
Pari
Hewlett-Packard
[11 Apr 2005 18:51] Pari Rajaram
1. I found my_init and int2str symbol defined in libmysqlclient.sl and libmysqlclient.a in mysql/lib directory. For some reason its not picking these symbols from libmysqlclient.sl via SHLIB_PATH. 

Hence I force load it via
setenv LD_PRELOAD <path to libmysqlclientl.sl>/libmysqlcleint.sl 

2. Folks who get mmap errors during loading the driver libraries should chatr the libraries to disable absolute static path built into the library.

chatr +b disable +s enable -l /home/mysqldev/.../libmyodbc3-3.51.11.sl  <path to drive lib>/libmyodbc3-3.51.11.sl

Pari
Hewlett-Packard
[30 Mar 2006 14:19] Sergio Lob
I have the same exact problem with 3.5.12 on hpux platforms. Its been a year and no action has ever been taken on this? my_init is apparently defined in libmysqlclient.a . Is there a shared library version of this file available ?
[30 Mar 2006 15:18] Sergio Lob
On other platform installations, my_init() code seems to be defined within shared library libmyodbc3.sl . On hpux, my_init() is NOT defined within libmyodbc3.sl. This seems to be a packaging error in build of libmyodbc3.sl on hpux.
[5 Sep 2006 17:47] Tonci Grgin
Duplicate of BUG #7865