I’ve just created a new Gentoo installation, finished building the world, and then ran emerge -avc to clean the unnecessary packages. As usual. But depclean removed the sys-devel-binutils-2.28-r2, which was in use by the compiler, and leaving binutils-2.28.1. After depclean I’ve discovered, that my system cannot build a single package, because of errors like x86_64-pc-linux-gnu-gcc: error trying to exec 'as': execvp: No such file or directory during the merge of some userspace library, or this one checking for x86_64-pc-linux-gnu-gcc... x86_64-pc-linux-gnu-gcc checking whether the C compiler works... no configure: error: in `/var/tmp/portage/sys-devel/libtool-2.4.6-r4/work/libtool-2.4.6': configure: error: C compiler cannot create executables See `config.log' for more details while attempting to recompile libtool. The issue is in broken symlinks # LC_TIME=C ls -l /usr/x86_64-pc-linux-gnu/bin/as lrwxrwxrwx 1 root root 45 Jul 20 07:24 /usr/x86_64-pc-linux-gnu/bin/as -> /usr/x86_64-pc-linux-gnu/binutils-bin/2.28/as (here ‘as’ was present only in …/2.28.1/ folder). The issue was solved thanks to myself. I always compile toolchain twice and the second time – with creating binary packages, so all I had to do is emerge -Kav =binutils-2.28-r2. I’d like to know, though, what should I do to avoid such breakage in the future, i.e. either prevent binutils in use from deletion, or fix the symlinks for the new binutils? ‘Upgrading GCC’ on Gentoo wiki doesn’t cover this case.
I’ve installed binutils-2.28.1, libtool and gcc from binary packages again, but that didn’t solve the issue (installing binutils-2.28-r2 from the binary package did).
(In reply to dtr from comment #1) > I’ve installed binutils-2.28.1, libtool and gcc from binary packages again, > but that didn’t solve the issue (installing binutils-2.28-r2 from the binary > package did). binutils-config -l && binutils-config 2 or whatever version your wanting to set will work.
Oh, thank you.