This page discusses how Debian Developers can fix multiarch bugs in packages that are already in Debian. For other multiarch topics, see the multiarch category.
Contents
Finding multiarch cross-dependency bugs
apt can install cross build-dependencies - i.e the build-dependencies needed for cross-building, as well as the normal native build-dependencies. Just do:
apt-get build-dep -a <arch> <package>
e.g.
apt-get build-dep -a armel atk1.0
For this to work, packages must be marked Multi-Arch: foreign or Multi-Arch: same (or occasionally Multi-Arch: allowed) - see the discussion in Multiarch/Implementation for details.
Lists of packages with issues
bootstrap.debian.net provides lists of packages which need multiarch attention, updated weekly:
Typical error messages
This is the sort of thing you get when you run apt-get build-dep -a:
Cross-deps: Running apt-get -aarmel build-dep dash
Reading package lists...
Building dependency tree...
Reading state information...
The following packages have unmet dependencies:
po-debconf : Depends: gettext (>= 0.16) but it is not going to be installed
Depends: intltool-debian (>= 0.34.2+20060512) but it is not going to be installed
sharutils:armel : Depends: libc6:armel (>= 2.4) but it is not going to be installed
Depends: libgcc1:armel (>= 1:4.4.0) but it is not going to be installed
E: Build-dependencies for dash could not be satisfied.
Failed to get cross build-depsLines of interest usually look like one of:
- "E: Build-Depends dependency for dbus-glib cannot be satisfied because package gtk-doc-tools has no candidate version"
gtk-doc-tools is probably the package that needs fixing.
- gettext:armel : Depends: gettext-base:armel but it is not going to be installed
gettext needs fixing first. gettext-base may also need fixing.
In the example above, the package to look at is sharutils. This is probably arch-independent in its action, so it should be marked Multi-Arch: foreign. apt will then try to install sharutils instead of sharutils:armel.
Packages often have more than one bug, and when you fix one, apt-get build-dep -a will just complain about the next one. It can take several iterations to get all the build-deps correctly annotated. The problem package might even be an indirect build-dep (a package depended on by one of the direct build-deps, like a -common package). You will need to modify the bugrep to make sense in these cases.
See also implementation edge cases - bugs often happen because one of these rare events was missed.
What to change
Usually, you just need to add one of these to a control file:
# for packages that are `Architecture: all`, or cannot be co-installed:
Multi-Arch: foreign
# for packages that can be co-installed (may need deeper changes):
Multi-Arch: same
By convention, the line you choose will go after the various Depends/Replaces/Recommends headers and before the Description.
Here is a typical patch:
--- asciidoc-8.6.6/debian/control 2012-03-06 19:14:19.000000000 +0000
+++ asciidoc-8.6.6.new/debian/control 2012-03-05 18:07:24.000000000 +0000
@@ -14,6 +14,7 @@
Depends: python (>= 2.4), ${misc:Depends}, ${python:Depends}
Recommends: docbook-utils, xmlto, dblatex, libxml2-utils
Suggests: vim-addon-manager, source-highlight
+Multi-Arch: foreign
Description: Highly configurable text format for writing documentation
AsciiDoc is a text document format for writing articles, books, manuals and
UNIX man pages. AsciiDoc files can be translated to HTML (with or without
For more complex cases, see Multiarch/Implementation.
Bug Report Template
Title
Add multiarch metadata to $package
Description/Body text
We are working on getting multiarch metadata correct throughout the archive. This package needs to be marked 'Multi-Arch: foreign' for dependencies and build-depencies to work correctly in all cases.
Any package 'X' build-depending on $package cannot be cross-built because apt-get build-dep -a<arch> cannot satisfy X's build-dependencies until
Multi-Arch: foreign
is added to $packages's control file, to indicate that $package from any available arch will satisfy the dependency.
See http://wiki.debian.org/Multiarch/CrossDependencies and 'Dependencies involving Architecture: all packages' in the Multiarch Spec for further explanation.
Optional extra info to indicate how much a blocker this particular bug is: There are n packages which build-depend on $package in the archive. None of them will be multiarch cross-buildable without this fix.
Tags
The bug should be tagged multiarch and cross. In debian, add user=multiarch-devel@lists.alioth.debian.org, tag=multiarch and user=crossbuild@debian.org, tag=cross to the bug report. Or for Ubuntu, add the tags 'multiarch' and 'cross' in launchpad.
To add the tags to an existing bugreport using bts:
bts user multiarch-devel@lists.alioth.debian.org , usertags <bugnumber> multiarch bts user crossbuild@debian.org , usertags <bugnumber> cross
For more information, see usertags.
Number of packages which build-depend on $package
The template above says "There are n packages which build-depend on $package". To get the n, do:
grep-dctrl -s Package -F Build-depends,Build-depends-indep $package /var/lib/apt/lists/*Sources
(you may need to sudo apt install dctrl-tools to get grep-dctrl)
