Summary: | sys-devel/prelink-20120628: prelink: gelf_getphdr.c:120: gelf_getphdr: Unexpected error: Resource temporarily unavailable. | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Dennis Schridde <dschridde+gentoobugs> |
Component: | [OLD] Core system | Assignee: | Gentoo Toolchain Maintainers <toolchain> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
prelink.strace.log
fix-libgelf-linking.patch disable local gelf in ebuild |
Description
Dennis Schridde
2012-09-03 12:10:36 UTC
if you run it by hand, does it work ? do you have limits in place ? if it fails by hand and you run it through strace, can you post the log ? Created attachment 322944 [details] prelink.strace.log (In reply to comment #1) > if you run it by hand, does it work ? No, it does not. > do you have limits in place ? # grep -v ^# /etc/security/limits.conf -- is empty -- > if it fails by hand and you run it through strace, can you post the log ? Please find the log attached. This is due to prelink is trying to run a wrong implementation of gelf_getphdr function from the libelf system library instead of using its own implementation of this function in the libgelf static library (gelf/.libs/libgelf.a). Try this patch from the ROSA Linux: https://abf.rosalinux.ru/import/prelink/blob/rosa2012.1/fix-libgelf-linking.patch And rebuild prelink. (In reply to comment #3) > This is due to prelink is trying to run a wrong implementation of > gelf_getphdr function from the libelf system library You refer to dev-libs/libelf? I do not even have that installed. (In reply to comment #4) > (In reply to comment #3) > > This is due to prelink is trying to run a wrong implementation of > > gelf_getphdr function from the libelf system library > You refer to dev-libs/libelf? I do not even have that installed. Oh, n/m, it is also included in dev-libs/elfutils-0.155. So that means that dev-libs/elfutils-0.155 is broken? Created attachment 325720 [details, diff] fix-libgelf-linking.patch (In reply to comment #3) > Try this patch from the ROSA Linux - And rebuild prelink. The patch appears broken. It modifies the intermediate file Makefile.in, while it should probably modify Makefile.am instead. With attached patch, it compiles and the resulting prelink appears to work (at least no error message anymore). However, when leaving in the -all-static flag, I get multiple definition errors : /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libelf.a(gelf_fsize.o): In function `gelf_fsize': (.text+0x0): multiple definition of `gelf_fsize' ../gelf/.libs/libgelf.a(gelf.o):gelf.c:(.text+0x40): first defined here /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libelf.a(gelf_getehdr.o): In function `gelf_getehdr': (.text+0x110): multiple definition of `gelf_getehdr' ../gelf/.libs/libgelf.a(gelf.o):gelf.c:(.text+0xd0): first defined here I think that this symbol layering/replacement is probably a bit dodgy, and instead of hacking in custom versions of gelf_fsize and gelf_getehdr, dev-libs/elfutils-0.155 should probably be fixed. No, elfutils are OK. The only broken thing if Prelink, but it can be fixed by changing two lines in the Makefile (see patch). The -all-static flag should be removed. (In reply to comment #7) > No, elfutils are OK. > > The only broken thing if Prelink, but it can be fixed by changing two lines > in the Makefile (see patch). But prelink seems to hook in some custom functions, namely gelf_fsize and gelf_getehdr, which appears to easily create problems. (In reply to comment #6) > Created attachment 325720 [details, diff] [details, diff] > fix-libgelf-linking.patch > > (In reply to comment #3) > > Try this patch from the ROSA Linux - And rebuild prelink. > The patch appears broken. It modifies the intermediate file Makefile.in, > while it should probably modify Makefile.am instead. > > With attached patch, it compiles and the resulting prelink appears to work > (at least no error message anymore). Thanks for your improvements in the patch! > > I think that this symbol layering/replacement is probably a bit dodgy, and > instead of hacking in custom versions of gelf_fsize and gelf_getehdr, > dev-libs/elfutils-0.155 should probably be fixed. Yes, this seems to be a right way. But it may affect or even break the whole system. It should be investigated why prelink and libelf have different implementations of gelf_* symbols. Created attachment 333248 [details, diff]
disable local gelf in ebuild
does this work for you ?
(In reply to comment #11) ping ? (In reply to comment #11) > does this work for you ? No, same error as before. As I understand your patch, it disables the copy of libelf that is included in prelink, which is exactly the opposite of the actual fix (or call it workaround): (In reply to comment #3) > This is due to prelink is trying to run a wrong implementation of > gelf_getphdr function from the libelf system library instead of using its > own implementation of this function in the libgelf static library > (gelf/.libs/libgelf.a). --> Unless the system libelf is patched with whatever patch prelink needs, prelink has to use its own implementation. please retest with prelink-20151030 |