This is an auto-filed bug because dev-lang/perl calls cc directly. The issue was originally discovered on amd64, but it may be reproducible on other arches as well. If you think that a different summary clarifies the issue better, feel free to change it. Attached build log and emerge --info. NOTE: If you think it doesn't make sense fix these type of issues, I'd like to point out that won't be possible use a different CC implementation (like clang) by setting the CC variable. So this issue has been reproduced by setting the CC variable to x86_64-pc-linux-gnu-gcc and by removing the /usr/bin/cc - /usr/bin/gcc binaries.
Created attachment 640124 [details] build.log build log and emerge --info
Important context from QA report: ./hints/linux.sh: line 174: gcc: command not found Configure: line 6387: nm: command not found Configure: line 22940: cpp: command not found While these aren't fatal for perl's build, like ar, they're likely to lead to bad consequences.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=10f82b45e3946956fec887a87ce4ceb6c11fc680 commit 10f82b45e3946956fec887a87ce4ceb6c11fc680 Author: Kent Fredric <kentnl@gentoo.org> AuthorDate: 2020-05-18 13:15:12 +0000 Commit: Kent Fredric <kentnl@gentoo.org> CommitDate: 2020-05-18 13:18:45 +0000 dev-lang/perl: More TC love for nm/cpp/ranlib re bug #723734 While this won't fix the warnings about hints/linux.sh, as that is something too complex for me to trivially fix, it should mitigate the warnings about nm and cpp, and additonally, guards against a possible future where ranlib is also nuked and later tried to be used from $Config{ranlib} -r bump for compile propagation reasons, real delta: --- a/dev-lang/perl/perl-5.30.2-r1.ebuild +++ b/dev-lang/perl/perl-5.30.2-r2.ebuild @@ -502,11 +502,16 @@ src_configure() { # allow fiddling via EXTRA_ECONF, bug 558070 eval "local -a EXTRA_ECONF=(${EXTRA_ECONF})" + # setting -Dld= to tc-getLD breaks perl and all perl things + # https://github.com/Perl/perl5/issues/17791#issuecomment-630145202 myconf \ -Duseshrplib \ -Darchname="${myarch}" \ -Dcc="$(tc-getCC)" \ -Dar="$(tc-getAR)" \ + -Dnm="$(tc-getNM)" \ + -Dcpp="$(tc-getCPP)" \ + -Dranlib="$(tc-getRANLIB)" \ -Doptimize="${CFLAGS}" \ -Dldflags="${LDFLAGS}" \ -Dprefix="${EPREFIX}"'/usr' \ Bug: https://bugs.gentoo.org/723734 Bug: https://github.com/Perl/perl5/issues/17791#issuecomment-630123559 Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Kent Fredric <kentnl@gentoo.org> dev-lang/perl/perl-5.30.2-r2.ebuild | 659 ++++++++++++++++++++++++++++++++++++ 1 file changed, 659 insertions(+)
For now, this: > ./hints/linux.sh: line 174: gcc: command not found Seems like a red herring, but the code involved is a bit of a nightmare: https://metacpan.org/source/SHAY/perl-5.30.2/hints/linux.sh#L166-206 This could *potentially* mess up plibpth computation, and possibly libquadmath support. The rest are addressed.
This is now in 5.32.1
I wonder if Kent made a mistake at https://github.com/Perl/perl5/issues/17791#issuecomment-630145202. We don't ever really care about LD, it's deprecated to use it as a path to the actual linker. --ld=$(tc-getCC) seems to work for me so far in some brief testing (Module::Install doesn't respect CCLD), and we already do 'export CCLD=$(tc-getCC)' and 'unset LD' in perl-module.eclass.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c399cbd07731158823bef61ad97058db365f8aea commit c399cbd07731158823bef61ad97058db365f8aea Author: Sam James <sam@gentoo.org> AuthorDate: 2024-05-04 10:42:07 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2024-05-10 17:28:03 +0000 dev-lang/perl: respect CC for LD too As I remarked at https://bugs.gentoo.org/723734#c6, I suspect trying to respect LD specifically was a mistake. Calling LD directly at all is deprecated and people should do it via the compiler driver, hence set LD="$(tc-getCC)". Note that we already unset LD anyway since 6eb964b504c3aef2192403cbf383ae75d46990ff. Bug: https://bugs.gentoo.org/723734 Signed-off-by: Sam James <sam@gentoo.org> dev-lang/perl/perl-5.38.2-r4.ebuild | 863 ++++++++++++++++++++++++++++++++++++ 1 file changed, 863 insertions(+)