Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 350346 - Avoid useless linking
Summary: Avoid useless linking
Status: CLOSED NOT_ECLIPSE
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.6.2   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-25 05:24 EDT by أحمد المحمودي CLA
Modified: 2013-12-20 04:34 EST (History)
5 users (show)

See Also:


Attachments
Use -Wl,--as-needed when linking SWT libraries (3.41 KB, patch)
2011-06-25 05:25 EDT, أحمد المحمودي CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description أحمد المحمودي CLA 2011-06-25 05:24:24 EDT
Build Identifier: 

When building swt-gtk on Debian, I get warnings about uselessly linked libraries:

dpkg-shlibdeps: warning: dependency on libm.so.6 could be avoided if "debian/libswt-glx-gtk-3.7-jni/usr/lib/jni/libswt-glx-gtk-3735.so" were not uselessly linked against it (they use none of its symbols).
dpkg-shlibdeps: warning: dependency on libGLU.so.1 could be avoided if "debian/libswt-glx-gtk-3.7-jni/usr/lib/jni/libswt-glx-gtk-3735.so" were not uselessly linked against it (they use none of its symbols).
dh_installdeb -plibswt-webkit-gtk-3.7-jni 
dh_perl -plibswt-webkit-gtk-3.7-jni 
dh_shlibdeps -plibswt-webkit-gtk-3.7-jni    
dpkg-shlibdeps: warning: dependency on libglib-2.0.so.0 could be avoided if "debian/libswt-webkit-gtk-3.7-jni/usr/lib/jni/libswt-webkit-gtk-3735.so" were not uselessly linked against it (they use none of its symbols).
dpkg-shlibdeps: warning: dependency on libfontconfig.so.1 could be avoided if "debian/libswt-webkit-gtk-3.7-jni/usr/lib/jni/libswt-webkit-gtk-3735.so" were not uselessly linked against it (they use none of its symbols).
dpkg-shlibdeps: warning: dependency on libm.so.6 could be avoided if "debian/libswt-webkit-gtk-3.7-jni/usr/lib/jni/libswt-webkit-gtk-3735.so" 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/libswt-webkit-gtk-3.7-jni/usr/lib/jni/libswt-webkit-gtk-3735.so" were not uselessly linked against it (they use none of its symbols).
dpkg-shlibdeps: warning: dependency on librt.so.1 could be avoided if "debian/libswt-webkit-gtk-3.7-jni/usr/lib/jni/libswt-webkit-gtk-3735.so" were not uselessly linked against it (they use none of its symbols).
dpkg-shlibdeps: warning: dependency on libpthread.so.0 could be avoided if "debian/libswt-webkit-gtk-3.7-jni/usr/lib/jni/libswt-webkit-gtk-3735.so" were not uselessly linked against it (they use none of its symbols).
dpkg-shlibdeps: warning: dependency on libgio-2.0.so.0 could be avoided if "debian/libswt-webkit-gtk-3.7-jni/usr/lib/jni/libswt-webkit-gtk-3735.so" were not uselessly linked against it (they use none of its symbols).
dpkg-shlibdeps: warning: dependency on libgdk_pixbuf-2.0.so.0 could be avoided if "debian/libswt-webkit-gtk-3.7-jni/usr/lib/jni/libswt-webkit-gtk-3735.so" were not uselessly linked against it (they use none of its symbols).
dpkg-shlibdeps: warning: dependency on libcairo.so.2 could be avoided if "debian/libswt-webkit-gtk-3.7-jni/usr/lib/jni/libswt-webkit-gtk-3735.so" were not uselessly linked against it (they use none of its symbols).
dpkg-shlibdeps: warning: dependency on libpango-1.0.so.0 could be avoided if "debian/libswt-webkit-gtk-3.7-jni/usr/lib/jni/libswt-webkit-gtk-3735.so" were not uselessly linked against it (they use none of its symbols).
dpkg-shlibdeps: warning: dependency on libgmodule-2.0.so.0 could be avoided if "debian/libswt-webkit-gtk-3.7-jni/usr/lib/jni/libswt-webkit-gtk-3735.so" were not uselessly linked against it (they use none of its symbols).
dpkg-shlibdeps: warning: dependency on libgthread-2.0.so.0 could be avoided if "debian/libswt-webkit-gtk-3.7-jni/usr/lib/jni/libswt-webkit-gtk-3735.so" 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/libswt-webkit-gtk-3.7-jni/usr/lib/jni/libswt-webkit-gtk-3735.so" 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/libswt-webkit-gtk-3.7-jni/usr/lib/jni/libswt-webkit-gtk-3735.so" 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/libswt-webkit-gtk-3.7-jni/usr/lib/jni/libswt-webkit-gtk-3735.so" 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/libswt-webkit-gtk-3.7-jni/usr/lib/jni/libswt-webkit-gtk-3735.so" were not uselessly linked against it (they use none of its symbols).
dpkg-shlibdeps: warning: dependency on libpangoft2-1.0.so.0 could be avoided if "debian/libswt-webkit-gtk-3.7-jni/usr/lib/jni/libswt-webkit-gtk-3735.so" were not uselessly linked against it (they use none of its symbols).

By passing -Wl,--as-needed before link libraries, those warnings were suppressed.


Reproducible: Always
Comment 1 أحمد المحمودي CLA 2011-06-25 05:25:38 EDT
Created attachment 198596 [details]
Use -Wl,--as-needed when linking SWT libraries
Comment 2 Alexander Kurtakov CLA 2013-12-20 04:34:04 EST
This report is related to debian build and should be reported in debian bug tracker. There is nothing we can do for the debian build. Closing.