Summary: | sys-libs/glibc-2.26-r7 - /var/tmp/portage/sys-libs/glibc-2.26-r7/work/build-x86-x86_64-pc-linux-gnu-nptl/elf/sln: cannot execute binary file | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Juergen Rose <rose> |
Component: | Current packages | Assignee: | Gentoo Toolchain Maintainers <toolchain> |
Status: | RESOLVED WONTFIX | ||
Severity: | normal | CC: | alexanderyt, bkohler, graaff |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
build.log.bz2
tentative patch (won't be added now, just for safekeeping) |
Description
Juergen Rose
2018-05-10 17:09:42 UTC
Was troubleshooting this same failure a couple of days ago and found out the user's kernel was missing IA32_EMULATION, can you check for that? Surprisingly, without any 32bit binary support in the kernel, the glibc build gets all the way this far before finally failing. (In reply to Ben Kohler from comment #1) > Was troubleshooting this same failure a couple of days ago and found out the > user's kernel was missing IA32_EMULATION, can you check for that? > > Surprisingly, without any 32bit binary support in the kernel, the glibc > build gets all the way this far before finally failing. The current kernel was compiled without IA32_EMULATION: root@localhost:/root(20)# zgrep IA32 /proc/config.gz # CONFIG_IA32_EMULATION is not set After installing the 4.16.8-gentoo kernel with the IA32_EMULATION I was also able to compile glibc-2.26-r7: root@localhost:/root(9)# uname -a Linux localhost 4.16.8-gentoo #1 SMP Fri May 11 00:19:42 CEST 2018 x86_64 Intel(R) Core(TM) i7-3630QM CPU @ 2.40GHz GenuineIntel GNU/Linux root@localhost:/root(10)# zgrep IA32 /proc/config.gz CONFIG_IA32_EMULATION=y # CONFIG_IA32_AOUT is not set root@localhost:/root(11)# qlist -Iv glibc sys-libs/glibc-2.26-r7 Yeah that is a bit silly. Especially since "sln" is just a statically built ln workaround for the case when dynamic linking is not working. Should ask upstream about it. We've just encountered this issue as well. Note that the Kernel Self Protection Project recommends turning off IA32 support: https://kernsec.org/wiki/index.php/Kernel_Self_Protection_Project/Recommended_Settings It's really surprising that an IA32 binary appears as a pre-compiled blob in the glibc source and is used when better alternatives are present. (In reply to Hans de Graaff from comment #5) > We've just encountered this issue as well. Note that the Kernel Self > Protection Project recommends turning off IA32 support: > https://kernsec.org/wiki/index.php/Kernel_Self_Protection_Project/ > Recommended_Settings If user enables USE=multilib I think it's expected for package to build 32-bit binaries and run them. > It's really surprising that an IA32 binary appears as a pre-compiled blob in > the glibc source and is used when better alternatives are present. As far as I'm aware there is no 'sln' blob in source tree. glibc-2.28/elf/sln.c is the source for the binary. It's statically linked as part of the build process. It is needed for 'make install' to work when inplace-upgrade happens. If Gentoo does not need it we can override it by setting system's 'ln' (as done for cross-compiling case): Makerules:symbolic-link-prog = $(LN_S) (In reply to Sergei Trofimovich from comment #6) > As far as I'm aware there is no 'sln' blob in source tree. > glibc-2.28/elf/sln.c is the source for the binary. It's statically linked as > part of the build process. > > It is needed for 'make install' to work when inplace-upgrade happens. > > If Gentoo does not need it we can override it by setting system's 'ln' (as > done for cross-compiling case): > Makerules:symbolic-link-prog = $(LN_S) This actually makes sense since portage takes care of replacing the system files. Created attachment 552660 [details, diff]
tentative patch (won't be added now, just for safekeeping)
OK we discussed this and decided that you should have kernel support for the ABIs you want to build. If you don't have that you can expect that things break. So this is from Toolchain a WONTFIX.
[The problem *can* be solved with attached (not much tested) patch, but we would like to avoid more Gentoo-specific modifications as much as possible.]
(In reply to Andreas K. Hüttel from comment #8) > Created attachment 552660 [details, diff] [details, diff] > tentative patch (won't be added now, just for safekeeping) > > OK we discussed this and decided that you should have kernel support for the > ABIs you want to build. If you don't have that you can expect that things > break. So this is from Toolchain a WONTFIX. This makes sense. And I would consider this FIXED in glibc 2.27 in the sense that it fails early and clearly now: >>> Running pre-merge checks for sys-libs/glibc-2.27-r6 * Checking general environment sanity. make -j2 -s glibc-test * Checking that IA32 emulation is enabled in the running kernel ... /usr/portage/sys-libs/glibc/glibc-2.27-r6.ebuild: line 664: /var/tmp/portage/sys-libs/glibc-2.27-r6/temp/check-ia32-emulation.elf32: cannot execute binary file: Exec format error |