Project

General

Profile

Actions

Bug #307

closed

uselessly linked libraries

Added by Adrian Friedli almost 14 years ago. Updated about 13 years ago.

Status:
Closed
Priority:
Normal
Category:
toolchain
Target version:
Start date:
07/15/2008
Due date:
% Done:

30%

Estimated time:

Description

While packaging yzis for Debian I get the warnings below. It seems parts of yzis are linked against libraries, wich symbols aren't used.

dpkg-shlibdeps: warning: dependency on libgcc_s.so.1 could be avoided if "debian/libyzis0/usr/lib/libyzis.so.0.0.0" were not uselessly linked against it (they use none of its symbols).
dpkg-shlibdeps: warning: dependency on libgcc_s.so.1 could be avoided if "debian/nyzis/usr/bin/nyzis" were not uselessly linked against it (they use none of its symbols).
dpkg-shlibdeps: warning: dependency on liblua5.1.so.0 could be avoided if "debian/nyzis/usr/bin/nyzis" were not uselessly linked against it (they use none of its symbols).
dpkg-shlibdeps: warning: dependency on libQtXml.so.4 could be avoided if "debian/nyzis/usr/bin/nyzis" were not uselessly linked against it (they use none of its symbols).
dpkg-shlibdeps: warning: dependency on libmagic.so.1 could be avoided if "debian/nyzis/usr/bin/nyzis" were not uselessly linked against it (they use none of its symbols).
dpkg-shlibdeps: warning: dependency on libgcc_s.so.1 could be avoided if "debian/qyzis/usr/bin/qyzis" were not uselessly linked against it (they use none of its symbols).
dpkg-shlibdeps: warning: dependency on liblua5.1.so.0 could be avoided if "debian/qyzis/usr/bin/qyzis" were not uselessly linked against it (they use none of its symbols).
dpkg-shlibdeps: warning: dependency on libQtXml.so.4 could be avoided if "debian/qyzis/usr/bin/qyzis" were not uselessly linked against it (they use none of its symbols).
dpkg-shlibdeps: warning: dependency on libmagic.so.1 could be avoided if "debian/qyzis/usr/bin/qyzis" were not uselessly linked against it (they use none of its symbols).
dpkg-shlibdeps: warning: dependency on liblua5.1.so.0 could be avoided if "debian/kyzis/usr/bin/kyzis debian/kyzis/usr/lib/kde4/yzispart.so" were not uselessly linked against it (they use none of its symbols).
dpkg-shlibdeps: warning: dependency on libQtSvg.so.4 could be avoided if "debian/kyzis/usr/bin/kyzis debian/kyzis/usr/lib/kde4/yzispart.so" were not uselessly linked against it (they use none of its symbols).
dpkg-shlibdeps: warning: dependency on libQtXml.so.4 could be avoided if "debian/kyzis/usr/bin/kyzis debian/kyzis/usr/lib/kde4/yzispart.so" were not uselessly linked against it (they use none of its symbols).
dpkg-shlibdeps: warning: dependency on libgcc_s.so.1 could be avoided if "debian/kyzis/usr/bin/kyzis debian/kyzis/usr/lib/kde4/yzispart.so" were not uselessly linked against it (they use none of its symbols).
dpkg-shlibdeps: warning: dependency on libkio.so.5 could be avoided if "debian/kyzis/usr/bin/kyzis debian/kyzis/usr/lib/kde4/yzispart.so" were not uselessly linked against it (they use none of its symbols).
dpkg-shlibdeps: warning: dependency on libQtDBus.so.4 could be avoided if "debian/kyzis/usr/bin/kyzis debian/kyzis/usr/lib/kde4/yzispart.so" were not uselessly linked against it (they use none of its symbols).
dpkg-shlibdeps: warning: dependency on libQtNetwork.so.4 could be avoided if "debian/kyzis/usr/bin/kyzis debian/kyzis/usr/lib/kde4/yzispart.so" were not uselessly linked against it (they use none of its symbols).
dpkg-shlibdeps: warning: dependency on libmagic.so.1 could be avoided if "debian/kyzis/usr/bin/kyzis debian/kyzis/usr/lib/kde4/yzispart.so" were not uselessly linked against it (they use none of its symbols).

Actions #1

Updated by Thomas Capricelli almost 14 years ago

  • Status changed from New to Feedback
  • Assignee set to Thomas Capricelli
  • Priority changed from Low to Normal
  • Target version set to 1.0-alpha2
  • % Done changed from 0 to 30

Your script seems broken, libyzis depends at least on the following symbols from QtXml:

`QDomNode::childNodes() const'
`QDomElement::elementsByTagName(QString const&) const'
`QDomElement::tagName() const'
`QDomElement::text() const'
`QDomDocument::setContent(QIODevice*, QString*, int*, int*)'
`QDomNodeList::~QDomNodeList()'
`QDomNode::isNull() const'
`QDomNode::operator=(QDomNode const&)'
`QDomNode::~QDomNode()'
`QDomElement::operator=(QDomElement const&)'
`QDomElement::attribute(QString const&, QString const&) const'
`QDomNode::toElement() const'
`QDomNodeList::item(int) const'
`QDomElement::QDomElement()'
`QDomNode::~QDomNode()'
`QDomNode::isComment() const'
`QDomNode::nextSibling() const'
`QDomDocument::~QDomDocument()'
`QDomDocument::QDomDocument()'
`QDomNodeList::length() const'
`QDomDocument::documentElement() const'
`QDomNode::firstChild() const'

This is easy to check by looking at files libyzis/kate/syntaxdocument.{h,cpp}

Actions #2

Updated by Thomas Capricelli about 13 years ago

  • Status changed from Feedback to Closed

mail from Adrian Friedli <>

I got rid of these warnings by setting these variables:
CMAKE_SHARED_LINKER_FLAGS="-Wl,--as-needed"
CMAKE_MODULE_LINKER_FLAGS="-Wl,--as-needed"
CMAKE_EXE_LINKER_FLAGS="-Wl,--as-needed"

I did not set them in the CMake files, because it could break on some
non-Linux platforms. Instead I just hand it to cmake on the command line.

Actions

Also available in: Atom PDF