ALT Linux Team development discussions
 help / color / mirror / Atom feed
From: Alexey Tourbin <at@altlinux.ru>
To: ALT Devel discussion list <devel@lists.altlinux.org>
Subject: Re: [devel] Q: pkgconfig build-deps
Date: Sun, 30 Apr 2006 00:39:02 +0400
Message-ID: <20060429203902.GB9314@localhost> (raw)
In-Reply-To: <20060429144749.GD13673@basalt.office.altlinux.org>

[-- Attachment #1: Type: text/plain, Size: 2068 bytes --]

On Sat, Apr 29, 2006 at 06:47:49PM +0400, Dmitry V. Levin wrote:
> Беда в том, что эти Libs зачастую избыточны.  Я, кажется, сейчас начну
> повторять что-то про --as-needed.

Кстати, несколько месяц назад я провёл исследование проблемы излишней
линковски в Сизифе.  Согласно проведенному мной исследованию... :)
каждый бинарь в среднем линкуется с количеством библиотек почти вдове
большем, чем реально использует.

(Хм.  "Линкуется с количеством"...  Трудности языка.)

Поскольку --as-needed почти полностью решает проблему, долго писать об
этом не буду.  Вот выдержка из исследования.

=item	unneed

I.e. no undefined symbols is resolved into this shared library the binary is linked against.
To put it another way, the library is linked in but possibly unused.
Example:

    7colors /usr/bin/sevencolors    libICE.so.6
    7colors /usr/bin/sevencolors    libSM.so.6
    7colors /usr/bin/sevencolors    libX11.so.6
    7colors /usr/bin/sevencolors    libXext.so.6
    7colors /usr/bin/sevencolors    libXi.so.6
    7colors /usr/bin/sevencolors    libart_lgpl.so.2
    7colors /usr/bin/sevencolors    libaudiofile.so.0
    7colors /usr/bin/sevencolors    libdb.so.2
    7colors /usr/bin/sevencolors    libdl.so.2
    7colors /usr/bin/sevencolors    libesd.so.0
    7colors /usr/bin/sevencolors    libgmodule-1.2.so.0
    7colors /usr/bin/sevencolors    libm.so.6

To make it clear, the following libraries are actually used by 7colors (directly):

    libc.so.6
    libgdk-1.2.so.0
    libgdk_imlib.so.1
    libglib-1.2.so.0
    libgnome.so.32
    libgnomesupport.so.0
    libgnomeui.so.32
    libgtk-1.2.so.0

Now some stats (i.e. "most unneded libraries").

    $ cut -f3 unneed |sort |uniq -c |sort -n |tail
       1037 libc.so.6
       1207 libX11.so.6
       1240 libSM.so.6
       1244 libICE.so.6
       1247 libgcc_s.so.1
       1511 libXext.so.6
       2066 libz.so.1
       3164 libpthread.so.0
       3177 libdl.so.2
       5348 libm.so.6
    $

You see libm.so.6 is plugged by g++ by default.


[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2006-04-29 20:39 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-28  7:34 Konstantin A. Lepikhov
2006-04-28 20:39 ` Mikhail Zabaluev
2006-04-28 20:50   ` Mikhail Zabaluev
2006-04-28 21:03     ` Alexey I. Froloff
2006-04-29 14:47       ` Dmitry V. Levin
2006-04-29 20:39         ` Alexey Tourbin [this message]
2006-04-30  5:58           ` Andrey Rahmatullin
2006-04-30  9:00             ` Alexey Tourbin
2006-04-30  9:08               ` Andrey Rahmatullin
2006-04-30  9:22                 ` Alexey Tourbin
2006-04-30 13:18                   ` Dmitry V. Levin
2006-04-30 21:22                     ` Alexey Tourbin
2006-04-30 21:53                       ` [devel] glibc Dmitry V. Levin
2006-05-01  9:36                     ` [devel] Q: pkgconfig build-deps Igor Zubkov
2006-05-01 11:17                       ` Dmitry V. Levin
2006-05-02  9:41                       ` Alexey Tourbin
2006-04-28 20:56   ` Alexey Tourbin
2006-04-28 22:29     ` Dmitry V. Levin
2006-04-29  8:26       ` Konstantin A. Lepikhov
2006-04-29 14:54         ` Dmitry V. Levin
2006-04-30 18:39           ` Mikhail Zabaluev
2006-04-30 20:34             ` Dmitry V. Levin
2006-05-01  7:27 ` Andrey Rahmatullin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060429203902.GB9314@localhost \
    --to=at@altlinux.ru \
    --cc=devel@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Team development discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
		devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
	public-inbox-index devel

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git