Bug #4735 using/building libmysqlclient.so.10 from source for a mysql4.1.3 system
Submitted: 24 Jul 2004 4:37 Modified: 27 Jul 2004 2:31
Reporter: bruce douglas Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:mysql4.1.3 OS:Linux (linux rh8.0)
Assigned to: Matthew Lord CPU Architecture:Any

[24 Jul 2004 4:37] bruce douglas
Description:
i'm trying to use the DBI perl mods for connecting to a mysql-4.1.3 db. i'm unable to use the libmysqlclient in the mysql-shared due to dependency issues. i'd like to be able to build the lib from source if possible. 

i currently have the 4.1.3 version running. i need the 4.1.3 version for the transaction processing and the ability to interface with php/perl.

i am unable to find the source for the libmysqlclient.so.10. i do have the libclient.so.14 from the 4.1.3. the perl DBI seems to require that the libmysqlclient.so.10 be used. 

so, i need the source to build the client lib against my environment, or i need a way to force the DBI to build against the existing version of mysql/mysql client libs.

additional information:
when i do PERL_DL_DEBUG=255 perl -e 'use DBI;' i get....

[root@lserver2 test]# PERL_DL_DEBUG=255 perl -e 'use DBI;'
DynaLoader.pm loaded (/usr/lib/perl5/5.8.3/i386-linux-thread-multi
/usr/lib/perl5/5.8.3 /usr/lib/perl5/site_perl/5.8.3/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.2/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.1/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.3 /usr/lib/perl5/site_perl/5.8.2
/usr/lib/perl5/site_perl/5.8.1 /usr/lib/perl5/site_perl/5.8.0
/usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.8.3/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.2/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.1/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.3 /usr/lib/perl5/vendor_perl/5.8.2
/usr/lib/perl5/vendor_perl/5.8.1 /usr/lib/perl5/vendor_perl/5.8.0
/usr/lib/perl5/vendor_perl ., /usr/local/lib /lib /usr/lib)
DynaLoader::bootstrap for DBI (auto/DBI/DBI.so)
dl_load_file(/usr/lib/perl5/site_perl/5.8.3/i386-linux-thread-multi/auto/DBI
/DBI.so,0):
 libref=80d4708
dl_find_symbol(handle=80d4708, symbol=boot_DBI)
  symbolref = 4044b420
dl_install_xsub(name=DBI::bootstrap, symref=4044b420)

How to repeat:
implement a server/system with mysql-4.1.3 

install the client shared/devel libs on the client system

install the DBI 1.43 on the client system

run an app that performs a connection/open on the server db

you should get the following error:
install_driver(mysql) failed: Can't load '/usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi/auto/DBD/mysql/mysql.so' for module DBD::mysql: libmysqlclient.so.10: cannot open shared object file: No such file or directory at /usr/lib/perl5/5.8.3/i386-linux-thread-multi/DynaLoader.pm line 229.
 at (eval 1) line 3
Compilation failed in require at (eval 1) line 3.
Perhaps a required shared library or dll isn't installed where expected
 at mysql.inc line 29

Suggested fix:
provide the ability to build the libmysqlclient.so.x from source.

provide a walk through on how to point an existing app from using one version of a lib to the next. (i'm fairly sure that there is some file somewhere where you can specify what libs to "link" against/use when running an app...
[27 Jul 2004 2:30] Matthew Lord
Dear Sir,

This does not appear to be a bug report.  For libmysqlclient.so.X, the X refers to the version of 
the C library.  4.1.3 does not have .10 but .14.  It sounds like you need to compile 4.0.20 to use 
your dbd driver.

Best Regards