[Kernel-meetup] Kernel meetup summary [28th Jan 2017]

Siddhesh Poyarekar sid at reserved-bit.com
Tue Feb 7 02:16:08 PST 2017


On Tuesday 07 February 2017 03:19 PM, Amit Kucheria wrote:
> I'm interested in understanding why Ubuntu multilib and
> cross-compilers can't coexist. I'd like the ability to compile for
> x86_32, x86_64, and aarch64 and arm32 on the same machine. But the
> debian/ubuntu toolchain maintainer doesn't think I should be able to
> do this w/o chroots or jumping through other hoops[1].
> 
> [1] https://bugs.launchpad.net/ubuntu/+source/gcc-defaults/+bug/1300211

I am not familiar with Ubuntu multilib, but I am guessing the problem is
more to do with distribution management than actual technical
limitation. We had considered doing something like this in the past in
Fedora, where one could set up multiple sysroots for different
architectures for cross-builders to use but we never really did it
because not only was it a lot of initial work, it would have added a
massive maintenance overhead.

Fedora has cross-{gcc,binutils} for a lot of architectures that can do
rudimentary cross compiles by themselves or more complete builds by
setting up their own sysroots.  Roland McGrath then proposed adding an
cross-kernel-headers[1] to get kernel headers into the arch sysroots
because that would enable us to do mass glibc cross builds.  Further, I
planned to add <arch>-linux-gnu-glibc-devel into those sysroots, making
them a bit more functional.

To make it fully functional though, you would end up with packages of
the form cross-<package> for every devel package you consider useful
enough for cross-builds.  It is not impossible, but it is a lot of work
to maintain and keep sane.  That was the reason why we never really got
started on this project - Roland's package review of the kernel headers
is still stuck in the place it was when he had proposed it.

Ubuntu's lib directory layout probably makes this easier, i.e. the
multilib directories could double up as sysroots, but that still does
not reduce the sheer scale of the overhead of maintaining so many
cross-packages.  Maybe there is an alternative project here that
installs dev packages from other architectures into sysroots that the
cross-compilers can then access.

Siddhesh
[1] https://bugzilla.redhat.com/show_bug.cgi?id=1116177



More information about the Kernel-meetup mailing list