Neil Williams a écrit , Le 09/06/2012 20:52: > On Sat, 09 Jun 2012 18:50:32 +0200 > Gilles Filippini <firstname.lastname@example.org> wrote: > >> Until recently, I used to cross-build on my amd64 box a few packages for >> my OpenMoko Freerunner phone (armel). > > What versions? The build host is an up to date wheezy amd64 box. The target is an up to date sid armel phone. > >> You'll find below my pdebuild-cross.rc and the multistrap configuration >> files. >> >> If I set "arch=" (as it used to be) in the multistrap conf file, the >> sources.list in the chroot are forced to amd64 and xapt don't know about >> armel: >> deb [arch=amd64] http://ftp.fr.debian.org/debian unstable main >> deb-src http://ftp.fr.debian.org/debian unstable main >> deb [arch=amd64] http://www.emdebian.org/debian squeeze main >> deb-src http://www.emdebian.org/debian squeeze main > > The chroot is a cross-building chroot, the architecture is the > architecture of the programs which need to be executed not the ones you > are targeting, so amd64 is correct as far as multistrap is concerned. > It probably just means that the multistrap config needs to use the > foreignarches option. It's too late to get this change into wheezy. > > [Debian] > packages=dpkg-dev binutils-multiarch build-essential dpkg-cross makedev > source=http://ftp.fr.debian.org/debian > keyring=debian-archive-keyring > suite=unstable > omitdebsrc=false > > [Debian-armel] > packages= > architecture=armel > source=http://ftp.fr.debian.org/debian > keyring=debian-archive-keyring > suite=unstable > omitdebsrc=false > > Debian-armel would then need to be added to aptsources. > > But that's for later, you've already got the chroot, no point in > regenerating it. It can be tweaked. I tried it anyway and the [Debian-armel] bit didn't help: it produced a sources.list with: deb [arch=amd64] http://ftp.fr.debian.org/debian unstable main Something wrong with multistrap then? > >> Then I tried "arch=armel" but then pdebuild-cross-create fail with: >> W: Failed to fetch >> http://www.emdebian.org/debian/dists/squeeze/InRelease Unable to find >> expected entry 'main/binary-armel/Packages' in Release file (Wrong > > There are no cross-building toolchains to install on armel. > Cross-building for amd64 on armel is not recommended. > >> # pdebuild-cross.rc >> # ----------------------------------------------- >> CROSSARCH=armel > > Correct. > >> DEBBUILDOPTS="-aarmel" >> MULTISTRAPFILE=/etc/multistrap/armel-sid.conf > > This is an amd64 chroot which is configured to have a cross-building > toolchain for armel. > >> PBUILDERSATISFYDEPENDSOPT="-m -a armel" > > ... and this is what determines the architecture of the -cross packages > to be created as build dependencies. > >> #arch= >> arch=armel > > Wrong. > > arch= > > or > > arch=amd64 > >> packages=g++-4.4-arm-linux-gnueabi linux-libc-dev-armel-cross > > i.e. a cross-compiler for installation on amd64. > > sudo pbuilder login --configfile /etc/pdebuild-cross/pdebuild-cross.rc > > Then remove that [arch=] section of the sources.list and check that > xapt can work. > > Alternatively, duplicate *only* the line relating to the Debian > unstable archive and specify the arch as armel for that one and *ONLY* > that one. Check that xapt can work. > > Once that is working, use: > > sudo pbuilder login --configfile /etc/pdebuild-cross/pdebuild-cross.rc > --save-after-login > > Make the changes again but don't do any tests with xapt, this will make > the sources.list changes permanent without polluting the chroot with > temporary changes. > > It's a completely standard pbuilder chroot, so the normal pbuilder > commands work - it just has a cross-compiler pre-installed. Once > changed, the chroot will continue operating just fine. The complication > is that the cross-compiler is from stable. > > (The pbuilder command above is output if pdebuild-cross-create is > executed when the chroot tarball already exists.) That did the trick! Many thanks for your help, _g.
Description: OpenPGP digital signature