Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

openwrt and Device::USB

by AlexSH (Initiate)
on Mar 17, 2014 at 13:05 UTC ( [id://1078598]=perlquestion: print w/replies, xml ) Need Help??

AlexSH has asked for the wisdom of the Perl Monks concerning the following question:

Hello

Does anybody try compile Device::USB for openwrt?

When i try add it to buildroot i have error

makefile
include $(TOPDIR)/rules.mk PKG_NAME:=perl-device-usb PKG_VERSION:=0.36 PKG_RELEASE:=2 PKG_MD5SUM:=aa91bee777f7ed7a18225a84f8795344 PKG_SOURCE_URL:=http://search.cpan.org/CPAN/authors/id/G/GW/GWADEJ/ PKG_SOURCE:=Device-USB-$(PKG_VERSION).tar.gz PKG_CAT:=zcat PKG_BUILD_DIR:=$(BUILD_DIR)/perl/Device-USB-$(PKG_VERSION) # PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install include $(INCLUDE_DIR)/package.mk include ../../feeds/packages/lang/perl/perlmod.mk define Package/perl-device-usb SUBMENU:=Perl SECTION:=lang CATEGORY:=Languages TITLE:=A module that enables access to the libusb DEPENDS:=perl endef define Package/perl-device-usb/description A module that enables access to the libusb endef define Build/Configure $(call perlmod/Configure,-n,) endef define Build/Compile $(call perlmod/Compile,,) endef define Package/perl-device-usb/install $(call perlmod/Install,$(1),Device auto/Device) endef $(eval $(call BuildPackage,perl-device-usb))

Replies are listed 'Best First'.
Re: openwrt and Device::USB
by zentara (Archbishop) on Mar 17, 2014 at 14:24 UTC
    Does anybody try compile Device::USB for openwrt?

    I'm not sure what you are talking about. Device::USB is a front-end for libusb. If anything, you would recompile your libusb to be built with OpenWRT enabled as a configure option.

    Otherwise, be more specific as to what your problem is.


    I'm not really a human, but I play one on earth.
    Old Perl Programmer Haiku ................... flash japh
      i have this error
      . /home/shor/openwrt/trunk/include/shell.sh; gzip -dc /home/shor/openw +rt/trunk/dl/Device-USB-0.36.tar.gz | /bin/tar -C /home/shor/openwrt/t +runk/build_dir/target-mips_34kc_uClibc-0.9.33.2/perl/Device-USB-0.36/ +.. -xf - touch /home/shor/openwrt/trunk/build_dir/target-mips_34kc_uClibc-0.9.3 +3.2/perl/Device-USB-0.36/.prepared_1909645d4793965e2f93f05fc2cf4195 (cd /home/shor/openwrt/trunk/build_dir/target-mips_34kc_uClibc-0.9.33. +2/perl/Device-USB-0.36; PERL5LIB=/home/shor/openwrt/trunk/staging_dir +/target-mips_34kc_uClibc-0.9.33.2/usr/lib/perl5/5.10 PERL_MM_USE_DEFA +ULT=1 /home/shor/openwrt/trunk/staging_dir/target-mips_34kc_uClibc-0 +.9.33.2/usr/bin/perl Makefile.PL -n PERL_LIB=/home/shor/openwrt/trunk +/staging_dir/target-mips_34kc_uClibc-0.9.33.2/usr/lib/perl5/5.10 PERL +_ARCHLIB=/home/shor/openwrt/trunk/staging_dir/target-mips_34kc_uClibc +-0.9.33.2/usr/lib/perl5/5.10 INSTALLSITELIB=/usr/lib/perl5/5.10 INSTA +LLSITEARCH=/usr/lib/perl5/5.10 DESTDIR=/home/shor/openwrt/trunk/build +_dir/target-mips_34kc_uClibc-0.9.33.2/perl/Device-USB-0.36/ipkg-insta +ll ); Can't locate Inline/MakeMaker.pm in @INC (@INC contains: /home/shor/op +enwrt/trunk/staging_dir/target-mips_34kc_uClibc-0.9.33.2/usr/lib/perl +5/5.10 /usr/local/lib/perl5/5.10.0/x86_64-linux /usr/local/lib/perl5/ +5.10.0 /usr/local/lib/perl5/site_perl/5.10.0/x86_64-linux /usr/local/ +lib/perl5/site_perl/5.10.0 /home/shor/openwrt/trunk/staging_dir/targe +t-mips_34kc_uClibc-0.9.33.2/usr/lib/perl5/5.10 .) at Makefile.PL line + 3. BEGIN failed--compilation aborted at Makefile.PL line 3. make[3]: *** [/home/shor/openwrt/trunk/build_dir/target-mips_34kc_uCli +bc-0.9.33.2/perl/Device-USB-0.36/.configured_] Error 2 make[3]: Leaving directory `/home/shor/openwrt/trunk/package/perl-devi +ce-usb' make[2]: *** [package/perl-device-usb/compile] Error 2 make[2]: Leaving directory `/home/shor/openwrt/trunk' make[1]: *** [/home/shor/openwrt/trunk/staging_dir/target-mips_34kc_uC +libc-0.9.33.2/stamp/.package_compile] Error 2 make[1]: Leaving directory `/home/shor/openwrt/trunk' make: *** [world] Ошибка 2
      and when i try install Inline
      make[3]: Entering directory `/home/shor/openwrt/trunk/package/perl-inl +ine' . /home/shor/openwrt/trunk/include/shell.sh; gzip -dc /home/shor/openw +rt/trunk/dl/Inline-0.53.tar.gz | /bin/tar -C /home/shor/openwrt/trunk +/build_dir/target-mips_34kc_uClibc-0.9.33.2/perl/Inline-0.53/.. -xf - + touch /home/shor/openwrt/trunk/build_dir/target-mips_34kc_uClibc-0.9.3 +3.2/perl/Inline-0.53/.prepared_379864ceca4ec658bd8b2fd382b73fe6 (cd /home/shor/openwrt/trunk/build_dir/target-mips_34kc_uClibc-0.9.33. +2/perl/Inline-0.53; PERL5LIB=/home/shor/openwrt/trunk/staging_dir/tar +get-mips_34kc_uClibc-0.9.33.2/usr/lib/perl5/5.10 PERL_MM_USE_DEFAULT= +1 /home/shor/openwrt/trunk/staging_dir/target-mips_34kc_uClibc-0.9.3 +3.2/usr/bin/perl Makefile.PL -n PERL_LIB=/home/shor/openwrt/trunk/sta +ging_dir/target-mips_34kc_uClibc-0.9.33.2/usr/lib/perl5/5.10 PERL_ARC +HLIB=/home/shor/openwrt/trunk/staging_dir/target-mips_34kc_uClibc-0.9 +.33.2/usr/lib/perl5/5.10 INSTALLSITELIB=/usr/lib/perl5/5.10 INSTALLSI +TEARCH=/usr/lib/perl5/5.10 DESTDIR=/home/shor/openwrt/trunk/build_dir +/target-mips_34kc_uClibc-0.9.33.2/perl/Inline-0.53/ipkg-install ); Warning: prerequisite Parse::RecDescent 1.8 not found. Warning: prerequisite Test::Warn 0.21 not found. Checking if your kit is complete... Looks good Have /home/shor/openwrt/trunk/staging_dir/target-mips_34kc_uClibc-0.9. +33.2/usr/lib/perl5/5.10/Config.pm expected /Config.pm Your perl and your Config.pm seem to have different ideas about the architecture they are running on. Perl thinks: [5.10] Config says: [mips-linux-uclibc] This may or may not cause problems. Please check your installation of +perl if you have problems building this extension. Inline::C is packaged with Inline.pm because it is the most commonly u +sed Inline Language Support Module (ILSM). See also: Inline::ASM, ::Awk, ::BC, ::Basic, ::Befunge, ::CPP (C++), : +:CPR, ::Foo, ::Guile, ::Java, ::Octave, ::PERL, ::Python, ::Ruby, +::TT, ::Tcl and ::WebChat. Config.pm indicates that your version of Perl was built with this C co +mpiler: mips-openwrt-linux-uclibc-gcc I have located this compiler on your system. Do you want to install Inline::C? [y] y Warning: PERL_LIB (/usr/lib/perl5/5.10) seems not to be a perl library + directory (Exporter.pm not found) at /home/shor/openwrt/trunk/staging_di +r/target-mips_34kc_uClibc-0.9.33.2/usr/lib/perl5/5.10/ExtUtils/MM_Uni +x.pm line 1727. Have /home/shor/openwrt/trunk/staging_dir/target-mips_34kc_uClibc-0.9. +33.2/usr/lib/perl5/5.10/Config.pm expected /Config.pm Your perl and your Config.pm seem to have different ideas about the architecture they are running on. Perl thinks: [5.10] Config says: [mips-linux-uclibc] This may or may not cause problems. Please check your installation of +perl if you have problems building this extension. Writing Makefile for Inline::C Writing Makefile for Inline rm -f /home/shor/openwrt/trunk/build_dir/target-mips_34kc_uClibc-0.9.3 +3.2/perl/Inline-0.53/.configured_* touch /home/shor/openwrt/trunk/build_dir/target-mips_34kc_uClibc-0.9.3 +3.2/perl/Inline-0.53/.configured_ PERL5LIB=/home/shor/openwrt/trunk/staging_dir/target-mips_34kc_uClibc- +0.9.33.2/usr/lib/perl5/5.10 make -C /home/shor/openwrt/trunk/build_d +ir/target-mips_34kc_uClibc-0.9.33.2/perl/Inline-0.53 install make[4]: Entering directory `/home/shor/openwrt/trunk/build_dir/target +-mips_34kc_uClibc-0.9.33.2/perl/Inline-0.53' cp Inline.pod blib/lib/Inline.pod cp lib/Inline/MakeMaker/Changes blib/lib/Inline/MakeMaker/Changes cp lib/Inline/denter.pm blib/lib/Inline/denter.pm AutoSplitting blib/lib/Inline/denter.pm (blib/lib/auto/Inline/denter) cp Inline.pm blib/lib/Inline.pm AutoSplitting blib/lib/Inline.pm (blib/lib/auto/Inline) cp lib/Inline/Foo.pm blib/lib/Inline/Foo.pm cp Inline-API.pod blib/lib/Inline-API.pod cp lib/Inline/MakeMaker.pm blib/lib/Inline/MakeMaker.pm cp Inline-FAQ.pod blib/lib/Inline-FAQ.pod cp Inline-Support.pod blib/lib/Inline-Support.pod make[5]: *** No rule to make target `/Config.pm', needed by `Makefile' +. Stop. make[4]: *** [subdirs] Error 2 make[5]: Entering directory `/home/shor/openwrt/trunk/build_dir/target +-mips_34kc_uClibc-0.9.33.2/perl/Inline-0.53/C' make[5]: Leaving directory `/home/shor/openwrt/trunk/build_dir/target- +mips_34kc_uClibc-0.9.33.2/perl/Inline-0.53/C' make[4]: Leaving directory `/home/shor/openwrt/trunk/build_dir/target- +mips_34kc_uClibc-0.9.33.2/perl/Inline-0.53' make[3]: *** [/home/shor/openwrt/trunk/build_dir/target-mips_34kc_uCli +bc-0.9.33.2/perl/Inline-0.53/.built] Error 2 make[3]: Leaving directory `/home/shor/openwrt/trunk/package/perl-inli +ne' make[2]: *** [package/perl-inline/compile] Error 2 make[1]: *** [/home/shor/openwrt/trunk/staging_dir/target-mips_34kc_uC +libc-0.9.33.2/stamp/.package_compile] Error 2 make[2]: Leaving directory `/home/shor/openwrt/trunk' make[1]: Leaving directory `/home/shor/openwrt/trunk' make: *** [world] Ошибка 2
        I don't know what you expect us to do with this output?

        I see a couple of problems listed:

        Can't locate Inline/MakeMaker.pm in @INC

        Maybe install Inline::MakeMaker? Install the prerequisites listed.

        Also maybe uLibc ( micro lib c) dosn't have the full libraries needed for libusb and Device::USB?

        Can you manually configure and build libusb?

        That would be the first step.

        Also google for libusb ulibc mips, as there are some issues compiling, which are not Perl related.


        I'm not really a human, but I play one on earth.
        Old Perl Programmer Haiku ................... flash japh

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1078598]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (8)
As of 2024-04-23 09:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found