Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 754978 - sys-apps/sandbox-2.20 fails to install on prefix (sys-devel/binutils-config[-native-symlinks], tool-prefixed readelf)
Summary: sys-apps/sandbox-2.20 fails to install on prefix (sys-devel/binutils-config[-...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Sandbox Maintainers
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2020-11-16 22:01 UTC by Alexey
Modified: 2021-07-02 22:33 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge.info,15.42 KB, application/x-info)
2020-11-16 22:01 UTC, Alexey
Details
build.log (build.log,13.59 KB, text/x-log)
2020-11-16 22:02 UTC, Alexey
Details
config.log (config.log,164.01 KB, text/x-log)
2020-11-16 22:02 UTC, Alexey
Details
sandbox-9999-0001-configure.ac-use-tool-prefixed-READELF.patch (sandbox-9999-0001-configure.ac-use-tool-prefixed-READELF.patch,675 bytes, patch)
2020-11-17 07:55 UTC, Sergei Trofimovich (RETIRED)
Details | Diff
sandbox-2.20-readelf.patch (sandbox-2.20-readelf.patch,3.25 KB, patch)
2020-11-17 08:01 UTC, Sergei Trofimovich (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey 2020-11-16 22:01:57 UTC
Created attachment 671686 [details]
emerge --info

Even though I use FEATURES="-usersandbox -sandbox" already.

checking libc path... /home/user/gentoo/lib64/libc.so.6
checking libc version... configure: error: Unable to determine LIBC VERSION
Comment 1 Alexey 2020-11-16 22:02:25 UTC
Created attachment 671689 [details]
build.log
Comment 2 Alexey 2020-11-16 22:02:44 UTC
Created attachment 671692 [details]
config.log
Comment 3 Sergei Trofimovich (RETIRED) gentoo-dev 2020-11-17 07:45:03 UTC
The script tries to detect libc.so.6 by inspecting NEEDED tag value in a sample executable (should be "NEEDED: libc.so.6" or similar). configure.ac snippet is:

https://gitweb.gentoo.org/proj/sandbox.git/tree/configure.ac#n372

"""
AC_MSG_CHECKING([libc version])
dnl the sed script at the end here looks funny but it's ok ...
echo "int main(void) { return 0; }" > libctest.c
$CC $CFLAGS $CPPFLAGS $LDFLAGS -o libctest libctest.c
LIBC_VERSION=$(
	$READELF -d libctest | \
	$EGREP 'NEEDED.* \@<:@libc\.so' | \
	$AWK '{print $NF}' | [sed -e 's:\[::' -e 's:\]::']
)
rm -f libctest*
if test "$LIBC_VERSION"x = x ; then
  AC_MSG_ERROR([Unable to determine LIBC VERSION])
fi
"""

config.log says it failed to find readelf on your system: "READELF='false'". Do you know why?

binutils and binutils-config are supposed to provide 'readelf' and/or 'x86_64-pc-linux-gnu-readelf' depending on USE=flags.
Comment 4 Sergei Trofimovich (RETIRED) gentoo-dev 2020-11-17 07:55:10 UTC
Created attachment 671734 [details, diff]
sandbox-9999-0001-configure.ac-use-tool-prefixed-READELF.patch

If you happen to use USE=-native-symlinks for sys-devel/binutils-config then the bug is in missing tool-prefixed search. sandbox-9999-0001-configure.ac-use-tool-prefixed-READELF.patch should fix it for live ebuild. I'll attach a similar patch for current release.
Comment 5 Sergei Trofimovich (RETIRED) gentoo-dev 2020-11-17 08:01:19 UTC
Created attachment 671737 [details, diff]
sandbox-2.20-readelf.patch

sandbox-2.20-readelf.patch is the same as for live ebuild with added regenerated ./configure. Should be appliable as is by placing patch to $EPREFIX/etc/portage/patches/sys-apps/sandbox/.
Comment 6 Alexey 2020-11-17 10:18:59 UTC
> If you happen to use USE=-native-symlinks for sys-devel/binutils-config then
the bug is in missing tool-prefixed search.

Ah, yes, I do. I should have mentioned that, sorry. The patch fixes it, thanks
Comment 7 Andreas K. Hüttel archtester gentoo-dev 2021-07-02 22:33:52 UTC
Fixed in 2.21