Improve the cross-compilation story in Ubuntu

Registered by Steve Langasek

We now have cross-compilers in Ubuntu, and interesting cross-compilation targets in Ubuntu. It's time to step up the best practices around them and make sure we have a good working solution for the packages that are part of the image.

Blueprint information

Status:
Not started
Approver:
Steve Langasek
Priority:
High
Drafter:
Matthias Klose
Direction:
Approved
Assignee:
Matthias Klose
Definition:
Discussion
Series goal:
Accepted for raring
Implementation:
Unknown
Milestone target:
None

Related branches

Sprints

Whiteboard

What is the standard way that users should be setting up cross-compilation environments now? <https://wiki.linaro.org/Platform/DevPlatform/CrossCompile/UsingMultiArch>? What's the state of xdeb today?

See https://blueprints.launchpad.net/ubuntu/+spec/ubuntu-arm-p-cross-compilable-packages for previous discussion

Cross-buildability status of quantal packages: http://people.linaro.org/~wookey/buildd/quantal/sbuild-ma/status.html

[xnox] Is mingw-w64 discussions appropriate here? Or is it more about the well behaved suspects: armhf, aarch64, x32, powerpc...

[vorlon] this is primarily about the well-behaved suspects. But there's no reason this work can't be extended to target architectures that aren't part of Ubuntu.

== session notes ==

Standard method of cross compilation
 * create a host-arch chroot for the host arch
 * install crossbuild-essential-<target-arch>

Two paths for cross-building:
 - install qemu-user-static in the chroot
 - use DEB_BUILD_OPTIONS=nocheck
   - but debian/rules should check for this itself
 - best practices to have the test suite checked at build time whether it can run

Importing Linaro cross notes to Ubuntu wiki:
 - https://wiki.linaro.org/Platform/DevPlatform/CrossCompile/UsingMultiArch
 - also: overview doc: (needs updating) https://wiki.linaro.org/Platform/DevPlatform/CrossCompile/CrossBuilding
 - ping wookey & achiang when initial pass is done

Outstanding issues for multiarch build paths:
 - https://bugs.launchpad.net/ubuntu/+source/gcc-4.6-armel-cross/+bug/799965
 - https://bugs.launchpad.net/ubuntu/+source/armel-cross-toolchain-base/+bug/923779
 - others?

(?)

Work Items

Work items:
[vorlon] open a bug for rpath issue in toolchain, assign to hrw (bug 923779): DONE
[vorlon] concrete recommendations for test running: nocheck vs. qemu-user-static, add to cross build pages on wiki.ubuntu.com: TODO
[vorlon] provide two profiles for mk-sbuild: one for qemu, and one for nocheck: TODO
[jk-ozlabs] import wookey's cross build docs to wiki.ubuntu.com: INPROGRESS
[wookey] check jk's import of cross build docs: TODO
[achiang] check jk's import of cross build docs & do some test builds: TODO
[jk-ozlabs] define package sets: core, GUI, server (talk to rsalveti, achiang for input). Send email to vorlon, cjwatson, doko: TODO
[doko] fix the cross compiler default include paths to be multiarch compatible: DONE
[adconrad] check out apache build environment: INPROGRESS
[jk-ozlabs] bug adconrad regularly about apache build environment: DONE
[wookey] upstream config.site overrides http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=693730: INPROGRESS
[doko] investigate how to dump config.cache in the build log (sbuild?): TODO
[doko] followup with wgrant about blhc scans: TODO

Dependency tree

* Blueprints in grey have been implemented.