Cross-building Debian `linux` package (Was: Re: Unmet dependencies problem in CrossToolchains)

John Morris <[email protected]> Mon, 06 Apr 2015 17:15:29 -0500
Newsgroups gmane.linux.debian.devel.embedded
Message-ID <[email protected]>

On 03/30/2015 10:45 PM, Wookey wrote:
> +++ John Morris [2015-03-30 22:16 -0500]:
>
>> I'm going to try setting up Wookey's cross-build daemon
>
> (careful - it really could do with some more work to be moderately
> general!)
>
>> or use sbuild directly, so never mind.

Thanks for the tips, Wookey.  I ended up adding `sbuild` functionality 
to some scripts I had laying about, and it looks like all the Machinekit 
dependencies can be compiled.

However, there are a few packages that can't be *cross*-compiled, the 
most irritating of which is the Debian `linux` package.  (I've modified 
the packaging to build Xenomai and RTAI 'featuresets'.)

The problem is the explicit `Build-Depends: gcc-4.9`, which can't be met 
by the `crossbuild-essential-armhf` or its dependencies.  For now qemu 
will get the job done, but of course take ages to do it.

Is there a handy workaround for this issue, or are we stuck with 
emulated builds for now?

If it's useful for anyone here, the scripts are on GitHub [1].  The goals:

- Reproducible package builds by running sbuild in Docker
- Build for Jessie and Trusty
- Native builds for amd64, i386; native, emulated or cross-builds for armhf
- (Eventually) Serve as the basis for the Machinekit project's Buildbot 
build/test/package configuration

[1]: https://github.com/zultron/mk-dbuild/

Thanks-

	John