Perl fails to cross compile for sparc with rather cryptic Segfault from make Reproducible: Always Steps to Reproduce: 1. crossdev -S -t sparc64-gentoo-linux-gnu 2. emerge anything which needs perl or perl itself 3. segfault
Please attach the full build.log (ansifilter it first) and emerge --info.
Created attachment 868918 [details] build.log
perl.h:2089:25: warning: implicit declaration of function 'memrchr'; did you mean 'memchr'? [-Wimplicit-function-declaration] 2089 | # define my_memrchr memrchr | ^~~~~~~ toke.c:699:36: note: in expansion of macro 'my_memrchr' 699 | char * const nl = (char *) my_memrchr(s, '\n', len); | ^~~~~~~~~~ toke.c:699:27: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] 699 | char * const nl = (char *) my_memrchr(s, '\n', len); | ^ In file included from perl.h:4163: toke.c: In function 'S_scan_heredoc': util.h:250:23: warning: implicit declaration of function 'memmem'; did you mean 'memset'? [-Wimplicit-function-declaration] 250 | ((char *) memmem((big), (bigend) - (big), \ | ^~~~~~ util.h:250:23: note: in definition of macro 'ninstr' 250 | ((char *) memmem((big), (bigend) - (big), \ | ^~~~~~ util.h:250:14: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] 250 | ((char *) memmem((big), (bigend) - (big), \ | ^ toke.c:10980:32: note: in expansion of macro 'ninstr' 10980 | char * found = ninstr(s, PL_bufend, (PL_tokenbuf + 1), (PL_tokenbuf +1 + len)); | ^~~~~~ toke.c: In function 'Perl_scan_str': [...]
Created attachment 868919 [details] emerge --info (host)
Created attachment 868920 [details] emerge --info (crossdev)
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5f99dd3b27a460f89596ca147bb30877c186151c commit 5f99dd3b27a460f89596ca147bb30877c186151c Author: Sam James <sam@gentoo.org> AuthorDate: 2023-08-28 22:05:33 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2023-08-28 22:06:29 +0000 dev-lang/perl: fix segfault w/ cross + musl, filter LTO properly Implicit function declarations need to burn. While at it, modernise filtering LTO. Closes: https://bugs.gentoo.org/913171 Signed-off-by: Sam James <sam@gentoo.org> dev-lang/perl/perl-5.36.1-r3.ebuild | 5 ++++- dev-lang/perl/perl-5.38.0-r1.ebuild | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=28d6c27f171133bb0f3c2c9330960211630d2840 commit 28d6c27f171133bb0f3c2c9330960211630d2840 Author: Sam James <sam@gentoo.org> AuthorDate: 2024-05-22 02:20:51 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2024-05-22 02:20:51 +0000 dev-lang/perl: pass -D_GNU_SOURCE for the cross build for CHOST too We need it there as well. Bug: https://bugs.gentoo.org/913171 Closes: https://bugs.gentoo.org/932385 Signed-off-by: Sam James <sam@gentoo.org> dev-lang/perl/perl-5.38.2-r5.ebuild | 3 +++ 1 file changed, 3 insertions(+)