Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 818172 - dev-lang/perl-5.34.0-r3: fails to build during prefix bootstrap
Summary: dev-lang/perl-5.34.0-r3: fails to build during prefix bootstrap
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-14 18:47 UTC by Sam James
Modified: 2022-03-17 11:50 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (file_818172.txt,108.35 KB, text/plain)
2021-10-14 18:47 UTC, Sam James
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-10-14 18:47:22 UTC
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
Comment 1 Guilherme Amadio gentoo-dev 2021-10-27 11:46:12 UTC
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.
Comment 2 Étienne Buira 2021-10-28 02:59:13 UTC
Applying upstream merged PR 18791 fixed perl build for me (on Linux kernel)
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-10-28 03:35:25 UTC
(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...
Comment 4 Larry the Git Cow gentoo-dev 2021-10-28 03:53:58 UTC
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(+)
Comment 5 Larry the Git Cow gentoo-dev 2022-03-17 11:50:35 UTC
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(-)