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: Wed, 24 Sep 2008 19:59:09
Message-Id: 1222286346.28212.7.camel@localhost
In Reply to: [gentoo-user] Problem building statically linked e2fsprogs by Maarten
1 On Wed, 2008-09-24 at 21:39 +0200, Maarten wrote:
2 > Hi List,
3 >
4 [...]
5 >
6 > # Grep works fine...
7 > maarten@thoughtpad ~ $ ldd /bin/grep
8 > linux-gate.so.1 => (0xffffe000)
9 > libc.so.6 => /lib/libc.so.6 (0xb7e42000)
10 > /lib/ld-linux.so.2 (0xb7f96000)
11 >
12 > thoughtpad ~ # USE="static" emerge -v grep
13 > [snip]
14 >
15 > maarten@thoughtpad ~ $ ldd /bin/grep
16 > not a dynamic executable
17 >
18 > # But e2fsprogs doesn't...
19 >
20 > maarten@thoughtpad ~ $ ldd /sbin/e2fsck
21 > linux-gate.so.1 => (0xffffe000)
22 > libext2fs.so.2 => /lib/libext2fs.so.2 (0xb7ea1000)
23 > libcom_err.so.2 => /lib/libcom_err.so.2 (0xb7e9d000)
24 > libblkid.so.1 => /lib/libblkid.so.1 (0xb7e93000)
25 > libuuid.so.1 => /lib/libuuid.so.1 (0xb7e8e000)
26 > libe2p.so.2 => /lib/libe2p.so.2 (0xb7e87000)
27 > libc.so.6 => /lib/libc.so.6 (0xb7d55000)
28 > /lib/ld-linux.so.2 (0xb7ee8000)
29 >
30 > thoughtpad ~ # USE="static" emerge -v e2fsprogs
31 > [ebuild R ] sys-fs/e2fsprogs-1.40.9 USE="nls static*" 0 kB
32 > [snip]
33 > Enabling ELF shared libraries
34 > [snip]
35 > checking whether linker accepts -static... yes
36 > [snip]
37 > >>> Completed installing e2fsprogs-1.40.9 into
38 > /var/tmp/portage/sys-fs/e2fsprogs-1.40.9/image/
39 >
40 > # After that, no change, however...
41 > maarten@thoughtpad ~ $ ldd /sbin/e2fsck
42 > linux-gate.so.1 => (0xffffe000)
43 > libext2fs.so.2 => /lib/libext2fs.so.2 (0xb7f7f000)
44 > libcom_err.so.2 => /lib/libcom_err.so.2 (0xb7f7b000)
45 > libblkid.so.1 => /lib/libblkid.so.1 (0xb7f71000)
46 > libuuid.so.1 => /lib/libuuid.so.1 (0xb7f6c000)
47 > libe2p.so.2 => /lib/libe2p.so.2 (0xb7f65000)
48 > libc.so.6 => /lib/libc.so.6 (0xb7e33000)
49 > /lib/ld-linux.so.2 (0xb7fc6000)
50 >
51 The grep package has a "static" USE flag. e2fsprogs does not. So
52 enabling the static USE flag has no effect on e2fsprogs.
53
54 The easiest (easier?) thing to do would be to compile e2fsprogs
55 statically by hand and copy over the resulting binary
56
57 # tar zxvf /path/to/e2fsprogs-1.x.x.tar.gz
58 # cd e2fsprogs-1.x.x
59 # ./configure --enable-static
60 # make
61 # ldd e2fsck/e2fsck
62 linux-gate.so.1 => (0xb8033000)
63 libc.so.6 => /lib/libc.so.6 (0xb7edb000)
64 /lib/ld-linux.so.2 (0xb8034000)

Replies

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