The compatibility code to create the ABI symlink assumes there is an existing root file system layout. > # emerge --{,sys}root=/tmp/newroot -1v sys-apps/baselayout > >>> Emerging (1 of 1) sys-apps/baselayout-2.7-r3::gentoo for /tmp/newroot/ > * baselayout-2.7.tar.bz2 BLAKE2B SHA512 size ;-) ... [ ok ] > * symlinking /tmp/newroot/lib64 to usr/lib64 > * symlinking /tmp/newroot/lib to usr/lib > ln: failed to create symbolic link '/tmp/newroot/lib64/lp64d': No such file or directory It is failing when /lib exists but is a broken symlink to /usr/lib (before /usr is created), so I don't think it can just create the parent directory. It might need to reorder the multilib_layout paths.
This can be run beforehand as a workaround: > mkdir -p "$ROOT/usr/lib64"
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c6dce91299dc71c90f302e2d25828f7b2dfff477 commit c6dce91299dc71c90f302e2d25828f7b2dfff477 Author: Andreas K. Hüttel <dilfridge@gentoo.org> AuthorDate: 2023-01-24 22:56:50 +0000 Commit: Andreas K. Hüttel <dilfridge@gentoo.org> CommitDate: 2023-01-24 22:56:50 +0000 sys-apps/baselayout: Fix merged-usr riscv case Closes: https://bugs.gentoo.org/796893 Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org> sys-apps/baselayout/baselayout-2.9-r1.ebuild | 370 +++++++++++++++++++++++++++ sys-apps/baselayout/baselayout-9999.ebuild | 2 +- 2 files changed, 371 insertions(+), 1 deletion(-)