[Serusers] "libmysqlclient.so.10" or "libmysqlclient.so.12"

Jan Janak jan at iptel.org
Mon Dec 6 10:31:36 CET 2004


I would not recommend this. Changes in the major version number indicate 
changes in the library interface and the changes may be 
(and probably are -- that is the reason why the number changes) 
incompatible with older versions of the library resulting in crashes or 
some weird behavior.

If you look at ldd output of mysql.so:

janakj at localhost:~$ ldd /usr/local/lib/ser/modules/mysql.so 
  libmysqlclient.so.12 => /usr/lib/libmysqlclient.so.12 (0xb7f9f000)
  ...

It tells what version of the library (and interface) does the module
need. This dependency is created by the linker at compile time. Linker 
looks for libmysqlclient.so (i.e. filename without any version appended) 
which is usually symbolic link to the latest version of the library installed:

janakj at localhost:~$ ls -al /usr/lib/libmysqlclient.so*
lrwxrwxrwx  1 root root     20 Oct 28 23:55 /usr/lib/libmysqlclient.so -> libmysqlclient.so.12
lrwxrwxrwx  1 root root     24 Jan 17  2004 /usr/lib/libmysqlclient.so.10 -> libmysqlclient.so.10.0.0
-rw-r--r--  1 root root 214344 Apr 14  2003 /usr/lib/libmysqlclient.so.10.0.0
lrwxrwxrwx  1 root root     24 Oct 28 23:55 /usr/lib/libmysqlclient.so.12 -> libmysqlclient.so.12.0.0
-rw-r--r--  1 root root 252104 Oct 13 00:38 /usr/lib/libmysqlclient.so.12.0.0

Here libmysql.so points to libmysql.so.12 which is the the latest version
of the library interface installed on the system. Thus mysql.so compiled
on this system would require libmysqlclient.so.12.

In debian, there are two mysql development packages:

janakj at localhost:~$ apt-cache search libmysqlclient-dev
libmysqlclient-dev - mysql database development files
libmysqlclient10-dev - LGPL-licensed client development files for MySQL databases

libmysqlclient-dev would install symbolic link to the latest version
which would be libmysqlclient.so -> libmysql.so.12 and corresponding
header field.

If you install libmysqlclient10-dev instead then link 
libmysqlclient.so -> libmysqlclient.so.10 would be created and modules
compiled on the system would require libmysqlclient.so.10 instead of
version 12.

More on shared libraries:
http://www.tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html

   Jan.

On 06-12 09:23, Marian Dumitru wrote:
> Hi Chris
> 
> Try to make a symbolic link (use ln -s) named "libmysqlclient.so.10" 
> pointing to "libmysqlclient.so.12".
> 
> Best regards,
> Marian
> 
> Chris wrote:
> >ser at run time seeks ?libmysqlclient.so.10? and fails to find it
> >
> >however ?libmysqlclient.so.12? is present (but not accepted)
> >
> > 
> >
> >Can anyone tell me the difference please?
> >
> >Is there a ?simple? solution?
> >
> > 
> >
> >(Load is pre compiled tar from the ...14 folder onto a mandrake 10.0)
> >
> >
> >---
> >Outgoing mail is certified Virus Free.
> >Checked by AVG anti-virus system (http://www.grisoft.com).
> >Version: 6.0.788 / Virus Database: 533 - Release Date: 01/11/2004
> >
> >
> >------------------------------------------------------------------------
> >
> >_______________________________________________
> >Serusers mailing list
> >serusers at lists.iptel.org
> >http://lists.iptel.org/mailman/listinfo/serusers
> 
> 
> -- 
> Voice Sistem
> http://www.voice-sistem.ro
> 
> _______________________________________________
> Serusers mailing list
> serusers at lists.iptel.org
> http://lists.iptel.org/mailman/listinfo/serusers




More information about the sr-users mailing list