Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 913171 - dev-lang/perl-5.36.1-r3 fails to cross-build for sparc64-gentoo-linux-gnu
Summary: dev-lang/perl-5.36.1-r3 fails to cross-build for sparc64-gentoo-linux-gnu
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: Sparc64 Linux
: Normal normal (vote)
Assignee: Gentoo Perl team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-28 21:05 UTC by 2857
Modified: 2024-05-22 02:21 UTC (History)
1 user (show)

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


Attachments
build.log (build.log,90.52 KB, text/plain)
2023-08-28 21:07 UTC, 2857
Details
emerge --info (host) (emerge--info.host.txt,6.00 KB, text/plain)
2023-08-28 21:10 UTC, 2857
Details
emerge --info (crossdev) (emerge--info.target.txt,5.39 KB, text/plain)
2023-08-28 21:11 UTC, 2857
Details

Note You need to log in before you can comment on or make changes to this bug.
Description 2857 2023-08-28 21:05:23 UTC
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
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-08-28 21:07:21 UTC
Please attach the full build.log (ansifilter it first) and emerge --info.
Comment 2 2857 2023-08-28 21:07:32 UTC
Created attachment 868918 [details]
build.log
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-08-28 21:08:21 UTC
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':
[...]
Comment 4 2857 2023-08-28 21:10:47 UTC
Created attachment 868919 [details]
emerge --info (host)
Comment 5 2857 2023-08-28 21:11:13 UTC
Created attachment 868920 [details]
emerge --info (crossdev)
Comment 6 Larry the Git Cow gentoo-dev 2023-08-28 22:08:04 UTC
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(-)
Comment 7 Larry the Git Cow gentoo-dev 2024-05-22 02:21:31 UTC
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(+)