
lists at wildgooses
Jun 28, 2009, 11:52 AM
Post #2 of 8
(1136 views)
Permalink
|
|
Re: Problems compiling sandbox with uclibc
[In reply to]
|
|
Ed W wrote: > Hi, I'm unable to compile sandbox with uclibc on x86. The error > occurs in the configure stage as follows: > > ...snip... > checking CFLAGS for maximum warnings... no, unknown > checking whether C compiler accepts -fdata-sections... no > checking whether C compiler accepts -ffunction-sections... no > checking whether the linker accepts -Wl,--as-needed... no > checking whether the linker accepts -Wl,--gc-sections... no > checking whether the linker accepts > -Wl,--version-script,conftest.map... no > checking whether the linker accepts -Wl,-M,conftest.map... no > configure: error: unable to find a linker flag for versioning > > !!! Please attach the following file when seeking support: > !!! > /var/tmp/portage/sys-apps/sandbox-1.6-r2/work/build-default/config.log > * > * ERROR: sys-apps/sandbox-1.6-r2 failed. > > > Checking the config.log it appears to be because of a broken > definition which is split over two lines > > #define LIBC_VERSION "libc.so.0 > | ld-uClibc.so.0" > > > The test causing this is: > > LIBC_VERSION=$( > $READELF -d libctest | \ > $EGREP NEEDED.*libc\\.so | \ > $AWK '{print $NF}' | sed -e 's:\[::' -e 's:\]::' > ) > > > and readelf gives me: > > 0x00000001 (NEEDED) Shared library: [libc.so.0] > 0x00000001 (NEEDED) Shared library: [ld-uClibc.so.0] > > Which in turn leads to the multiple line output > > > However, I can't actually see where LIBC_VERSION is even used? Is > there someone here who understands what is happening and can recommend > the best fix? (Remove the whole test?) > > How come no one else is seeing this? What does readelf give for > others using uclibc? > > Ed W > Does this patch feel right: --- sandbox-1.6/configure.old 2009-06-28 18:28:04 +0000 +++ sandbox-1.6/configure 2009-06-28 18:29:22 +0000 @@ -15911,6 +15911,7 @@ LIBC_VERSION=$( $READELF -d libctest | \ $EGREP NEEDED.*libc\\.so | \ + $EGREP -v \\[.ld- | \ $AWK '{print $NF}' | sed -e 's:\[::' -e 's:\]::' ) rm -f libctest* http://bugs.gentoo.org/show_bug.cgi?id=275725
|