I get these errors: sed: can't read /var/tmp/portage/libart_lgpl-2.3.8-r2/image/usr/lib/libart_lgpl_2.la: No such file or directory It seems that it is searching for libraries in the portage-temp-directory and not in /usr/lib. So it seems to be a problem of the prefix-var.
solved.