1 |
Ed W wrote: |
2 |
> Hi, I'm unable to compile sandbox with uclibc on x86. The error |
3 |
> occurs in the configure stage as follows: |
4 |
> |
5 |
> ...snip... |
6 |
> checking CFLAGS for maximum warnings... no, unknown |
7 |
> checking whether C compiler accepts -fdata-sections... no |
8 |
> checking whether C compiler accepts -ffunction-sections... no |
9 |
> checking whether the linker accepts -Wl,--as-needed... no |
10 |
> checking whether the linker accepts -Wl,--gc-sections... no |
11 |
> checking whether the linker accepts |
12 |
> -Wl,--version-script,conftest.map... no |
13 |
> checking whether the linker accepts -Wl,-M,conftest.map... no |
14 |
> configure: error: unable to find a linker flag for versioning |
15 |
> |
16 |
> !!! Please attach the following file when seeking support: |
17 |
> !!! |
18 |
> /var/tmp/portage/sys-apps/sandbox-1.6-r2/work/build-default/config.log |
19 |
> * |
20 |
> * ERROR: sys-apps/sandbox-1.6-r2 failed. |
21 |
> |
22 |
> |
23 |
> Checking the config.log it appears to be because of a broken |
24 |
> definition which is split over two lines |
25 |
> |
26 |
> #define LIBC_VERSION "libc.so.0 |
27 |
> | ld-uClibc.so.0" |
28 |
> |
29 |
> |
30 |
> The test causing this is: |
31 |
> |
32 |
> LIBC_VERSION=$( |
33 |
> $READELF -d libctest | \ |
34 |
> $EGREP NEEDED.*libc\\.so | \ |
35 |
> $AWK '{print $NF}' | sed -e 's:\[::' -e 's:\]::' |
36 |
> ) |
37 |
> |
38 |
> |
39 |
> and readelf gives me: |
40 |
> |
41 |
> 0x00000001 (NEEDED) Shared library: [libc.so.0] |
42 |
> 0x00000001 (NEEDED) Shared library: [ld-uClibc.so.0] |
43 |
> |
44 |
> Which in turn leads to the multiple line output |
45 |
> |
46 |
> |
47 |
> However, I can't actually see where LIBC_VERSION is even used? Is |
48 |
> there someone here who understands what is happening and can recommend |
49 |
> the best fix? (Remove the whole test?) |
50 |
> |
51 |
> How come no one else is seeing this? What does readelf give for |
52 |
> others using uclibc? |
53 |
> |
54 |
> Ed W |
55 |
> |
56 |
|
57 |
|
58 |
Does this patch feel right: |
59 |
|
60 |
--- sandbox-1.6/configure.old 2009-06-28 18:28:04 +0000 |
61 |
+++ sandbox-1.6/configure 2009-06-28 18:29:22 +0000 |
62 |
@@ -15911,6 +15911,7 @@ |
63 |
LIBC_VERSION=$( |
64 |
$READELF -d libctest | \ |
65 |
$EGREP NEEDED.*libc\\.so | \ |
66 |
+ $EGREP -v \\[ld- | \ |
67 |
$AWK '{print $NF}' | sed -e 's:\[::' -e 's:\]::' |
68 |
) |
69 |
rm -f libctest* |
70 |
|
71 |
|
72 |
http://bugs.gentoo.org/show_bug.cgi?id=275725 |