Re: Linking libxxx.so to libxxx_r.so? dpkg-shlibdep doesn't like it...
On Sun, Jul 05, 2009 at 11:01:21PM +0200, Christian Hammers wrote:
> 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
> 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
> 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).
> 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:
diff -U0 =(nm -D /usr/lib/libmysqlclient.so.15.0.0 | cut -d' ' -f2- | sort -u) =(nm -D /usr/lib/libmysqlclient_r.so.15.0.0 | cut -d' ' -f2- | sort -u)|grep '^-'
--- /tmp/zshUjt2JU 2009-07-08 15:49:03.888491590 +0200
Unless this big fat command yields nothing with the .16 version, libmysql_r.so
has *not* an ABI that includes the one of libmysqlclient.so.
IOW programs that would be built against libmysqlclient.so on other distros
will not work on Debian at all if you do that.
As of the dpkg-shlibdeps warning you can probably work it around with proper -x
Pierre Habouzit <firstname.lastname@example.org>
Tél : +33 (0)1 5570 3346
Mob : +33 (0)6 1636 8131
Fax : +33 (0)1 5570 3332
37 Rue Pierre Lhomme