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

Re: ARM Ports BoF: armel in buster



On 08/28/2017 06:30 PM, W. Martin Borgert wrote:
> AFAIK, there is no policy requiring that packages can be cross-build.

We are working on something like that, but it's a larger goal. Basically,
we're planning to have cross-buildds which will additionally test packages
for cross-buidability.

One step in that direction is Helmut Grohne's rebootstrap [1].

> But my experience is quiet good with this:
> 
> ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- dpkg-buildpackage -rfakeroot -aarmel ...
> 
> I don't remember what the ARCH variable is used for.
> Maybe it is not needed.

You shouldn't be building packages like that if you want to guarantee that they
will actually work in the target environment since your approach is not building
in a clean environment. Also, this way you will have to install all build dependencies
yourself.

The proper way is simply to specify the target architecture with "--host" when
using sbuild:

sbuild --host=armel -d stretch --no-arch-all $PACKAGE.dsc

That's it.

Minor problem is that at the moment the necessary cross-build-essential packages
aren't built for all architectures but only for the major ones. But adding the
other architectures is a matter of filing a bug report against src:build-essential
and having Matthias upload an updated version. All arm* architectures are already
included in any case.

>> At least doing so sidesteps a number of issues including agreement of dynamic
>> library content between the native/cross toolchains such that mixing the distro
>> and application bits happens under effectively the same runtime libraries.
> 
> Yes, we develop for squeeze in a squeeze chroot or VM, and for stretch
> in a stretch container. Multi-arch makes things easy on stretch, that
> were difficult on squeeze (dpkg-cross, apt-cross, ...).

Or just create chroots for the architectures you need with qemu-debootstrap. No
need to use any fancy containerization fuzz. All you ever needed was a chroot
and sbuild, no need for a bigger software stack written in Golang on top of that.

Adrian

> [1] https://jenkins.debian.net/view/rebootstrap/

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaubitz@debian.org
`. `'   Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913


Reply to: