Sorry about the rant.. I've been spending the last two days trying to 
install gcc, MySQL, MyODBC and UnixODBC on several AIX and HP boxes with 
varying degrees of success and lots of aggravation (much of it due to 
braindead configure scripts that ALWAYS want to leave gcc arguments around 
when NOT using gcc!).. Anyway, I was able to get MyODBC built *late* last 
night and this morning found that I was getting the following error when 
trying to run a program that was using MyODBC (3.51.03) via UnixODBC 
(2.2.2):

% ./test-program
/usr/lib/dld.sl: Unresolved symbol: _db_enter_ (code)  from 
/usr/local/unixodbc/lib/libmyodbc3-3.51.03.sl
Abort

If I do a "chatr" on libmyodbc3-3.51.03.sl, I get the following :

% chatr /usr/local/unixodbc/lib/libmyodbc3-3.51.03.sl
/usr/local/unixodbc/lib/libmyodbc3-3.51.03.sl:
         shared library
         shared library dynamic path search:
             SHLIB_PATH     disabled  first
             embedded path  disabled  second Not Defined
         internal name:
             libmyodbc3-3.51.03.sl
         shared vtable support disabled
         static branch prediction disabled
         executable from stack: D (default)
         kernel assisted branch prediction enabled
         lazy swap allocation disabled
         text segment locking disabled
         data segment locking disabled
         third quadrant private data space disabled
         fourth quadrant private data space disabled
         third quadrant global data space disabled
         data page size: D (default)
         instruction page size: D (default)
         nulptr references disabled

Notice that it has NO DEPENDENCIES on libmysqlclient.sl.. Also notice that 
if I do the
following, that I'm missing ALL references to stuff in the aforementioned 
client lib :

% nm -u /usr/local/unixodbc/lib/libmyodbc3-3.51.03.sl
... [some output chopped for brevity sake ]
my_SQLAllocConnect
my_SQLAllocEnv
my_SQLAllocStmt
my_SQLBindParameter
my_SQLDisconnect
my_SQLDriverConnect
my_SQLExecute
my_SQLExtendedFetch
my_SQLFreeConnect
my_SQLFreeEnv
my_SQLFreeStmt
my_SQLGetDiagRec
my_SQLPrepare
...

Now, if I look at what crap libtool did, I find the following when building 
MyODBC :

/bin/sh ./libtool --mode=link gcc  -O2  -o libmyodbc3.la -rpath 
/usr/local/unixodbc/lib -release 3.51.03 catalog.lo connect.lo dll.lo 
execute.lo handle.lo info.lo myodbc3.lo options.lo prepare.lo results.lo 
transact.lo utility.lo cursor.lo error.lo misc.lo -L/opt/mysql/lib/mysql 
-lmysqlclient -L/usr/local/unixodbc/lib -L/opt/mysql/lib/mysql -lz 
-lodbcinst
mkdir .libs

*** Warning: inter-library dependencies are not known to be supported.
*** All declared inter-library dependencies are being dropped.
*** The inter-library dependencies that have been dropped here will be
*** automatically added whenever a program is linked with this library
*** or is declared to -dlopen it.
/usr/ccs/bin/ld -b +h libmyodbc3-3.51.03.sl +s +b /usr/local/unixodbc/lib 
-o .libs/libmyodbc3-3.51.03.sl  catalog.lo connect.lo dll.lo execute.lo 
handle.lo info.lo myodbc3.lo options.lo prepare.lo results.lo transact.lo 
utility.lo cursor.lo error.lo misc.lo

Notice that it has completely dropped the "-L/opt/mysql/lib/mysql 
-lmysqlclient -L/usr/local/unixodbc/lib -L/opt/mysql/lib/mysql -lz 
-lodbcinst"

This just means that the friggin library is totally whacked and ought to be 
put out to pasture.. In the meantime,
I'm done a re-link by HAND to make sure it gets built properly.. See below 
:

% /usr/ccs/bin/ld -b +h libmyodbc3-3.51.03.sl +s +b /usr/local/unixodbc/lib 
-o .libs/libmyodbc3-3.51.03.sl catalog.lo connect.lo dll.lo execute.lo 
handle.lo info.lo myodbc3.lo options.lo prepare.lo results.lo transact.lo 
utility.lo cursor.lo error.lo misc.lo -L/opt/mysql/lib/mysql -lmysqlclient 
-L/usr/local/unixodbc/lib -L/opt/mysql/lib/mysql -L/usr/local/lib -lz 
-lodbcinst

Now that that is complete, notice what "chatr" finds now (notice the shared 
library list that has two items in it) :

% chatr libmyodbc3-3.51.03.sl
libmyodbc3-3.51.03.sl:
         shared library
         shared library dynamic path search:
             SHLIB_PATH     enabled   first
             embedded path  enabled   second /usr/local/unixodbc/lib
         internal name:
             libmyodbc3-3.51.03.sl
         shared library list:
             dynamic   /opt/mysql/lib/mysql/libmysqlclient.sl.10
             dynamic   /usr/local/unixodbc/lib/libodbcinst.sl.1
         shared vtable support disabled
         static branch prediction disabled
         executable from stack: D (default)
         kernel assisted branch prediction enabled
         lazy swap allocation disabled
         text segment locking disabled
         data segment locking disabled
         third quadrant private data space disabled
         fourth quadrant private data space disabled
         third quadrant global data space disabled
         data page size: D (default)
         instruction page size: D (default)
         nulptr references disabled


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to