Created attachment 590870 [details] build.log I'm trying to run emerge --root=/path/to/empty/directory @system, and libgcrypt 1.8.3 is failing to build, because it says it can not find libgpg-error. Over on the forums, Hu said "For what it is worth, the problem seems to be that the ebuild set GPG_ERROR_CONFIG="${EROOT}/usr/bin/${CHOST}-gpg-error-config", and configure accepted that on faith. Your problem is that either (1) the ebuild shouldn't be using that path or (2) Portage should have installed that tool into the root first" Installing libgpg-error to the new root did not resolve the issue.
After installing libgpg-error to the chroot, it is under not x86_64-pc-linux-gnu-gpg-error-config but simply gpg-error-config, so that looks like why it still doesn't work. I think the problem is that the ebuild shouldn't be throwing $CHOST in there.
${ROOT} and ${EROOT} should not be used in src_* phases. Suggested change: - GPG_ERROR_CONFIG="${EROOT}/usr/bin/${CHOST}-gpg-error-config" + GPG_ERROR_CONFIG="${ESYSROOT}/usr/bin/${CHOST}-gpg-error-config"
That alone won't fix it since there is no $CHOST- prefix on gpg-error-config. I'm not sure why it is adding that prefix when built with --root=, and doesn't seem to otherwise.
FWIW, at least now, x86_64-pc-linux-gnu-gpg-error-config exists for me.