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

Bug 606446

Summary: sys-apps/portage: ugly binutils linking hackery confuses preserved-libs
Product: Portage Development Reporter: Adam Feldman <np-hardass>
Component: UnclassifiedAssignee: Portage team <dev-portage>
Status: RESOLVED DUPLICATE    
Severity: normal CC: esigra, toolchain
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 240323    

Description Adam Feldman gentoo-dev 2017-01-18 17:12:06 UTC
Steps to reproduce:

1) Extract a fresh stage3-nomultilib tarball and chroot into it.
2) Note no preserved-libs
3) emerge -1 binutils-libs
4) emerge -1 binutils
5) emerge -c binutils-libs, resulting in:

> !!! existing preserved libs:
> >>> package: sys-libs/binutils-libs-2.25.1-r2
>  *  - /usr/lib64/libbfd-2.25.1.so
>  *      used by /usr/lib64/binutils/x86_64-pc-linux-gnu/2.25.1/libopcodes-2.25.1.so (sys-devel/binutils-2.25.1-r1)
> Use emerge @preserved-rebuild to rebuild packages using these libraries

6) emerge -1 binutils, resulting again in:

> !!! existing preserved libs:
> >>> package: sys-libs/binutils-libs-2.25.1-r2
>  *  - /usr/lib64/libbfd-2.25.1.so
>  *      used by /usr/lib64/binutils/x86_64-pc-linux-gnu/2.25.1/libopcodes-2.25.1.so (sys-devel/binutils-2.25.1-r1)
> Use emerge @preserved-rebuild to rebuild packages using these libraries

7) rm /usr/lib64/libbfd-2.25.1.so && emerge -1 binutils, no preserved-libs, now fully functional and properly linked binutils


Not sure how to automatically remediate the issue though.  Is there a sane way to have binutils' ebuild use its own libbfd before binutils-libs' libbfd if binutils-libs isn't installed?
Comment 1 SpanKY gentoo-dev 2017-01-19 04:49:54 UTC
it's a false positive from portage.  it doesn't actually get used.

*** This bug has been marked as a duplicate of bug 563934 ***
Comment 2 SpanKY gentoo-dev 2017-02-09 15:08:23 UTC
no idea why you re-opened it.  the bug is already fixed and it isn't necessarily a problem with portage.

*** This bug has been marked as a duplicate of bug 563934 ***