[debian-mysql] Linking libxxx.so to libxxx_r.so? dpkg-shlibdep doesn't like it...

Pierre Habouzit madcoder at madism.org
Wed Jul 8 13:57:02 UTC 2009


On Wed, Jul 08, 2009 at 03:53:58PM +0200, Pierre Habouzit wrote:
> On Sun, Jul 05, 2009 at 11:01:21PM +0200, Christian Hammers wrote:
> > Hello
> > 
> > To help packages like Apache which have some parts like libaprutil
> > that wants to link against libmysqlclient16_r.so and some like PHP
> > that wants to link against libmysqlcient.so, it was proposed that
> > libmysqlclient.so should be made a symlink pointing to the thread safe
> > *_r.so version.
> > 
> > (This change would be introduced for the upcoming new soname version 
> > which is not yet into unstable! Performance issues were considered to
> > be negligible as the client library only copies data from and to the
> > server)
> > 
> > But when putting a corresponding symlink into
> > debian/libmysqlclient16.links, the build process fails with:
> > 
> > dh_shlibdeps -a -l debian/libmysqlclient16/usr/lib -L libmysqlclient16
> >         LD_LIBRARY_PATH=/usr/lib/libfakeroot:/usr/lib64/libfakeroot:/usr/lib32/libfakeroot:/debian/libmysqlclient16/usr/lib
> >         dpkg-shlibdeps -Tdebian/libmysqlclient16.substvars -Sdebian/libmysqlclient16 debian/libmysqlclient16/usr/lib/libmysqlclient_r.so.16.0.0
> > dpkg-shlibdeps: warning: dependency on libnsl.so.1 could be avoided if "debian/libmysqlclient16/usr/lib/libmysqlclient_r.so.16.0.0" were not uselessly linked against it (they use none of its symbols).
> > dpkg-shlibdeps: warning: dependency on libcrypt.so.1 could be avoided if "debian/libmysqlclient16/usr/lib/libmysqlclient_r.so.16.0.0" were not uselessly linked against it (they use none of its symbols).
> >         LD_LIBRARY_PATH=/usr/lib/libfakeroot:/usr/lib64/libfakeroot:/usr/lib32/libfakeroot:/debian/libmysqlclient16/usr/lib
> >         dpkg-shlibdeps -Tdebian/mysql-client-5.1.substvars -Sdebian/libmysqlclient16 debian/mysql-client-5.1/usr/sbin/mysqlmanager debian/mysql-client-5.1/usr/bin/mysqldump debian/mysql-client-5.1/usr/bin/mysql_client_test_embedded debian/mysql-client-5.1/usr/bin/mysql_waitpid debian/mysql-client-5.1/usr/bin/mysqladmin debian/mysql-client-5.1/usr/bin/mysqltest_embedded debian/mysql-client-5.1/usr/bin/mysql debian/mysql-client-5.1/usr/bin/mysqlshow debian/mysql-client-5.1/usr/bin/mysqlcheck debian/mysql-client-5.1/usr/bin/myisam_ftdump debian/mysql-client-5.1/usr/bin/mysqlimport debian/mysql-client-5.1/usr/bin/mysql_client_test
> > dpkg-shlibdeps: warning: debian/libmysqlclient16/usr/lib/libmysqlclient.so.16 has an unexpected SONAME (libmysqlclient_r.so.16)
> > dpkg-shlibdeps: error: no dependency information found for debian/libmysqlclient16/usr/lib/libmysqlclient.so.16 (used by debian/mysql-client-5.1/usr/bin/mysqldump).
> > dh_shlibdeps: dpkg-shlibdeps returned exit code 2
> > make: *** [binary-arch] Error 1
> > 
> > Before I start looking for a creative workaround - is this approach a good idea
> > in the first place?
> 
> You cannot do that:

This is poorly worded, you can do what you want, but it means that you
will break binary compatibility with other distributions. By bumping the
soname, you ensure that nothing will break with this change, so
Debian-wise it's probably fine.

Note though that openssl for example hasn't the same soname on RedHat
for example (where it's libssl.so.4 I think), so I'm not sure the whole
cross-distribution binary compatibility stuff is that much of a
concern. I'll let other people comment on it though.

-- 
Intersec <http://www.intersec.com>
Pierre Habouzit <pierre.habouzit at intersec.com>
Tél : +33 (0)1 5570 3346
Mob : +33 (0)6 1636 8131
Fax : +33 (0)1 5570 3332
37 Rue Pierre Lhomme
92400 Courbevoie



More information about the pkg-mysql-maint mailing list