The output is: >>> Install libspnav-0.2.2 into /home/user/gentoo/var/tmp/portage/dev-libs/libspnav-0.2.2/image/ category dev-libs make -j6 DESTDIR=/home/user/gentoo/var/tmp/portage/dev-libs/libspnav-0.2.2/image/ install mkdir -p /home/user/gentoo/var/tmp/portage/dev-libs/libspnav-0.2.2/image//tmp/gentoo/usr/lib /home/user/gentoo/var/tmp/portage/dev-libs/libspnav-0.2.2/image//tmp/gentoo/usr/include cp libspnav.so.0.1 /home/user/gentoo/var/tmp/portage/dev-libs/libspnav-0.2.2/image//tmp/gentoo/usr/lib/libspnav.so.0.1 for h in spnav.h spnav_magellan.h spnav_config.h; do cp -p ./$h /home/user/gentoo/var/tmp/portage/dev-libs/libspnav-0.2.2/image//tmp/gentoo/usr/include/; done mv: cannot stat '/home/user/gentoo/var/tmp/portage/dev-libs/libspnav-0.2.2/image//usr/lib': No such file or directory * ERROR: dev-libs/libspnav-0.2.2::gentoo failed (install phase): * (no error message) * * Call stack: * ebuild.sh, line 124: Called src_install * environment, line 1838: Called die * The specific snippet of code: * mv "${D}"/usr/{lib,$(get_libdir)} || die; In order to support Gentoo Prefix the only change needed is what is mentioned here: https://wiki.gentoo.org/wiki/Project:Prefix/Technical_Documentation#The_variables_ED_and_EROOT Change ${D} to ${ED}. I've tried the change and it makes the installation successful in Gentoo Prefix (amd64, over Ubuntu 16.04, but should be the same for x86 and any other base OS).
the offending mv has disappeared from the ebuild