35042
Comment:
|
35065
|
Deletions are marked like this. | Additions are marked like this. |
Line 29: | Line 29: |
e (last updated 2013-03-12 16:30): | Get the arm64 disk image (last updated 2013-03-12 16:30): |
Contents
'arm64' is the Debian port name for the 64-bit ARMv8 architecture, referred to as 'aarch64' in upstream toolchains (GNU triplet aarch64-linux-gnu)
There will be no hardware in existence until sometime in 2013 but ARM (via Linaro) are working well with the community and trying to get this port done early so software will exist when there is something to run it on. There is a (non-free, free beer) 'Foundation Model' simulator which can be used to run arm64 code, which is available here, but you don't need that to get stuck into the port which is mostly about updating things, and multiarch and cross-build fixes, with a few actual arm64 changes here and there.
This is the first non-x86 self-bootstrapped Debian port: first 150 packages cross-built using build-profiles to untangle cyclic build-dependencies.
Status
Underway: there are (raring) cross-toolchains, and base system package building is ongoing. There is now a (raring) image to run. Debian cross-toolchains, and important packages not yet built (apt, gcc) are being worked on.
Binutils, kernel, gcc and glibc port patches were sent upstream over the summer of 2012, with enough stuff to build a cross-toolchain available by October. In Oct/Nov/Dec a quantal-based archive of base packages was built. In Jan 2013 the effort was switched to raring to take advantage of cross-build fixes, multiarch improvements, libc and arm64 updates going in there.
Bootstrap package repos are here. 137 out of the 141 source packages needed to debootstrap a buildd chroot have been built. Most of the work so far has been in Ubuntu( first quantal and now raring). The Debian (unstable/experimental) port is stalled on getting the toolchain going, and limited by the Wheezy freeze.
Current cross-buildability for arm64 is tracked on this status page.
Pre-built Rootfs
Here is a (512MB) basic configured image to download for use in the model (or on real hardware should you have some).
You will need the ARM Foundation Model to run it on which is proprietary, but cost-free, and available from http://www.arm.com/products/tools/models/fast-models/foundation-model.php (you will need to get an account).
Download that and unpack it (it will make a dir called Foundation_v8pkg).
All the other files you needs are available here
Get the arm64 disk image (last updated 2013-03-12 16:30):
wget http://people.debian.org/~wookey/bootstrap/rootfs/raring.img.gz gunzip raring.img.gz
Now has networking, apt, build-essential and debhelper and thus can be used for native building.
Get the kernel+bootwraper:
This is a kernel and also contains the kernel command line. There are two, linux-system-foundation.axf, which runs init=/bin/sh, and linux-system-foundation-upstart-verbose.axf which runs init=upstart --verbose
wget http://people.debian.org/~wookey/bootstrap/rootfs/linux-system-foundation.axf wget http://people.debian.org/~wookey/bootstrap/rootfs/linux-system-foundation-upstart-verbose.axf
Now you can run the model/image with:
Foundation_v8pkg/Foundation_v8 --image linux-system-foundation-upstart-verbose.axf --block-device raring.img --network=nat
That's it. It uses 2G of memory, and on my machine takes about 35 seconds to show the 'serial console' window, then another 1.5 mins or so to boot to a prompt, with a long pause whilst it mounts, displaying nothing new. Have patience!
log in as 'root', no password
Networking should work automatically. If not see what :
ifup eth0
does. You should get an outward-only network connection if a dhcp server is visible. See https://fedoraproject.org/wiki/Architectures/ARM/AArch64/FoundationModel_Networking for more networking details.
Building your own rootfs image
You can build an image as above very easily. The image the models take are a simple ext4fs block device. makeimg is a handy script to make a blank device, format it, then run multistrap with a suitable config to download and unpack debs, plus install a few config files to set things up.
Currently thats: add an upstart job for the serial console, set a root password to nothing (care!), set PERL5LIB to work round the fact that it's currently incomplete in the multiarch perl package, turn off recommends, and set up /etc/fstab, and /etc/networkin/interfaces
Download the makeimg script and the multistrap config files:
wget http://people.debian.org/~wookey/bootstrap/rootfs/arm64-makeimage.tgz tar -xzvf arm64-makeimage.tgz
Build an image with:
./makeimg
Which will ask for sudo password. You need to be in the makeimg dir. And note that this is the sort of script that can accidentally format your hard drive if things go wrong. It has some checks to try and avoid disaster, but take a bit of care and don't blame me if it all goes badly.
That image now has unpacked deps in it, but they need their configure scripts (and in some cases preinsts) running natively to make it properly bootable.
Run the model with the 'init=/bin/sh' kernel:
Foundation_v8pkg/Foundation_v8 --image linux-system-foundation.axf --block-device raring.img
Assuming you get a prompt run the config script to do some fixups and the second-stage bootstrap
./config.sh
A few packages will still fail to configure as they depend on upstart having started.
Look inside config.sh to see what it does and do manual fixups if needed (a different package set may need this).
One possible problem is:
Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused
This can be fixed by diverting /sbin/initctl :
dpkg-divert --local --rename --add /sbin/initctl ln -s /bin/true /sbin/initctl ./config.sh
See https://www.nesono.com/node/368
If you need to type anything more than a line then run bash (after export PATH) . It's _much_ nicer.
Reboot with upstart running:
Foundation_v8pkg/Foundation_v8 --image linux-system-foundation-upstart-verbose.axf --block-device raring.img --network=nat
It should either get to a prompt you can log in at as root (no password), or offer a maintenance shell.
bash dpkg --configure -a
Should get everything set up.
Bug tracking
Please tag all arm64/aarch64-specific bugs 'arm64' in the BTS (see bugs.debian.org/usertags for instructions), or in launchpad.
Here is the current list of arm64 Debian bugs
Here is the current list of arm64 Ubuntu bugs
Upstream-relevant bugs should be filed in the linaro-aarch64 bug tracker to avoid distro duplication of effort.
File bugs in the Debian BTS too, then link to them in the Linaro tracker.
Repository
Raring, and unstable armv8 bootstrap repos have been set up here. These contain current state of play for modified tools, sources, cross-tools, and packages built for arm64. Notable packages include eglibc2.16, gcc-4.7, linux-source, arm64-cross-toolchain-base, gcc-4.7-aarch64-linux-gnu, dpkg (with build profile support), multiarch versions of perl and python2.7. A quantal chroot was used for initial work but is now (Dec 2012) frozen/abandonned.
You should just be able to add that repo and apt-get install crossbuild-essential-arm64 to get a working cross environment. If build and host arch packages have got out of sync this won't work, which happens often in raring and unstable.
Cross Toolchain
Before anything useful can happen dpkg needs to have arm64 support. This was done in v1.16.4
Toolchain Bootstrap
First job is to bootstrap a cross-toolchain so other stuff can be built.
This is relatively easy to do from upstream sources either directly or using a framework like ?OpenEmbedded, but to get a Debian-packaged toolchain easily usable in chroots, sbuild etc requires merging the new port with the Debian packaging, which is frankly a PITA.
When starting from scratch multiarch doesn't help you because you need eglibc:arm64 to make aarch64-linux-gnu-gcc and you need aarch64-linux-gnu-gcc to make eglibc:arm64. So you have to do a 3-stage bootstrap.
Ubuntu has (thanks to Linaro) a package to automate the building of fully-bootstrapped compilers for armhf/el so that was munged to make arm64-cross-toolchain-base, and the delighful task of getting everything working was started.
The process is:
- Make a binutils with aarch64 port and arm64 packaging in so you can build binutils-source
- Make a kernel with arm64 stuff in so you can build kernel-source
- Make a gcc with aarch64 gcc port and arm64 packaging in so you can build gcc-source
- Make an eglibc with aarch64 port and arm64 packaging in so you canbuild eglibc-source
- Make arm64-cross-toolchain-base with the right runes in it to build:
- munged linux-libc-dev kernel headers
- gcc stage1 bare cross c-compiler
- eglibc stage1 simple libc
- gcc stage2 compiler and cross-compiler and libraries
- eglibc stage 2 (full) build
- gcc stage3 (full) build
Easy peasy.
This work was initially done in Ubuntu due to better multiarch support, availability of *-cross-toolchain-base and newer eglibc.
Toolchain Bootstrap Issues
Quantal bootstrap
Binutils was straightforward as the Quantal package already had aarch64 support and arm64 packaging. It just builds
Linux-source required some work. linux-3.5.0 is current in quantal. Upstream work was on 3.6 and 3.7, although initially posted patches from July were for 3.5. Only headers are needed and base port is not invasive so version isn't too important. Taking the port from Linaro current armv8 tree http://git.linaro.org/gitweb?p=people/omarrmz/linux-aarch64.git;a=summary and adding Debian arm64 packaging in various places had only one bit of hackery needed (remove mention of drivers/irqchip from arm64/kconfig) to get a linux-source package built. The initial patch is here:
eglibc in Ubuntu is 2.15. supplied glibc patches were for trunk and then 2.16. eglibc2.15 does not build with gcc4.7, only 4.6. Initial gcc patches were for trunk and then 4.7. There was no public 4.6 port. eglibc2.16 was not available in Debian or Ubuntu, but there was a set of packaging in alioth, but no actual glibc source. eglibc Debian source layout is, for historical reasons not like upstream so a load of munging is needed to get the right layout. I did this hard way before dicovering the debian rules target to do it for me better. Then remove the gcc4.6 deps and rules-forcing. Add in glibc aarch64 patch and poke it till it applies. Fortunately glibc and eglibc are very similar here. Grok packaging layout and patch-naming scheme. Fix up submitted-fcntl-bits patch which moves AT_ GNU symbols and needs to put them back in again for each arch specifically. Turn off libselinux when building stage1 (on by default for linux in 2.16 packaging) Spend some time tracking down why builds always fail with EI_foo aliased to external symbol GI_foo errors 680439. Turns out to be gcc4.6 vs 4.7 issue, which boils down to pr33763, the patch for which breaks eglibc builds. So this actually needs to be fixed in gcc. Some hassling got this done quickly with a new pr33763 patch to put in gcc.
gcc packaging is complicated. Lots of patches applied for different arches, distros, options. Only the core C, C++ and fortran compliers are supported in initial port, so libssp, libmudflap, go, java, objectiveC, lidquadmath, ada, multilib etc all need to be disabled. pr33763 fix as above in order to even build eglibc stage1.
Next the gcc stage2 build fails with 'cannot find bits/predefs.h'. Some investigation finds that this is due to xgcc looking in the wrong place for lib headers. These are put in debian/tmp/ and a sysroot is set in order to find them, but the headers path given a) doesn't look in the sysroot and b) is for old /usr/<triplet>/include path instead of new multiarch /usr/include/<triplet>:/usr/include path. Work out where to poke this in multiple packaging layers.
Then libgcc.so ends up in non-multiarch dir. Turns out to be misapplication of part of Thibgs 'use multiarch paths everywhere', which I tried too late at night and forgot about.
The selinux still gets used for eglibc stage build. We still don't have one so patch changed to always skip selinux use if DEB_PROFILE=bootstrap (and set this in the arm64-cross-toolchain-base build for stage2 full build as well as stage1 - this needs doing properly).
Eventually get a toolchain - woohoo.
After this building extra c++ packages was straightforward.
And this can be installed in a chroot and used to build simple things like zlib (woohoo) but there is an issue. The c-library is provided in the old dpkg-cross location, not as libc6:arm64 . This means that anything non-trivial, i.e. that build-depends on another library, which itself has libc as an install dependency can't be built as the bottom of the multiarch library chain is missing. So we need to cross-build a real libc:arm64. (It could be faked up with equivs but this will cause problem with finding headers/libs later - in fact this whole toolchain mess is a bit of a bodge that needs sorting properly).
Building eglibc for arm64 is a simple matter of DEB_BUILD_PROFILE=bootstrap DEB_BUILD_OPTIONS=nocheck dpkg-buildpackage -d -aarm64 -kBEA7C52D -b (the -d is there because otherwise gettext gets in the way (it should be gettext:any in ubuntu))
This fails because the native part of the build (for getent and rpcgen) can't find errno.h. This is because libc6-dev:amd64 isn't installed (because it's not specified as an actual build-dep of eglibc, even though it's needed when crossing - we need to fix this). But this can't just be installed because an attempt to do so causes apt to remove a lot of essential packages (libnih, adduser, mount, rsyslog etc). This turns out to be because libnih1 has these dependencies: Pre-Depends: multiarch-support, libc6 (>> 2.15), libc6 (<< 2.16) which prevents libc 2.16 being installed. This is almost certainly a bug in eglibc's shlibdeps overrides. The easy fix is to build a version of libnih without this restriction, at which point libc6-dev:amd64 can be installed and eglibc can be cross-built for arm64.
Rebuilding eglibc:amd64 mean we now have matching libc6 for amd64 and arm64 and crossbuild-essential-arm64 should be installable, which opens the way for automated sbuild crossbuilds.
However, this wasn't quit enough as libgcc1:arm64 and linux-libc-dev:arm64 are needed to install libc6:arm64. We already have a libgcc1-arm64-cross with the right files in, but not the right layout, architecture, multiarchness or package name. The toolchain has support for a 'reverse-cross' to get the needed libgcc1 but it seemed easier to just mangle libgcc1-arm64-cross to make the right package. Linux-libc-dev is easiest to get by doing DEB_STAGE=stage1 build of the kernel. The kernel package version in quantal has moved on so the amd64 linux-libc-dev is newer. Bah - multi-arch fail. So build one of those too.
The toolchain bootstrap process needs to spit out real multiarch library packages to avoid this faffage. But finally libc6:arm64 is installable which means crossbuild-essential-arm64 is.
Raring bootstrap
Easier than quantal as all the base porting has already been done. However not quite as easy as one might like. arm64-cross-toolchain-base was updated with some fixes/updates from the armhf/armel-c-t-b packages. Binutils and linux-libc-dev headers were straightforward.
But gcc stage1 build fell over first with bugs in gcc-4.7.2-12ubuntu2 (patches that didn't apply, missing arm64 symbols-files). Then with missing bits/predefs.h header when building libgcc. This turned out to be 1091823.
Then the build completed but there was a libgconv.a packaging error for some reason. Updating to gcc-4.7-2-14ubuntu2 seemed to fix that.
Debian bootstrap
The Debian toolchain bootstrap is being attempted fully multiarch, to avoid the above issues with needing a separate libc:arm64 and equivs packages to make everything work. It's also an opportunity to integrate DEB_BUILD_PROFILE boostrap features to make it all nicely automatable, without toolchains being a special case in the archive. This was initially (December 2012) too troublesome, mostly due to new versions of GCC coming out every few days with this stuff being changed. As of gcc-4.7.2-18 onwards ThibG's patches for the toolchain using the multiarch system libraries are integrated so I had another go.
This process is documented on MultiarchCrossToolchains.
Current status is that experiemntal is being used as the stuff in unstable is too old.
binutils and gcc stage1 are built.
The kernel header patches are being updated for 3.8
Building packages
Given a cross-build chroot, in general you should be able to do
apt-get build-dep -aarm64 <package> apt-get source <package> cd <package>-<ver> CONFIG_SITE=/etc/dpkg-cross/cross-config.arm64 DEB_BUILD_OPTIONS=nocheck dpkg-buildpackage --preserve-env -aarm64
But there are of course some caveats.
Details on setting up an arm64 cross-chroot are given here: https://wiki.linaro.org/Platform/DevPlatform/CrossCompile/arm64bootstrap
There is no libssp (stack protection) support in aarch64 toolchain yet so the -fstack-protector will cause an error:
/usr/lib/gcc/aarch64-linux-gnu/4.7/../../../../aarch64-linux-gnu/bin/ld: cannot find -lssp_nonshared /usr/lib/gcc/aarch64-linux-gnu/4.7/../../../../aarch64-linux-gnu/bin/ld: cannot find -lssp
For any package that uses dpkg-buildflags this is easy to fix by setting DEB_BUILD_MAINT_OPTIONS=hardening=-stackprotector You can set this for the whole build chroot if using one (probably best for now), or for a user, or for a build by doing:
DEB_BUILD_MAINT_OPTIONS=hardening=-stackprotector dpkg-buildpackage -aarm64
Better to fix this permanently in /etc/dpkg/buildflags:
STRIP CFLAGS -fstack-protector
The initial (quantal) version of the cross-toolchain only searched the old dpkg-cross library paths by default so you need this in /etc/dpkg/buildflags too:
DEB_LDFLAGS_APPEND="-L/usr/lib/aarch64-linux-gnu -L/lib/aarch64-linux-gnu -L/usr/lib -Wl,-rpath-link=/usr/lib/aarch64-linux-gnu:/lib/aarch64-linux-gnu:/usr/lib"
This is not an issue from gcc-4.7-14 onwards, so the above is not needed in raring or unstable. This is good because it breaks packages that need to build both BUILD_ARCH _and_ HOST_ARCH stuff.
Package porting
Many packages need no more than config.guess and config.sub updating to build for arm64. autotools got aarch64 support upstream in June 2012. So autotools-dev 20120608.1 has the files needed. However many (most) packages don't autoreconfig on build, or otherwise update those files so they have to be patched. A lot of boring patches were filed with the tag arm64, such as 689613 In many cases dh_autoreconf can be used to fix this without making horrible, unreadable, autofoo patches. Sometimes it's better to use dh_autotools-dev which only updates config.{sub,guess} without re-generating all the configury because this is less invasive. Some packages won't build a second time after dh_autoreconf has poked them around.
Because there is no hardware everything needs to be cross-built so cross-building patches are also needed in many packages, and multiarch patches in many build-deps. Due to the Wheezy freeze and thus the more progressed state of multiarchification and more cross-build fixes in Ubuntu, this work was initialy done in a private Quantal-based repo, and later in a raring-tracking repo, but all bugs are either directly filed, or also pushed upstream to Debian.
Quite a few packages need actual changes. Here is a list so far:
Packages that need arm64-related changes
package |
Debian Bug/Fixed version |
Ubuntu Bug/Fixed version |
dpkg |
|
|
autotools |
20120210.1 |
20120210.1 |
binutils |
|
binutils-2.22.90.20120924 |
coreutils |
|
|
gcc |
gcc-4.7-4.7.2-3 |
gcc-4.7-4.7.2-3ubuntu1arm64 1133104 |
eglibc |
690873 2.16-0arm64.1 |
2.16-0ubuntu3 2.17-0ubuntu4 1120810 |
linux |
|
|
util-linux |
|
|
perl |
https://github.com/codehelp/perl-cross-debian/tree/master/aarch64-linux-gnu |
|
dpkg-cross |
693730 2.6.8 |
2.6.7arm64 |
(cross)-build-essential |
11.6ubuntu4 |
|
gmp |
||
libffi |
3.0.11-2ubuntu1 |
|
klibc |
|
|
openssl |
|
|
libbsd |
|
|
libx11 |
|
Packages that need crossbuild fixes
package |
Debian Bug |
Ubuntu Bug |
diffutils |
1:3.2-3 |
1:3.2-1ubuntu1 |
tzdata |
|
|
gdbm |
1.8.3-11ubuntu1 |
|
iptables |
1.4.16 |
|
libsemanage |
|
|
db |
|
|
linux |
|
|
sqlite3 |
|
|
packages that need multiarch-related changes
package |
Debian Bug |
Ubuntu Bug |
perl |
|
|
python-2.7 |
|
|
chrpath |
0.14 |
0.14 |
less |
||
check |
||
gettext |
|
|
ed |
|
|
dctrl-tools |
||
indent |
|
|
fdupes |
||
bc |
||
equivs |
||
linux-atm |
|
|
tcl8.5 |
||
autogen |
|
|
netpbm-free |
2:10.0-15ubuntu2 |
|
libxcb |
|
Packages that need changes for eglibc 2.16
package |
Debian Bug |
Ubuntu Bug |
diffutils |
||
tar |
||
gettext |
||
cpio |
||
coreutils |
8.20 |
or eglibc 2.17
gpm |
|
1.20.4-6ubuntu1 |
Packages that needed config.{guess,sub} updates
package |
Debian Bug |
Ubuntu Bug |
acl |
Quantal |
|
chrpath |
0.14-1ubuntu1 |
|
cloog-ppl |
|
|
coreutils |
Quantal |
|
cpio |
Quantal |
|
db |
Quantal, |
|
dialog |
Quantal |
|
diffstat |
1.55-3ubuntu1 |
|
diffutils |
689617 1:3.2-7 |
1:3.2-7 |
dropbear |
|
|
expat |
Quantal |
|
findutils |
Quantal |
|
gnupg |
|
Quantal |
json-c |
|
|
kbd |
1.15.3-9ubuntu4 |
|
libelf |
693996 0.8.13-4~1 |
1082134 0.8.13-3ubuntu1 |
libgpg-error |
Quantal |
|
libnfnetlink |
||
libnih |
Quantal |
|
libx11 |
Quantal |
|
libxml2 |
Quantal |
|
libxslt |
Quantal |
|
make-dfsg |
Quantal |
|
mlocate |
0.25-0ubuntu2 |
|
module-init-tools |
Quantal |
|
mpfr4 |
3.1.0-5ubuntu1 |
|
nano |
Quantal |
|
ncurses |
|
Quantal |
patch |
|
Quantal |
pam |
|
|
pcre3 |
|
Quantal |
popt |
|
Quantal |
sed |
|
Quantal |
Packages that need build profiles
- eglibc (libselinux)
- libselinux (swig, rub2deb)
- glib2.0 (python-dbus)
- dbus (systemd, libdbus-glib, python-dbus)
- db (java, python-all-dev, python3-dev)
- udev (gobject-0introspection)
- libnih
- libsemanage (swig, rub2deb)
- pam (libaudit)
- libidn (gcj-jdk)
- curl
- pango (gobject introspection)
- cracklib2 (python bindings)
The set of patches for this (in raring) is here: http://people.debian.org/~wookey/bootstrap/patches/
Packages waiting on build-deps
- curl (nss)
- gnupg (curl)
- apt (Gnupg)
Perl
Perl is a bit of a special case. It needs both cross-build support and multiarchifying. Status is being tracked on Multiarch/Perl
Cross-build supprt currently involves creating config files on a host-arch machine, which currently means a model, or creating the files by inspection and comparison with others. A set of arm64 configs has been created from a model run and comparison with armhf and amd64 configs for Debian and arm64 config for openembedded. These are now checked-in to perl-cross-debian. And perl cross-builds successfully with these configs and that version of perl-cross-debian plus its corresponding perl patches.
Meanwhile There is a multiarch branch of perl here: 'ntyni/multiarch-5.14' branch of git://git.debian.org/perl/perl.git which is discussed in this thread: http://lists.debian.org/debian-perl/2012/09/msg00000.html
This builds and works OK, but does not currently cross-build. Merging these two pieces of work to get a cross-buildable, multiarched, arm64, perl is currently underway.
Packages that don't build
dialog
Wrong-arch strip run.
fuse
Conflicting 64-bit definitions: 1087757
icu
configure: error: Error! Cross compiling but no --with-cross-build option specified - please supply the path to an executable ICU's build root
Packages that are built
- eglibc (stage1, stage2 to avoid libselinux)
- pcre3
- attr
- acl
- zlib
- hostname
- libsepol
- gpm
- ifupdown
- insserv
- module-init-tools
- python-defaults
- libselinux (stage1 to avoid swig and rub2deb)
- ncurses
- bash
- libpciaccess
- libpng
- slang (needs chrpath 0.14)
- base-files
- mawk
- makedev
- make
- xz-utils
- dpkg
- netbase
- base-files
- time
- manpages
- libxau
- libxdmcp
- libpthread-stubs
- diffutils
- tar
- cpio
- diffutils
- gmp
- gdbm
- sed
- tzdata
- base-passwd
- coreutils
- findutils
- libnfnetlink
- libffi
- iptables
- libelf
- debconf
- debianutils
- ucf
- xtrans
- x11proto-kb
- x11proto-input
- x11proto-render
- x11proto-xf86bigfont
- x11proto-core
- expat
- net-tools
- tcl8.5
- tcp-wrappers
- ubuntu-keyring
- scowl
- postgresql-common
- openslp-dfsg
- procps
- psmisc
- phpmyadmin
- libusb
- mcrypt
- pixman
- libice
- bzip2
- flex
- db4.8
- dash
- iptables
- keyutils
- less
- sysvinit
- nano
- db-defaults
- grep
- dbconfig-comon
- linux-atm
- util-linux
- e2fsprogs
- ustr
- kmod
- dbus (stage1)
- libsm
- cunit
- glib2.0 (stage1)
- udev (stage1)
- libnih (stage1)
- json-c
- openssl
- initramfs-tools
- libgcrypt11
- libidn
- wget
- sysfsutils
- iputils
- ppl
- binutils
- busybox
- libtasn1-3
- libfribidi
- libjson0
- upstart
- tcl8.5
- sqlite3
- db (stage1)
- cracklib2 (stage1)
- pam (stage1)
- libcap2
- libsemanage (stage1)
- shadow
- iproute
- ppl
- cloog-ppl
- libbsd
- libedit
- dbus
- libgpg-error
- popt
- p11-kit
- gnutls26
- libxau
- check
- libxcb1
- libx11
- libfreetype
- libfontconfig
- libxrender
- libxext
- libxt
- lzo2
- cairo
- libdatrie
- libthai
- libxft
- pango1.0 (stage1)
- libdrm
- plymouth (stage1)
- perl
- libjpeg-turbo
- initramfs-tools (-A)
- debconf (-A)
- lsb (-A)
- tzdata (-A)
- makedev (-A)
- pam (-A)
- mountall
- readline (-A)
- cron
- glib2.0 (-A)
- nspr
- klibc
- nano
- less
- gcc-4.7
Packages that needed fixes
libgcrypt11 Compiler ICE: 1078967 Fixed in raring toolchain
- linux-atm Tries to link native tool against -lf and fails because dpkg-buildflags have nobbled link path for aarch64. Need to either wrap compiler and get rid of LDFLAGS buildflags or fix cross toolchain default path. Fixed in raring toolchain
libnih 1101977
db 1105368
- eglibc 2.16 has a bug with error retun codes (breaks scp at least). Need to use 2.17.
Build-dependencies that need(ed) fixes
Mostly things need multiarchifying.
- chrpath (0.14, earlier versions are not 32/64/endian aware)
xz-utils builds fine if its cross build-deps are installed, but apt-get build-dep -aarm64 xz-utils fails saying that perl is not available. It doesn't matter if multiarch perl is already installed or not. xz-utils has a perl:any build-dep. This should now be a perl-base:any build-dep. This tested in quantal. Needs checking in unstable and raring.
Using dose to see what is multiarch-buildable
Dose 3.1 can analyse build-dependencies for a given package, and understands about cross and multi-arch. It can tell you what is currently buildable given the current state of relevant source and package files. Use 3.1.2 for the --checkonly option and the --defaultedMAforeign option
Install it (it's in the bootstrap tools repo)
sudo apt-get install dose-builddebcheck
- -f shows packages you can't build
- -s shows packages you can build
- -e prints an explanation of what the problem is
- --checkonly checks just one package rather than everything
--defaultedMAforeign uses the Ubuntu apt algorithm (not in wheezy) of assuming all arch:all Build-Deps can be considered Multi-Arch:Foreign
To check
dose-builddebcheck -f --checkonly <package> \ --defaultedMAforeign --deb-native-arch=amd64 --deb-foreign-archs=arm64 --deb-host-arch=arm64 \ /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_quantal_main_binary-amd64_Packages \ /var/lib/apt/lists/people.debian.org_%7ewookey_bootstrap_ubunturepo_dists_quantal-bootstrap_main_binary-amd64_Packages \ /var/lib/apt/lists/people.debian.org_%7ewookey_bootstrap_ubunturepo_dists_quantal-bootstrap_main_binary-arm64_Packages \ /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_quantal_universe_source_Sources | grep source
Current list of things needed for debootstrap which have missing build-deps:
- db : default-jdk:arm64 (fixed in bootstrap repo)
- dbus : libdbus-glib-1-dev:arm64 (fixed in bootstrap repo)
- console-setup: bdfresize
- e2fsprogs : libblkid-dev:arm64 (fixed in bootstrap repo)
- gnupg : libldap2-dev:arm64
- openssl: bc (fixed in bootstrap repo)
- cracklib2: python-2.7-dev python-3-dev (fixed in bootstrap repo)
Packages that still need cross-building, but do have satisfiable cross-build deps (analysis done in quantal-bootstrap using dose-debbuildcheck):
acl attr base-passwd bc bison bluez boost1.49 bsdmainutils bzip2 cairo chrpath consolekit coreutils cpio cracklib2 cups curl cyrus-sasl2 datefudge db-defaults dbus-glib docbook-to-man doxygen ed elfutils fastjar fftw3 file flac fontconfig freeglut freetds freetype gcc-4.7 gcj-4.7 gconf gdk-pixbuf ghostscript giflib git glib2.0 gnutls26 gobject-introspection graphviz groff heimdal hesiod icu ifupdown ijs iproute iptables jackd2 jasper java-atk-wrapper java-common jbig2dec jbigkit json-c keyutils krb5 lcms lcms2 libasyncns libcap-ng libcroco libdatrie libdrm libedit libevent libffibinutils libfontenc libgcrypt11 libgd2 libglu libgpg-error libhdate libice libidn libjpeg-turbo libjpeg8-empty libmng libnfnetlink libnih libnl3 libogg libpaper libsamplerate libsndfile libthai libtool libunistring libusbx libverto libvorbis libx11 libxau libxaw libxcb libxcomposite libxcursor libxdamage libxdmcp libxext libxfixes libxfont libxi libxinerama libxml2 libxmu libxpm libxrandr libxrender libxslt libxt libxtst libxv libxxf86vm linux lirc lynx-cur m4 mawk mesa mscgen mysql-5.5 nas netpbm-free nspr nss openjade1.3 openjdk-7 openldap openslp-dfsg opensp openssh orc oss4 p11-kit pam pango1.0 patch pcsc-lite perl pixman pkg-config plymouth pmake policykit-1 postgresql-9.1 procps pulseaudio python-defaults python2.7 qt4-x11 rtmpdump shadow source-highlight speex swig2.0 sysvinit tdb texinfo tiff unixodbc upstart wayland xfonts-utils xft xmlstarlet xmlto
Packages that still need cross-building but don't have satisfiable build-deps (analysis done in quantal-bootstrap using dose-debbuildcheck):
binutils eglibc gawk gcc-4.7 libxml2 linux man-db mpfr4 perl fontconfig freetype gcj-4.7 gdk-pixbuf git gobject-introspection gtk+2.0 libidn libxcb lynx-cur openjdk-7 openldap pango1.0 python2.7 gconf ghostscript ijs jackd2 jbig2dec libtool libxslt lirc mysql-5.5 postgresql-9.1 bison fftw3 gst-plugins-base0.10 gstreamer0.10 boost1.49 elfutils graphviz libgd2 policykit-1 source-highlight