Portage Errors: ld: cannot find -lpng12
After upgrading libpng you may encounter this error when compiling packages that depend on it or related libraries:
/usr/lib/gcc/i686-pc-linux-gnu/4.5.3/../../../../i686-pc-linux-gnu/bin/ld: cannot find -lpng12 collect2: ld returned 1 exit status make[2]: *** [librsvg-2.la] Error 1 make[2]: Leaving directory `/var/tmp/portage/gnome-base/librsvg-2.34.1-r1/work/librsvg-2.34.1' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/gnome-base/librsvg-2.34.1-r1/work/librsvg-2.34.1' make: *** [all] Error 2 * ERROR: gnome-base/librsvg-2.34.1-r1 failed (compile phase): * emake failed * * If you need support, post the output of 'emerge --info =gnome-base/librsvg-2.34.1-r1', * the complete build log and the output of 'emerge -pqv =gnome-base/librsvg-2.34.1-r1'. * The complete build log is located at '/var/tmp/portage/gnome-base/librsvg-2.34.1-r1/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/gnome-base/librsvg-2.34.1-r1/temp/environment'. * S: '/var/tmp/portage/gnome-base/librsvg-2.34.1-r1/work/librsvg-2.34.1'
Resolve by recompiling reverse dependencies:
# revdep-rebuild --library libpng12.so.0