Page 1 of 1

cross-compiling

Posted: Thu Nov 17, 2016 9:49 am
by luneart
Hello,

I'm trying to set-up a cross-compiling environment for compiling phidget C/C++ programs on my laptop.
I have installed libusb-1.0-0-dev on my computer through my distrib repositories, but that's the x86_64 build !

when I run

Code: Select all

./configure --prefix=/usr/arm-linux-gnueabi --host=arm-linux-gnueabi
*after installing packages gcc-arm-linux-gnueabi libc6-dev-armel-cross*, I get
configure: error: Missing libusb!
If I don't install those two cross-compiling packages, no error.

What should I do?

Re: cross-compiling

Posted: Thu Nov 17, 2016 10:24 am
by Patrick
What distribution are you on? There will usually be a way to install cross-packages for use by the cross-compiler. For example, on Debian 8, you would do 'apt-get install libusb-1.0-0-dev:armel'

-Patrick

Re: cross-compiling

Posted: Thu Nov 17, 2016 10:47 am
by luneart
linux mint, eg ubuntu, eg debian: I thought your advice would work right away... :)
I did find this doc, so I'll work on that (or compile from sources if I need only this one package...)

Thank you!

Re: cross-compiling

Posted: Mon Nov 21, 2016 10:46 am
by luneart
Hello,

So this do not work on (recent) *buntus, because armel support has been dropped since Precise, and multiarch need exact matches, eg the required armel libs must be from the same version the *buntu is.
I tried to compile it from source, but the dependencies without armel versions in recent *buntu repositories seems endless...

I don't understand, surely I'm not the first one not willing to compile on the SBC ??

Re: cross-compiling

Posted: Mon Nov 21, 2016 5:20 pm
by Patrick
Your best bet is probably a Debian VM, this is how we cross compile here. Latest Debian still supports armel.

https://wiki.debian.org/CrossToolchains will get you started.

-Patrick