cross-compiling

Supporting 2.6 and up
Post Reply
luneart
Phidgetly
Posts: 19
Joined: Wed Nov 02, 2016 3:27 am
Contact:

cross-compiling

Post 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?
User avatar
Patrick
Lead Developer
Posts: 3403
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: cross-compiling

Post 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
luneart
Phidgetly
Posts: 19
Joined: Wed Nov 02, 2016 3:27 am
Contact:

Re: cross-compiling

Post 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!
luneart
Phidgetly
Posts: 19
Joined: Wed Nov 02, 2016 3:27 am
Contact:

Re: cross-compiling

Post 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 ??
User avatar
Patrick
Lead Developer
Posts: 3403
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: cross-compiling

Post 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
Post Reply

Who is online

Users browsing this forum: No registered users and 14 guests