Created attachment 744957 [details] build.log chmod 755 ../../lib/auto/Digest/SHA/SHA.so cp shasum blib/script/shasum /home/sam/gentoo2/var/tmp/portage/dev-lang/perl-5.34.0-r3/work/perl-5.34.0/cpan/Digest-SHA/../../miniperl "-I../../lib" -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/shasum make[1]: Leaving directory '/home/sam/gentoo2/var/tmp/portage/dev-lang/perl-5.34.0-r3/work/perl-5.34.0/cpan/Digest-SHA' LD_LIBRARY_PATH=/home/sam/gentoo2/var/tmp/portage/dev-lang/perl-5.34.0-r3/work/perl-5.34.0 ./miniperl -Ilib make_ext.pl lib/auto/Encode/Encode.so MAKE="make" LIBPERL_A=libperl.so.5.34.0 LINKTYPE=dynamic Can't figure out your cwd! at /home/sam/gentoo2/var/tmp/portage/dev-lang/perl-5.34.0-r3/work/perl-5.34.0/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm line 238. Unsuccessful Makefile.PL(cpan/Encode): code=512 at make_ext.pl line 532. make: *** [makefile:575: lib/auto/Encode/Encode.so] Error 2 * ERROR: dev-lang/perl-5.34.0-r3::gentoo failed (compile phase): * emake failed
It seems that perl's Cwd module wants to use the pwd command from coreutils, before we have coreutils installed in the prefix. See https://metacpan.org/dist/PathTools/source/Cwd.pm#L183-210. For anyone hitting this, I could work around this bug by copying /usr/bin/pwd to ${EPREFIX}/usr/bin. Once I find a reasonable fix I will update perl's ebuild.
Applying upstream merged PR 18791 fixed perl build for me (on Linux kernel)
(In reply to Étienne Buira from comment #2) > Applying upstream merged PR 18791 fixed perl build for me (on Linux kernel) Woo! I'm currently trying to test it but now GCC is ICEing on latest Ubuntu...
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d14561cb100beb18ac4df11726c116af4b0070b6 commit d14561cb100beb18ac4df11726c116af4b0070b6 Author: Sam James <sam@gentoo.org> AuthorDate: 2021-10-28 03:52:38 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2021-10-28 03:52:38 +0000 dev-lang/perl: apply patch (prefix-only) for bootstrapping Perl may not be able to find 'pwd' during bootstrap because coreutils may not be installed in the new Prefix yet. This is an upstream patch to allow falling back to the internal getcwd() to avoid build failure. Bug: https://github.com/Perl/perl5/issues/18703 Closes: https://bugs.gentoo.org/818172 See: https://github.com/Perl/perl5/pull/18791 Signed-off-by: Sam James <sam@gentoo.org> .../files/perl-5.34.0-fallback-getcwd-pwd.patch | 263 +++++++++++++++++++++ dev-lang/perl/perl-5.34.0-r5.ebuild | 6 + 2 files changed, 269 insertions(+)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a2b25786b7c58d2390bbeb2b5a231e54f71caaf6 commit a2b25786b7c58d2390bbeb2b5a231e54f71caaf6 Author: Guilherme Amadio <amadio@gentoo.org> AuthorDate: 2022-03-17 11:47:45 +0000 Commit: Guilherme Amadio <amadio@gentoo.org> CommitDate: 2022-03-17 11:48:08 +0000 dev-lang/perl: fix patch name for 5.34.1 on prefix Bug: https://bugs.gentoo.org/818172 Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Guilherme Amadio <amadio@gentoo.org> dev-lang/perl/perl-5.34.1.ebuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)