Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cross-compiled Perl lacks some modules #2

Open
lenticularis39 opened this issue Jul 22, 2021 · 4 comments
Open

Cross-compiled Perl lacks some modules #2

lenticularis39 opened this issue Jul 22, 2021 · 4 comments
Labels
bounty-S (20€) Bounty Small

Comments

@lenticularis39
Copy link
Contributor

lenticularis39 commented Jul 22, 2021

When cross-compiling Perl (tested on x86_64 -> hppa, might happen on other archs), the resulting package is much smaller than when native compiling:

bash-5.1# wc -l /var/adm/flists/perl
5684 /var/adm/flists/perl
bash-5.1# wc -l build/hypatia-21-svn-generic-hppa-cross-linux/var/adm/flists/perl 
1703 build/hypatia-21-svn-generic-hppa-cross-linux/var/adm/flists/perl

After examining the flists it's apparent that many modules are missing from the cross-compiled package (maybe a gcc cross compiling problem?), for example Scalar/Util.pm.

The full flists are attached to the issue, along with the cross compilation build log.

cross.flist.log
cross.log.gz
native.flist.log

@rxrbln
Copy link
Owner

rxrbln commented Jul 23, 2021

Does perl in t2/trunk currently even cross compile? ;-)
Decades ago this was by design as more did usually not cross compile, maybe now with the restructured 1 and 2 cross stages we could build a more full features perl in 2-perl?
If anyone using Perl wants to give modifying the perl.{desc,conf} a try for that and post the result it would be helpful.

@lenticularis39
Copy link
Contributor Author

It doesn't have the CROSS flag set, but unlike some time ago Perl itself cross compiles fine, it's only the bundled modules which fail. Having Perl cross compiled would help, because it's a common package which takes some time to build on older systems.

I'll probably have a look at it myself when I get to it, I reported the issue mostly to track it for myself :)

@rxrbln
Copy link
Owner

rxrbln commented Jul 23, 2021

IIRC I removed the CROSS flag recently as it did not cross build for me, and I did not wanted bootstraps to error out on perl. So from my experience Perl used to cross-build as patched or configured in t2 until recently. Though this native mini perl hack needed some re-diffing every other year anyways ;-)

@lenticularis39
Copy link
Contributor Author

After investigating the log it's clear that it's trying to execute the cross-compiled perl binary at some point:

./perl: 1: Syntax error: ")" unexpected

It's quite unbelievable that after so many years Perl still hasn't be able to make the build system cross-compile aware, requiring patches or hacks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bounty-S (20€) Bounty Small
Projects
None yet
Development

No branches or pull requests

2 participants