You are not logged in.
Pages: 1
Hi all,
I've tried to install Device::USB on a pristine system, to no avail.
It was missing usb.h, then something else didn't install and so on.
After endless searching and fiddling around with everything I could think of, I ran out of ideas.
So here's what I've done after setting up the system from the latest Raspberry image:
pacman -Syu
pacman -S libusbx libusb-compat base-devel
pacman -S perl-inline perl-extutils-makemaker perl-parse-recdescent perl-test-warn perl-sub-uplevel perl-tree-dag-node perl-file-slurp perl-file-temp
pacman -S cpanminus
So far everything seems to be ok.
This should be a minimal system with all the dependencies I need.
Now I try to install Device::USB with
cpanm -i -v Device::USB
The result is:
[root@alarmpi ~]# cpanm -i -v Device::USB
cpanm (App::cpanminus) 1.7001 on perl 5.018002 built for armv6l-linux-thread-multi
Work directory is /root/.cpanm/work/1390167578.523
You have make /usr/bin/make
You have /usr/bin/wget
You have /usr/bin/tar: tar (GNU tar) 1.27.1
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by John Gilmore and Jay Fenlason.
Searching Device::USB on cpanmetadb ...
--2014-01-19 14:39:39-- http://cpanmetadb.plackperl.org/v1.0/package/Device::USB
Resolving cpanmetadb.plackperl.org (cpanmetadb.plackperl.org)... 185.31.17.129, 185.31.17.192
Connecting to cpanmetadb.plackperl.org (cpanmetadb.plackperl.org)|185.31.17.129|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 63 [text/x-yaml]
Saving to: 'STDOUT'
100%[===========================================================================================================================================>] 63 --.-K/s in 0s
2014-01-19 14:39:41 (843 KB/s) - written to stdout [63/63]
--> Working on Device::USB
Fetching http://www.cpan.org/authors/id/G/GW/GWADEJ/Device-USB-0.36.tar.gz ... --2014-01-19 14:39:41-- http://www.cpan.org/authors/id/G/GW/GWADEJ/Device-USB-0.36.tar.gz
Resolving www.cpan.org (www.cpan.org)... 212.117.177.118, 2620:101:d000:8::140:1, 2a01:608:2:4::2
Connecting to www.cpan.org (www.cpan.org)|212.117.177.118|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 29530 (29K) [application/x-gzip]
Saving to: 'Device-USB-0.36.tar.gz'
100%[===========================================================================================================================================>] 29,530 134KB/s in 0.2s
2014-01-19 14:39:44 (134 KB/s) - 'Device-USB-0.36.tar.gz' saved [29530/29530]
OK
Unpacking Device-USB-0.36.tar.gz
Device-USB-0.36/
Device-USB-0.36/t/
Device-USB-0.36/t/TestTools.pm
Device-USB-0.36/t/11-usb-device-methods.t
Device-USB-0.36/t/16-usb_dev_interface.t
Device-USB-0.36/t/06-list_devices.t
Device-USB-0.36/t/03-list_busses.t
Device-USB-0.36/t/04-find_device.t
Device-USB-0.36/t/05-find_device_if.t
Device-USB-0.36/t/07-list_devices_if.t
Device-USB-0.36/t/12-constants.t
Device-USB-0.36/t/00-load.t
Device-USB-0.36/t/18-usb_device-configurations.t
Device-USB-0.36/t/15-usb_dev_configuration.t
Device-USB-0.36/t/13-bus_find_device_if.t
Device-USB-0.36/t/17-usb_dev_endpoint.t
Device-USB-0.36/t/01-create-usb.t
Device-USB-0.36/t/02-find_busses_devices.t
Device-USB-0.36/t/14-bus_list_devices_if.t
Device-USB-0.36/t/08-get_busses.t
Device-USB-0.36/t/10-usb-device-accessors.t
Device-USB-0.36/t/09-usb-bus.t
Device-USB-0.36/lib/
Device-USB-0.36/lib/Device/
Device-USB-0.36/lib/Device/USB.pm
Device-USB-0.36/lib/Device/USB/
Device-USB-0.36/lib/Device/USB/DevInterface.pm
Device-USB-0.36/lib/Device/USB/Bus.pm
Device-USB-0.36/lib/Device/USB/DevEndpoint.pm
Device-USB-0.36/lib/Device/USB/FAQ.pod
Device-USB-0.36/lib/Device/USB/Device.pm
Device-USB-0.36/lib/Device/USB/DevConfig.pm
Device-USB-0.36/USB.pm
Device-USB-0.36/README
Device-USB-0.36/META.json
Device-USB-0.36/dump_usb.pl
Device-USB-0.36/Changes
Device-USB-0.36/Makefile.PL
Device-USB-0.36/META.yml
Device-USB-0.36/MANIFEST
Device-USB-0.36/xt/
Device-USB-0.36/xt/boilerplate.t
Device-USB-0.36/xt/pod.t
Device-USB-0.36/xt/pod-coverage.t
Device-USB-0.36/MANIFEST.SKIP
Entering Device-USB-0.36
Checking configure dependencies from META.json
Checking if you have Inline::MakeMaker 0 ... Yes (0.53)
Checking if you have ExtUtils::MakeMaker 0 ... Yes (6.84)
Running Makefile.PL
Configuring Device-USB-0.36 ... Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for Device::USB
Writing MYMETA.yml and MYMETA.json
OK
Checking dependencies from MYMETA.json ...
Checking if you have Inline::C 0 ... Yes (0.53)
Checking if you have Test::More 0 ... Yes (0.98)
Checking if you have Inline 0 ... Yes (0.53)
Checking if you have ExtUtils::MakeMaker 0 ... Yes (6.84)
Checking if you have Carp 0 ... Yes (1.29)
Building and testing Device-USB-0.36 ... cp lib/Device/USB.pm blib/lib/Device/USB.pm
Skip blib/lib/Device/USB.pm (unchanged)
cp lib/Device/USB/DevEndpoint.pm blib/lib/Device/USB/DevEndpoint.pm
cp lib/Device/USB/DevConfig.pm blib/lib/Device/USB/DevConfig.pm
cp lib/Device/USB/Device.pm blib/lib/Device/USB/Device.pm
cp dump_usb.pl blib/lib/Device/dump_usb.pl
cp lib/Device/USB/Bus.pm blib/lib/Device/USB/Bus.pm
cp lib/Device/USB/DevInterface.pm blib/lib/Device/USB/DevInterface.pm
cp lib/Device/USB/FAQ.pod blib/lib/Device/USB/FAQ.pod
/usr/bin/perl -Mblib -MInline=NOISY,_INSTALL_ -MDevice::USB -e1 0.36 blib/arch
validate Stage
Starting Build Preprocess Stage
get_maps Stage
Finished Build Preprocess Stage
Starting Build Parse Stage
Finished Build Parse Stage
Starting Build Glue 1 Stage
Finished Build Glue 1 Stage
Starting Build Glue 2 Stage
Finished Build Glue 2 Stage
Starting Build Glue 3 Stage
Finished Build Glue 3 Stage
Starting Build Compile Stage
Starting "perl Makefile.PL" Stage
Generating a Unix-style Makefile
Writing Makefile for Device::USB
Writing MYMETA.yml and MYMETA.json
Finished "perl Makefile.PL" Stage
Starting "make" Stage
make[1]: Entering directory '/root/.cpanm/work/1390167578.523/Device-USB-0.36/_Inline/build/Device/USB'
Running Mkbootstrap for Device::USB ()
chmod 644 USB.bs
/usr/bin/perl /usr/share/perl5/core_perl/ExtUtils/xsubpp -typemap "/usr/share/perl5/core_perl/ExtUtils/typemap" USB.xs > USB.xsc && mv USB.xsc USB.c
cc -c -I"/root/.cpanm/work/1390167578.523/Device-USB-0.36" -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -march=armv6 -mfloat-abi=hard -mfpu=vfp -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -DVERSION=\"0.36\" -DXS_VERSION=\"0.36\" -fPIC "-I/usr/lib/perl5/core_perl/CORE" USB.c
rm -f blib/arch/auto/Device/USB/USB.so
LD_RUN_PATH="/lib" cc -shared -Wl,-O1,--sort-common,--as-needed,-z,relro -L/usr/local/lib -fstack-protector USB.o -o blib/arch/auto/Device/USB/USB.so \
-lusb \
chmod 755 blib/arch/auto/Device/USB/USB.so
/usr/bin/perl -MExtUtils::Command::MM -e 'cp_nonempty' -- USB.bs blib/arch/auto/Device/USB/USB.bs 644
make[1]: Leaving directory '/root/.cpanm/work/1390167578.523/Device-USB-0.36/_Inline/build/Device/USB'
Finished "make" Stage
Starting "make install" Stage
make[1]: Entering directory '/root/.cpanm/work/1390167578.523/Device-USB-0.36/_Inline/build/Device/USB'
Running Mkbootstrap for Device::USB ()
chmod 644 USB.bs
Files found in blib/arch: installing files in blib/lib into architecture dependent library tree
Installing /root/.cpanm/work/1390167578.523/Device-USB-0.36/blib/arch/auto/Device/USB/USB.so
make[1]: Leaving directory '/root/.cpanm/work/1390167578.523/Device-USB-0.36/_Inline/build/Device/USB'
Finished "make install" Stage
Starting Cleaning Up Stage
Finished Cleaning Up Stage
Finished Build Compile Stage
Manifying blib/man3/Device::USB.3pm
Manifying blib/man3/Device::dump_usb.3pm
Manifying blib/man3/Device::USB::Bus.3pm
Manifying blib/man3/Device::USB::DevConfig.3pm
Manifying blib/man3/Device::USB::DevEndpoint.3pm
Manifying blib/man3/Device::USB::DevInterface.3pm
Manifying blib/man3/Device::USB::Device.3pm
Manifying blib/man3/Device::USB::FAQ.3pm
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00-load.t ....................... 1/1 # Testing Device::USB 0.36, Perl 5.018002, /usr/bin/perl
t/00-load.t ....................... ok
t/01-create-usb.t ................. Failed 2/2 subtests
t/02-find_busses_devices.t ........ Failed 4/4 subtests
t/03-list_busses.t ................ No subtests run
t/04-find_device.t ................ Failed 8/8 subtests
t/05-find_device_if.t ............. Failed 11/11 subtests
t/06-list_devices.t ............... Failed 8/8 subtests
t/07-list_devices_if.t ............ Failed 11/11 subtests
t/08-get_busses.t ................. No subtests run
t/09-usb-bus.t .................... Makefile:890: recipe for target 'test_dynamic' failed
make: *** [test_dynamic] Hangup
Connection to 192.168.xx.xx closed.
So in the end my SSH shell just gets booted, build.log ends in 'testing and building...'.
I have no idea why.
Does anyone have an idea how I could get this to work?
Cheers,
Markus
Offline
Turns out it's not possible to build this with the current sources as libusb is broken.
Cpan Bug is here: https://rt.cpan.org/Public/Bug/Display.html?id=65908
For future reference on how to get Device::USB working, install old libusb 0.1.12 as libusb-compat, then install Device::USB 0.35
PKGBUILD modified for Raspberry Pi:
# $Id: PKGBUILD 101197 2010-11-28 15:10:38Z tpowa $
# Maintainer: Tobias Powalowski <tpowa@archlinux.org>
# Contributor: arjan <arjan@archlinux.org>
pkgname=libusb-compat
srcname=libusb
pkgver=0.1.12
pkgrel=1
pkgdesc="Library to enable user space application programs to communicate with USB devices"
arch=('armv6h' 'i686' 'x86_64')
depends=('sh')
url="http://libusb.sourceforge.net/"
license=('LGPL')
source=(ftp://ftp.slackware.at/slackware-11.0/source/l/libusb/libusb-0.1.12.tar.gz)
options=('!libtool')
md5sums=('caf182cbc7565dac0fd72155919672e6')
build() {
cd ${srcdir}/${srcname}-${pkgver}
./configure --prefix=/usr
make
}
package() {
cd ${srcdir}/${srcname}-${pkgver}
make DESTDIR=${pkgdir} install
}
# Maintainer : Nicolas Guillaumin <nicolas plus archlinux at guillaumin dot me>
_perlmod=Device-USB
_modnamespace=Device
pkgname=perl-device-usb
pkgver=0.35
pkgrel=1
pkgdesc="Perl wrapper around the libusb 0.1 library"
arch=(i686 x86_64 armv6h)
url="http://search.cpan.org/dist/$_perlmod"
license=('GPL' 'PerlArtistic')
depends=('perl>=5.10.0' 'libusb-compat' 'perl-inline')
options=('!emptydirs')
source=("http://cpan.perl.org/modules/by-module/$_modnamespace/$_perlmod-$pkgver.tar.gz")
md5sums=(8ce79b0c26336dafd3d29f8cb534a925)
build() {
cd "$srcdir/$_perlmod-$pkgver"
# libusb_ C functions prefix conflicts with libusb-compat
# See https://rt.cpan.org/Public/Bug/Display.html?id=65908#txn-1123493
sed -i s/\\blibusb_/wrap_usb_/g ./*.{pm,pl} ./lib/Device/*.pm ./lib/Device/USB/*.pm ./t/*.t
# Install module in vendor directories.
PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
make
}
package() {
cd "$srcdir/$_perlmod-$pkgver"
make install DESTDIR="$pkgdir/"
}
Offline
Pages: 1