Gentoo Archives: gentoo-user

From: Albert Hopkins <marduk@×××××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Problem building statically linked e2fsprogs
Date: Thu, 25 Sep 2008 17:33:36
Message-Id: 1222356214.7870.111.camel@localhost
In Reply to: Re: [gentoo-user] Problem building statically linked e2fsprogs by Maarten
1 On Wed, 2008-09-24 at 22:34 +0200, Maarten wrote:
2 > Albert Hopkins wrote:
3
4 > > The grep package has a "static" USE flag. e2fsprogs does not. So
5 > > enabling the static USE flag has no effect on e2fsprogs.
6 >
7 > Ehm, how do you figure that? It surely displays the "static" USE flag:
8 >
9 > thoughtpad ~ # emerge -pv e2fsprogs
10 >
11 > These are the packages that would be merged, in order:
12 >
13 > Calculating dependencies... done!
14 > [ebuild R ] sys-fs/e2fsprogs-1.40.9 USE="nls -static" 0 kB
15 >
16
17 Sorry, I am using a later version of e2fsprogs that does not have the
18 "static" USE flag. I didn't know that earlier versions did have it but,
19 as another poster said, there is a bug for the package where use of the
20 "static" flag doesn't work.
21
22 > So I would assume at this point the package is broken in this respect.
23 >
24 > > The easiest (easier?) thing to do would be to compile e2fsprogs
25 > > statically by hand and copy over the resulting binary
26 >
27 > Good idea... well, maybe...
28 >
29 > > # tar zxvf /path/to/e2fsprogs-1.x.x.tar.gz
30 > > # cd e2fsprogs-1.x.x
31 > > # ./configure --enable-static
32 > > # make
33 > > # ldd e2fsck/e2fsck
34 > > linux-gate.so.1 => (0xb8033000)
35 > > libc.so.6 => /lib/libc.so.6 (0xb7edb000)
36 > > /lib/ld-linux.so.2 (0xb8034000)
37 >
38 > Ehm, exactly. So yes, it uses less libraries than before, but in no way
39 > is this a real statically linked binary:
40 >
41 This is true, but it is sufficiently static enough. Pretty much any
42 Linux shipped within the past 10 years or so has GNU libc 2 .x (libc 6),
43 so the dependencies are satisfied.
44
45 If you really really need static then:
46
47 # cd e2fsck
48 # make e2fsck.static
49 # ldd e2fsck.static
50 not a dynamic executable

Replies

Subject Author
Re: [gentoo-user] Problem building statically linked e2fsprogs Maarten <gentoo@××××××××.org>