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

Bug 491240

Summary: toolchain.eclass - Adjust ld.so.conf and run ldconfig before unmerging old GCC version
Product: Gentoo Linux Reporter: haarp <main.haarp>
Component: EclassesAssignee: Gentoo Toolchain Maintainers <toolchain>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description haarp 2013-11-14 15:09:34 UTC
When upgrading GCC, my system invariably breaks during the unmerge of the old version. Example:

System gcc: 4.7.3
upgrading gcc-4.8.2 to 4.8.3

during the final merge stage:
 * The 'postrm' phase of the 'sys-devel/gcc-4.8.1-r1' package has failed
 * with exit value 1.
-- dynamic linking broken, system unusable

Which is because the dynamic linking still refers to the now-unmerged files::

# busybox cat /etc/ld.so.conf.d/05gcc-x86_64-pc-linux-gnu.conf 
/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.1/32
/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.1
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/32
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3

Removing the paths referring to 4.8.1 (luckily busybox is statically linked), then running ldconfig makes the system usable again. This should be done automatically and PRIOR to unmerging this GCC version.
Comment 1 Ryan Hill (RETIRED) gentoo-dev 2013-11-15 05:09:43 UTC

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