segfaults and libjpeg.so.62 missing after update

I updated my Gentoo system last week (amd64) and ran into multiple problems.

Due to compile errors on many ebuilds I decided to run a revdep-rebuild. After about an hour it recognized that about 380 ebuilds were broken and had to be remerged. I began but could not finish that day so I left revdep-rebuild (which happened to stop due to an error anyway) and shut my system down.

The next day I realized that about half my system was broken. CUPS crashed repeatedly, reporting a segfault with libc whenever I tried to print anything (visible in the kernel log). Remerging cups or glibc did not help, so I went to the Gentoo forums and found the advise to run

emerge -e system 
etc-update 
perl-cleaner all 
python-updater 
emerge -1 libtool 
revdep-rebuild

It took a long time involving the usual stop-and-go caused by build errors but finally it finished. CUPS worked again and so did most of the system. Unfortunately 64 bit binaries like nxclient still did not run because libjpeg.so.62 did not exist any longer. Well, it did for 32 bit apps (so the 32 bit Firefox binary could still run) but not for 64 bit. (the 32 bit version is belongs to app-emulation/emul-linux-x86-baselibs) As usual, linking to the 32 bit library was without success (wrong ELF architecture) and linking to libjpeg.so.7 didn’t work well (I was able to run NX but all JPEGs were missing).

I was lucky enough to find a rather unrelated bug report on the bugtracker that indicates there is a second ebuild for libjpeg called media-libs/jpeg-compat which actually contains the missing 64 bit version of libjpeg.so.62. Having emerged that everything works fine again now.