On Monday 27. August 2018 16.05.01 Gabriele Svelto wrote:
>
> On 26/08/2018 15:39, Paul Boddie wrote:
> > The first approach I used involved building packages on the CI20 itself
> > under Debian. I chose this to avoid cross-compiling since Arch, like
> > many distributions, doesn't really support cross-building the
> > distribution. Here I experienced problems with getting packages to build
> > against newly-built packages, not things on the system, and I find it
> > astonishing how inconsistent and generally poor things like autotools
> > are for this: one ends up doing all sorts of ...FLAGS hacks in an
> > attempt to direct these tools to the proper resources; things like
> > build, host and target separation are strictly for cross-compiling.
>
> Doing that by hand is extremely time consuming and error prone.
Indeed. Still, it is incredible that here we are in the year 2018 and the
tools are still as cumbersome as they always have been. It should really be
possible to nominate filesystem locations not only for installation but also
as the sources of headers and libraries.
Maybe newer build tools try and deal with some of these issues, but they
always seem to have their own peculiarities, too.
[...]
> However, building an image on Gentoo is very easy. First of all there's
> crossdev [2] available which enables you to build packages locally as if
> you were doing it within the target environment. Then the image can be
> assembled using catalyst [3]. The trick is that you can always chroot
> within an environment that contains the target files but is using the
> cross-compiler to build stuff. I don't know if crossdev can be reused
> for building other distros but it might be worth a try.
It seems to involve qemu for some things, which always makes me a bit
skeptical. I guess you didn't need to resort to using qemu, though, because
you were able to build everything on the CI20 itself.
I have been told that Debian is much improved for cross-building, even though
doing so for the entire archive has never been an official objective, and that
general distribution bootstrapping is more approachable than ever. It will
soon be impossible for me to not investigate this, I imagine.
Thanks for the information about Gentoo!
Paul