Project

General

Profile

Feature #568

debian: build with --as-needed?

Added by Sage Weil almost 10 years ago. Updated almost 10 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Target version:
% Done:

0%

Source:
Tags:
Backport:
Reviewed:
Affected Versions:
Pull request ID:

Description

Can we do this to limit dependencies? See #544.

And the current warnings like

dh_shlibdeps
        dpkg-shlibdeps -Tdebian/ceph.substvars debian/ceph/usr/lib/rados-classes/libcls_rbd.so.1.0.0 debian/ceph/usr/bin/cephfs debian/ceph/usr/bin/osdmaptool debian/ceph/usr/bin/cosd debian/ceph/usr/bin/cauthtool debian/ceph/usr/bin/cmon debian/ceph/usr/bin/cmds debian/ceph/usr/bin/crushtool debian/ceph/usr/bin/cconf debian/ceph/usr/bin/monmaptool debian/ceph/usr/bin/ceph
dpkg-shlibdeps: warning: debian/ceph/usr/lib/rados-classes/libcls_rbd.so.1.0.0 contains an unresolvable reference to symbol cls_register: it's probably a plugin.
dpkg-shlibdeps: warning: 8 other similar warnings have been skipped (use -v to see them all).
dpkg-shlibdeps: warning: dependency on libfontconfig.so.1 could be avoided if "debian/ceph/usr/bin/ceph" were not uselessly linked against it (they use none of its symbols).
dpkg-shlibdeps: warning: dependency on libatk-1.0.so.0 could be avoided if "debian/ceph/usr/bin/ceph" were not uselessly linked against it (they use none of its symbols).
dpkg-shlibdeps: warning: dependency on libgobject-2.0.so.0 could be avoided if "debian/ceph/usr/bin/ceph" were not uselessly linked against it (they use none of its symbols).
dpkg-shlibdeps: warning: dependency on libgiomm-2.4.so.1 could be avoided if "debian/ceph/usr/bin/ceph" were not uselessly linked against it (they use none of its symbols).
dpkg-shlibdeps: warning: dependency on libgtk-x11-2.0.so.0 could be avoided if "debian/ceph/usr/bin/ceph" were not uselessly linked against it (they use none of its symbols).
dpkg-shlibdeps: warning: dependency on libpangocairo-1.0.so.0 could be avoided if "debian/ceph/usr/bin/ceph" were not uselessly linked against it (they use none of its symbols).
dpkg-shlibdeps: warning: dependency on libfreetype.so.6 could be avoided if "debian/ceph/usr/bin/ceph" were not uselessly linked against it (they use none of its symbols).
dpkg-shlibdeps: warning: dependency on libgdk-x11-2.0.so.0 could be avoided if "debian/ceph/usr/bin/ceph" were not uselessly linked against it (they use none of its symbols).
...

History

#1 Updated by Sage Weil almost 10 years ago

  • Assignee set to Colin McCabe

#2 Updated by Colin McCabe almost 10 years ago

  • Status changed from New to Resolved

Implemented!

before:

cmccabe@flab:~/src/ceph2/src$ ldd .libs/rados
linux-vdso.so.1 => (0x00007fff4efff000)
librados.so.1 => /usr/lib/librados.so.1 (0x00007fa21ec75000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00007fa21ea59000)
libssl.so.0.9.8 => /usr/lib/libssl.so.0.9.8 (0x00007fa21e803000)
libcrypto.so.0.9.8 => /usr/lib/libcrypto.so.0.9.8 (0x00007fa21e462000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007fa21e14e000)
libm.so.6 => /lib/libm.so.6 (0x00007fa21decb000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00007fa21dcb5000)
libc.so.6 => /lib/libc.so.6 (0x00007fa21d954000)
libcrush.so.1 => /usr/local/lib/libcrush.so.1 (0x00007fa21d74e000)
/lib64/ld-linux-x86-64.so.2 (0x00007fa21f2a1000)
libdl.so.2 => /lib/libdl.so.2 (0x00007fa21d54a000)
libz.so.1 => /usr/lib/libz.so.1 (0x00007fa21d333000)

after:

cmccabe@flab:~/src/ceph$ ldd ./src/.libs/rados
linux-vdso.so.1 => (0x00007fffac1ff000)
librados.so.1 => /usr/lib/librados.so.1 (0x00007f90c730e000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00007f90c70f2000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f90c6ddd000)
libm.so.6 => /lib/libm.so.6 (0x00007f90c6b5b000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00007f90c6945000)
libc.so.6 => /lib/libc.so.6 (0x00007f90c65e3000)
libcrush.so.1 => /usr/local/lib/libcrush.so.1 (0x00007f90c63de000)
/lib64/ld-linux-x86-64.so.2 (0x00007f90c793a000)

Also available in: Atom PDF