I'm trying to cross-build a Debian/Ubuntu package on a running amd64 system to mips arch. I've tried several methods, from pubilder to sbuild, but I keep failing. About the latter, on a freshly installed Debian 9 I do:
apt-get -y install sbuild
sbuild-createchroot --arch=mips --make-sbuild-tarball=/srv/chroots/wheezy-sbuild.tgz wheezy /srv/chroots/wheezy http://archive.debian.org/debian/
But in the end I get:
W: Failure trying to run: chroot /srv/chroots/wheezy dpkg-deb -f /var/cache/apt/archives/dpkg_1.16.18_mips.deb Version
W: See /srv/chroots/wheezy/debootstrap/debootstrap.log for details
W: Failure trying to run: chroot /srv/chroots/wheezy mount -t proc proc /proc
W: See /srv/chroots/wheezy/debootstrap/debootstrap.log for details
E: Error running debootstrap at /usr/sbin/sbuild-createchroot line 268.
and the log contains:
chroot: failed to run command 'dpkg-deb': Exec format error
chroot: failed to run command 'mount': Exec format error
All the methods I tried end up with that Exec format error while trying different commands.
wheezy
. I need to compile a package for UniFi Edge Router which is based on that version – Maxxer May 16 '19 at 02:45