I have recently been trying to cross-compile programs for ARM. However, when I run make
, I always get an error within a minute or less that says something like
/usr/lib/gcc-cross/arm-linux-gnueabihf/4.8/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lgio-2.0.
The thing that confuses me is that I get that error every time I try to cross-compile a program (except it doesn't always say that it can't find -lgio-2.0. It has trouble finding other things too). Is there something I'm doing wrong? Why is it always this error? The only program I have been able to successfully cross-compile is bash, but I've had problems with everything else. What do I do? I have all of the libraries and things installed, as I am able to natively compile the programs just fine.
Best Answer
As mentioned by muru. You need to install the ARM architecture of that library. However they are not listed on http://packages.ubuntu.com site. Neither, it's easy to manage dependencies manually that way.
Note: Setup a
chroot
environment, I found weird behavior when I addedarmhf
architecture to my Ubuntu 15.04 amd64. I useddpkg --add-architecture=armhf
. The APT start complaining about broken packagewine
and tried to remove alli386
packages.Add new sources file
Add the source of the architecture you want and release you have.
Check for available arch here: http://ports.ubuntu.com/ubuntu-ports/dists/trusty/main/ as you can browse up/down for different releases.
Update package list
Add a dpkg configuration
with this line
Install need packages as needed, example:
References: