Sandbox 1.6 (and also tried 1.9) fail to compile under uclibc with an error during configure Tracing through the config.log the problem is due to a problem with the LIBC_VERSION test. The configure result is: #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 The problem would seem to be that second line starting ld- I have attached a small patch which seems innocuous enough. It simply adds an "egrep -v" to filter out things starting "ld-" - unless other greps don't have this option then it seems unlikely to cause problems with glibc systems or any existing setups Could this please be tested and applied to all sandbox builds? Not sure why more people aren't seeing this with uclibc though? Is there something broken on my setup causing this? (The patch still seems safe in any case) Reproducible: Always Steps to Reproduce: ebuild sandbox (this is with a uclibc + hardened based system on x86 Actual Results: result is: ...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.
Created attachment 195981 [details, diff] fix uclibc configure error
Created attachment 196471 [details, diff] sandbox-libc-ldso.patch try this one instead please
(In reply to comment #2) > Created an attachment (id=196471) [edit] > sandbox-libc-ldso.patch > > try this one instead please > No, this line is not matching anything at all (checked at the command line) + $EGREP 'NEEDED.* \@<:@libc\.so' | \ I confess not to understand this bit of the regexp "\@<:@", so can't suggest a fix? Thanks
testing it on the command line wont work. it must be run through autoconf first.
I should have been clear - it doesn't work as part of the ebuild - same error message as before. I then tried to debug it by taking the regexp apart and the egrep wasn't matching any lines at all (but perhaps autoconf changes the egrep regexp?) Cheers
you would have to run autoconf to get a new configure, then read configure and take the expression out of there should be simple as there is only one place in configure with LIBC_VERSION=$(... beyond that, i dont know what to say ... the proposed patch works for me on glibc, uclibc, and uclibc+hardened.
ive added my fix to sandbox-2.1. re-open if it doesnt work for you. http://git.overlays.gentoo.org/gitweb/?p=proj/sandbox.git;a=commitdiff;h=a796eae054d499b7b49607dd4604ef24dd7622c8
*** Bug 303443 has been marked as a duplicate of this bug. ***