I want to set up a cross-compiling environment for Phidget's SBC.libphidget needs libusb-1.0-0 and libusb-1.0-0-dev, and currently it doesn't find those:~/Softwares/libphidget-2.1.8.20151217 $ ./configure --prefix=/usr/arm-linux-gnueabi --host=arm-linux-gnueabi[...]checking for library containing libusb_init... nochecking for library containing usb_find_busses... noconfigure: error: Missing libusb!What I have tried:I have those libs for my arch (amd64), and I've tried to install for armel. I added the arch through dpkg$ dpkg --print-foreign-architecturesi386armel$ apt-config dump |grep -i archAPT::Architecture amd64;APT::Architectures ;APT::Architectures:: amd64;APT::Architectures:: i386;APT::Architectures:: armel;then added the source (through a search on launchpad.net, I found those packages and arch to be in Precise: deb [arch=armel,armhf] http://ports.ubuntu.com/ubuntu-ports precise main universe), and finally tried to install through the repositories:$ apt-cache policy libusb-1.0.0:armellibusb-1.0-0:armel:  Install: (aucun)  Candidat: 2:1.0.9~rc3-2ubuntu1 Table de version:     2:1.0.9~rc3-2ubuntu1 500        500 http://ports.ubuntu.com/ubuntu-ports precise/main armel Packageslibusb-1.0-0-dev:armel:  Install: (aucun)  Candidat: 2:1.0.9~rc3-2ubuntu1 Table de version:     2:1.0.9~rc3-2ubuntu1 500        500 http://ports.ubuntu.com/ubuntu-ports precise/main armel Packages$ luneart@luneart-Lenovo-renew ~ $ sudo apt-get install libusb-1.0-0-dev:armel libusb-1.0-0:armelLecture des listes de paquets... FaitConstruction de l'arbre des dpendances       Lecture des informations d'tat... FaitCertains paquets ne peuvent tre installs. Ceci peut signifier que vous avez demand l'impossible, ou bien, si vous utilisez la distribution unstable, que certains paquets n'ont pas encore t crs ou ne sont pas sortis d'Incoming.L'information suivante devrait vous aider  rsoudre la situation: Les paquets suivants contiennent des dpendances non satisfaites: libusb-1.0-0:armel : Dpend: libc6:armel (>= 2.8) mais ne sera pas install libusb-1.0-0-dev:armel : Dpend: libc6-dev:armel mais ne sera pas install ou                                  libc-dev:armelE: Impossible de corriger les problmes, des paquets dfectueux sont en mode garder en l'tat.It doesn't install anything because it misses armel's libc6 dependencies, though it should resolve those. I tried to find cross package for libc6 (I first searched for libusb cross packages, but didn't find any):$ apt-cache search libc6 armellibc6-armhf - Embedded GNU C Library: ARM hard float shared libraries for armellibc6-dev - Embedded GNU C Library: Development Libraries and Header Fileslibc6-dev-armhf - Embedded GNU C Library: ARM hard float development libraries for armellibc6 - GNU C Library: Shared librarieslibc6-dbg-armel-cross - GNU C Library: detached debugging symbols (for cross-compiling)libc6-armel-armhf-cross - Dummy package to get libc6:armel installedlibc6-armel-cross - GNU C Library: Shared libraries (for cross-compiling)libc6-armhf-armel-cross - Dummy package to get libc6:armhf installedlibc6-dev-armel-armhf-cross - Dummy package to get libc6-dev:armel installedlibc6-dev-armel-cross - GNU C Library: Development Libraries and Header Files (for cross-compiling)libc6-dev-armhf-armel-cross - Dummy package to get libc6-dev:armhf installedThen I installed those, starting with libc6-armel-cross:dpkg -l libc6*Souhait=inconnU/Install/suppRim/Purg/H= garder| tat=Non/Install/fichier-Config/dpaqUet/chec-conFig/H=semi-install/W=attend-traitement-dclenchements|/ Err?=(aucune)/besoin Rinstallation (tat,Err: majuscule=mauvais)||/ Nom                     Version          Architecture     Description+++-=======================-================-================-===================================================ii  libc6:amd64             2.23-0ubuntu4    amd64            GNU C Library: Shared librariesii  libc6:i386              2.23-0ubuntu4    i386             GNU C Library: Shared librariesun  libc6-amd64             <aucune>         <aucune>         (aucune description n'est disponible)un  libc6-armel-armel-cross <aucune>         <aucune>         (aucune description n'est disponible)ii  libc6-armel-armhf-cross 2.23-0ubuntu3cro all              Dummy package to get libc6:armel installedii  libc6-armel-cross       2.23-0ubuntu3cro all              GNU C Library: Shared libraries (for cross-compilinun  libc6-armel-dcv1        <aucune>         <aucune>         (aucune description n'est disponible)ii  libc6-armhf-armel-cross 2.23-0ubuntu3cro all              Dummy package to get libc6:armhf installedun  libc6-armhf-armhf-cross <aucune>         <aucune>         (aucune description n'est disponible)ii  libc6-armhf-cross       2.23-0ubuntu3cro all              GNU C Library: Shared libraries (for cross-compilinun  libc6-armhf-dcv1        <aucune>         <aucune>         (aucune description n'est disponible)ii  libc6-dbg:amd64         2.23-0ubuntu4    amd64            GNU C Library: detached debugging symbolsii  libc6-dbg-armel-cross   2.23-0ubuntu3cro all              GNU C Library: detached debugging symbols (for crosun  libc6-dbg-armel-dcv1    <aucune>         <aucune>         (aucune description n'est disponible)ii  libc6-dev:amd64         2.23-0ubuntu4    amd64            GNU C Library: Development Libraries and Header Filun  libc6-dev-armel-armel-c <aucune>         <aucune>         (aucune description n'est disponible)ii  libc6-dev-armel-armhf-c 2.23-0ubuntu3cro all              Dummy package to get libc6-dev:armel installedii  libc6-dev-armel-cross   2.23-0ubuntu3cro all              GNU C Library: Development Libraries and Header Filun  libc6-dev-armel-dcv1    <aucune>         <aucune>         (aucune description n'est disponible)ii  libc6-dev-armhf-armel-c 2.23-0ubuntu3cro all              Dummy package to get libc6-dev:armhf installedun  libc6-dev-armhf-armhf-c <aucune>         <aucune>         (aucune description n'est disponible)ii  libc6-dev-armhf-cross   2.23-0ubuntu3cro all              GNU C Library: Development Libraries and Header Filun  libc6-dev-armhf-dcv1    <aucune>         <aucune>         (aucune description n'est disponible)un  libc6-dev-i386          <aucune>         <aucune>         (aucune description n'est disponible)ii  libc6-i386              2.23-0ubuntu4    amd64            GNU C Library: 32-bit shared libraries for AMD64un  libc6-i686              <aucune>         <aucune>         (aucune description n'est disponible)un  libc6-xen               <aucune>         <aucune>         (aucune description n'est disponible)un  libc6.1                 <aucune>         <aucune>         (aucune description n'est disponible)un  libc6.1-dev             <aucune>         <aucune>         (aucune description n'est disponible)un  libc6.1-dev-armel-cross <aucune>         <aucune>         (aucune description n'est disponible)un  libc6.1-dev-armhf-cross <aucune>         <aucune>         (aucune description n'est disponible)Most of those packages but libc6-armel-cross are probably useless... Actually dpkg -L libc6-armel-cross shows /usr/arm-linux-gnueabi/lib/libc.so.6. However, libusb, libusb-dev installs still fail, and libphidget's configure also.
*buntu multiarch: libusb-dev & libusb for armel
ubuntu;cross compilation;multiarch
Multiarch only works if you stay in the same distribution, because the installed libraries have to match exactly. This is why you can't install the Precise libusb on your non-Precise system: it needs libc6:armel, but that can't match the native libc6 you have installed...As I see it you have two clean solutions:use multiarch on a distribution where armel is still supported (cough Debian cough);cross-build libusb for armel yourself, using the armel cross-toolchain that's packaged in Ubuntu (which is what you've found with libc6-armel-cross etc.).Alternatively you could copy the target libraries from the target system and point your build at those. You should get away with using your system's headers for libusb (but not for libc6).