Gentoo Archives: gentoo-dev

From: Stefan Sperling <stefan@××××××××.net>
To: gentoo-dev@××××××××××××.org
Subject: Re: [gentoo-dev] GTK und GTK2 Use Flag
Date: Tue, 29 Mar 2005 10:59:01
Message-Id: 20050329105857.GA9909@stud.seeling33.de
In Reply to: [gentoo-dev] GTK und GTK2 Use Flag by Fabian Zeindl
1 On Tue, Mar 29, 2005 at 12:15:17PM +0200, Fabian Zeindl wrote:
2 > Hello
3 >
4 > There was a discussion on the gentoo-user-de list about this two
5 > Useflags: gtk and gtk2. Because not everybody is sure what the mean, so
6 > if you have -gtk +gtk2 some think that gtk2 should be installed and soon.
7
8 There are lots of useflags that don't install anything.
9 Take the new mp3 useflag for example, used by beep-media-player.
10 would you expect it to install a program called 'mp3'? :)
11
12 > Wouldn't it be better if "gtk" meaned that the newest available gtk
13 > version ist installed (gtk1 or gtk2) and a flag like oldgtk take the
14 > older version gtk1.
15
16 As soon as gtk3 comes along, you scheme won't work anymore.
17
18 Some programs use gtk1 only, some gtk2 only, and a few have
19 support for both. As there is not much point in using both
20 of them at runtime, if you use +gtk2, programs that support
21 both will use gtk2.
22
23 I don't know what happens when you have both +gtk1 and +gtk2 set,
24 but I reckon that still evaluates to using gtk2. You can simply try
25 this out for yourself. The ldd command will tell you which libraries
26 a given binary is linked with (see the ldd manpage).
27
28 > Another question which occured: Is there a performancedrawback if a
29 > program is compile with gtk1 AND gtk2 build in? Does this happen when
30 > someone installs with +gtk +gtk2?
31
32 There is no performance penalty.
33 You can savely install both versions. gtk1 and gtk2 are not 'build' into
34 a program, they are shared libraries. What happens is that when a program
35 uses gtk{1,2}, a copy of the gtk{1,2} code is loaded from disk into memory
36 if it is not already in memory. So all programs compiled against the same
37 version of gtk use the very same copy of gtk code at runtime, which of
38 course saves a lot of memory.
39
40 > --
41 > Musik ist niemals illegal: www.fairsharing.de
42
43 My music is not illegal either (creative commons) :)
44 http://binarchy.net/werkstatt
45
46 --
47 stefan PGP Key: 0xF59D25F0
48 --
49 gentoo-dev@g.o mailing list

Replies

Subject Author
Re: [gentoo-dev] GTK und GTK2 Use Flag Stefan Sperling <stefan@××××××××.net>
Re: [gentoo-dev] GTK und GTK2 Use Flag "Diego \\\"Flameeyes\\\" Pettenò" <flameeyes@×××××××××××××.de>
Re: [gentoo-dev] GTK und GTK2 Use Flag Brian Harring <ferringb@g.o>