Recent advances in cross building src:perl
Wookey
wookey at wookware.org
Sat Jan 23 23:47:32 UTC 2016
+++ Niko Tyni [2016-01-23 22:45 +0200]:
> Hi,
>
> I've been working on cross build support for src:perl, which has
> been a sore point for quite some time. Current results are on the
> ntyni/cross-5.22 branch on alioth (but might still get rebased/rewritten):
>
> https://anonscm.debian.org/cgit/perl/perl.git/log/?h=ntyni/cross-5.22
Excellent. Thanks for putting in some effort on this. Perl is the
hardest bit to cross in essential, and as the rest of the system
progresses on this front it sticks out more and more :-)
> Summary: Configure still needs runtime probes, but the resulting probed
> configuration data can be fed into a cross build with a separate binary
> package, currently called perl-config-data. This is the same approach that
> Neil Williams worked on with src:perl-cross-debian a couple of years ago,
> but we now build the package from src:perl itself.
>
> Bootstrapping a new architecture could be achieved by manually preparing
> the configuration data package, probably by modifying one for an existing
> similar architecture. I'm open to suggestions on how to make this as
> easy as possible.
Right. This is feasible, but awkward on genuinely new arches where you
don't have any hardware.
The thing about the perl config data is that mostly it all just
depends on a few features of the arch (like type sizes, endianness and
packing rules), but rather than just using a list of type sizes, it
uses this huge list of things which nearly all in fact boil down to
type sizes, endianness and packing rules.
Some way of listing the small set of variable arch data, rather than
the large set of perl config items dervied from it would be really
nice (but I understand that that's hard, and really for upstream). i.e
so we could list 15 things, not 200.
> Thanks to past upstream work by Jess Robinson and Neil, this level of
> cross build support needed only three upstream changes, one of which
> is trivial and another (podlators) already merged. People wanting to
> see the remaining issue of Configure cross-compiling support fixed are
> invited to read https://rt.perl.org/Ticket/Display.html?id=124326 and
> volunteer to help upstream.
>
> As a proof of concept, I've also implemented a 'stage1' build profile
> that only builds the perl-config-data binary package. However, I'm not
> really sure how useful that is. The idea there is that a functional but
> slow Debian architecture could run just the configuration probes natively
> (or reuse old configuration data on minor upgrades), and the rest could
> be cross built. I suspect this doesn't help real bootstrapping, as the
> various dpkg-dev tools require a working /usr/bin/perl to put any package
> together in the first place.
Right. The native-configure step is still fatal there. But so long as
we can get a perl-config-data somehow, then rebootstrapping perl
becomes straightforward.
> I'm not sure if it's viable to upload this into experimental at
> this point; the buildds probably don't have #809730 fixed yet,
> do they? Without that fix, sbuild applies the cross build dependency
> on perl-config-data to native builds too and bails out straight away.
Ah, that's awkward.
> Also, we'll be needing experimental for staging 5.24 in a few months so
> maybe it would be better to use a custom repository for testing this?
I'll stick it in the 'not in debian yet' cross things repository at
http://emdebian.org/tools/debian/ so it can be easily used/installed
(I can give you upload rights if you want to keep it updated there for
a while).
> In the long run, I can see cross building eventually replacing our
> current somewhat half-baked new architecture bootstrapping support that
> is the reason we need to roll our own horrific debian/rules and can't
> use debhelper et al. I think I'd want to see how this stuff rebases on
> a couple of upstream releases first before declaring it stable, though.
>
> In any case, I'd be interested in comments and thoughts on this.
> Is it useful, or just a worthless workaround as long as the Configure
> issues remain unsolved?
Definitely useful, and thanks very much for moving this forward. The
underlying issue of not being able to cross-configure still makes perl
awkward, but being able to painlessly cross-build it after one
bootstrap step is a major improvement. Do we need to make a new set of
perl-config-data for every arch on every minor release still?
Is the idea that each binary build on the buildds will generate the
corresponding perl-config-data so they will be automatically available
once a new upload is built on each arch?
Wookey
--
Principal hats: Linaro, Debian, Wookware, ARM
http://wookware.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/perl-maintainers/attachments/20160123/133cf5b6/attachment.sig>
More information about the Perl-maintainers
mailing list