1

I'm attempting to cross compile a couple Ubuntu Precise Packages, My current arch is amd64 my target is armhf. I have the correct cross compile GCC toolchain installed, I have correctly utilized the toolchain to previously compile the kernel.

I was wondering about the package build dependencies, does the build just get its includes from my regular dev packages? Do I need to do anything special?

I execute this command, this time adding the arch

dpkg-buildpackage -rfakeroot -aarmhf

near the end of the build, I get this

... File format not recognized
...
make: *** [binary] Error 29
dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2
  • The posted log snippet is too short to see the cause of the issue. It would also help to be able to see the source package in question. – tumbleweed Jun 3 '12 at 2:04
2

The easiest way to cross-build packages is to not cross build them, but use an entire emulated armhf chroot. Use pbuilder-dist or mk-sbuild to create an armhf chroot, and just build the packages in it.

  • 1
    This is a solution non grata. I've obviously chosen to cross-compile, which is known to be more difficult. If I wanted to chroot, I would have already chosen to, it's not like the internet isn't practically drowning in chroot documentation. Actually I digress, I asked a more general Debian question... This might not even be the place to do such. – J. M. Becker May 31 '12 at 17:34
  • I also would want to say, I've read some packages won't cross-compile. In such a case, this type of error is common. – J. M. Becker May 31 '12 at 17:35
  • Do you have qemu-user-static installed? – tumbleweed May 31 '12 at 23:55
  • yes, I even already have a chroot set up. I was just hoping I could get away from it, and get the benefits of cross-compiling. – J. M. Becker Jun 1 '12 at 5:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.