tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Samba (3.x) getting rid of Perl

> Date: Sat, 20 Jul 2019 17:17:43 +0200
> From:
> On Sat, Jul 20, 2019 at 09:49:55AM -0400, Greg Troxel wrote:
> > Also, as you pursue cross, I think you're going to need a way to build
> > native sometimes, and pkg_add them in, and once you do this samba is not
> > so bad.
> > 
> > I also wonder if perl can be taught to use a native perl that it depends
> > on, and how pkgsrc would cope  with native tools in a cross build like
> > this, conditionally.
> Taylor R Campbell has set the cross-compiling stuff so that it can
> use the build tools when building not falsely requiring "native"
> ones. But, AFAIK, if a run dependency is not "installed", pkgsrc
> will try to build it. This is a vicious circle since Perl is not
> cross-compilable the way its building framework has been designed.

Right, when it's just TOOL_DEPENDS or USE_TOOLS (without :run), pkgsrc
will build the native package it needs.  What I think gdt meant is
that, while you can't cross-compile Perl, you can do something like

# Natively compile just Perl on the slow evbarm board.
ssh targethost 'cd /usr/pkgsrc/lang/perl5 && make package'

# Make it available as a cross-package on the fast build host.
ssh targethost 'cd /usr/pkgsrc/packages && tar cf - All/perl5-*.tgz' | (cd /usr/pkgsrc/packages.evbarm && tar xvf -)

# Cross-compile anything that depends on Perl on the fast build host.
cd /usr/pkgsrc/net/samba && make package

If you do that, then you can make progress cross-compiling any package
that depends on Perl, but it's a manual step; of course, you can also
get rid of the Perl dependency and avoid the manual step, but it
requires changes package-by-package.

(Obviously it would be better if Someone^TM taught pkgsrc to do this
automatically in qemu-user-arm or something.)

Home | Main Index | Thread Index | Old Index