Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 563912

Summary: sys-devel/gdb-7.10-r1 error while loading shared libraries: /usr/lib64/libm.so.6: invalid ELF header
Product: Gentoo Linux Reporter: Alex Turbov <I.zaufi>
Component: [OLD] Core systemAssignee: Gentoo Toolchain Maintainers <toolchain>
Status: RESOLVED INVALID    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: full build log
glibc package content
my system info

Description Alex Turbov 2015-10-23 23:39:22 UTC
problem appears after upgrading to sys-libs/glibc-2.22-r1

Reproducible: Always

Steps to Reproduce:
1.try to start gdb from console
2.
3.
Actual Results:  
gdb: error while loading shared libraries: /usr/lib64/libm.so.6: invalid ELF header


Expected Results:  
gdb running…
Comment 1 Alex Turbov 2015-10-23 23:42:34 UTC
readelf shows that gdb has a runpath set to /usr/lib64.
as a temporary solution I start it like this:

  $ LD_LIBRARY_PATH=/lib gdb
Comment 2 SpanKY gentoo-dev 2015-10-24 16:44:21 UTC
every bug report should have `emerge --info` attached to it.  please do so.

there should be no /usr/lib64/libm.so.6 file.  please attach the output of:
  qlist -e sys-libs/glibc

also attach the full build log of your glibc
Comment 3 Alex Turbov 2015-10-26 11:02:54 UTC
Created attachment 415510 [details]
full build log
Comment 4 Alex Turbov 2015-10-26 11:04:26 UTC
Created attachment 415512 [details]
glibc package content
Comment 5 Alex Turbov 2015-10-26 11:05:38 UTC
Created attachment 415514 [details]
my system info
Comment 6 SpanKY gentoo-dev 2015-10-27 01:54:28 UTC
your glibc doesn't own /usr/lib64/libm.so.6, so where is it coming from ?  run:
  file /usr/lib*/libm.so.6
  file -L /usr/lib*/libm.so.6
  qfile /usr/lib*/libm.so.6

and post the output
Comment 7 Alex Turbov 2015-10-27 10:30:52 UTC
it is a symlink unowned by any package... removing it had fixed the problem.