Created attachment 457856 [details]
emerge log when perl compilation fails.
When cross compiling perl just after emerge -C perl, the dependency DynaLoader.pm may not be present.
Emerging with option MAKEOPTS+=" -j1" works around the problem.
Created attachment 457860 [details]
Log when using make -j1 instead of -j40.
Comparing the 2 logs, when compiling simultaneously, the first failure is Mkbootstrap, at line 3525.
The makefile for DynaLoader has been prepared at line 3415, compilation starts at line 3424, but finishing the compilation, with command
"cp DynaLoader.pm ../../lib/DynaLoader.pm" would only happen line 3556, after the file is needed.
Although there are rules in Makefile to compile DynaLoader early, it looks like the extensions are not bound by that requirement.
Created attachment 457898 [details, diff]
Working fix for dependency
This fix addresses the problem.
Comparing the emerge log with a failed one, DynaLoader.pm is build at the same time as the Makefiles for the extensions are generated.
Created attachment 457900 [details]
Successful emerge with patch attached in 457898.
Created attachment 457902 [details]
The patch is not good, it did not prevent this error: Dynaloader was not completed when needed by I18N::Langinfo and Fcntl. It completed few lines later...
+ Only happen on cross compilation (using a makefile generated from perl-cross.
+ Not always reproducible: sometimes, we are luck DynaLoader.pm is built before the first extension compilation needs it.
I've added the MAKEOPTS+=" -j1" workaround in 5.24.1-r1 (only for cross-compiling).
Let's keep the bug open though.
I happened to overlook this myself when I stumbled into CC problems, and fixed one, particularly, I added this fix to 5.24 and 5.22:
sed -i \
-e 's|^lib/unicore/CombiningClass.pl pod/perluniprops.pod:|lib/unicore/CombiningClass.pl pod/perluniprops.pod: $(CONFIGPM)|' \
Makefile || die
Which extends the make rule to fix make ordering.
And we've bumped perl-cross since this bug was filed too, which could have an impact on things. ( As well as bumping perl itself )
I'd be interested if you can still reproduce this failure without dilfridges added MAKEOPTS hack.
Recently I noticed that dev-lang/perl was built with -j1 -j12 when using cross-emerge. Reading #6 makes me think that this was not an accident, but that it is a desired behavior?
It's been =dev-lang/perl-5.26.2
How can I disable the hack from #6 to test if this still is a problem?
Does not break cros emerge.
I try over multiple days and the error originally reported did not show up.