Debian – Installing a cross-toolchain to build ARM binaries on Debian

armcross-compilationdebiangcclinux-kernel

I tried to install a cross toolchain so I could build Linux kernel on
amd64 (Debian testing "jessie") for my ARM system. I have this entry in sources.list:

deb http://www.emdebian.org/debian sid main

When I tried to install gcc-4.7-arm-linux-gnueabi, I got an error:

cc-4.7-arm-linux-gnueabi : Depends: libgomp1-armel-cross (>=4.7.2-5) but it is not going to be installed

libgomp1-armel-cross in turn depends on gcc-4.8-base-armel-cross which
is not available anywhere.

At some point, I did manage to install these cross-build tools from the same repository, and even built a kernel that now runs on these ARM systems
some weeks ago. Is there something broken in that repository? I tried a few other versions of GCC, and still get the same issue.

A not-ideal solution is cross-building in an Ubuntu 12.04 VM. The distro has the ARM cross-compiler available from its official repositories.

Best Answer

Emdebian repositories are recommended to be used in stable most of the time since there could be utilities not built in the repositories, packages that were pulled back, etc. If you want to ensure that all your libraries have the correct dependencies, I would suggest stable or testing since they are less likely to have some dependency problem or have something that got borked.

Related Question