I think the error means the module is trying to perform a concatenation and one of the variables it is attempting to use is undefined. This is definitely the case with $ENV{LIBUSB_LIBDIR}, it is undefined.

Device::USB is a cpan module, rather than trying to get rid of the variable I think I should ascertain what its value should be

root@gk-kubuntu-dev:~/dav/Nevada# find / -name libusb* /lib/firmware/carl9170fw/extra/libusb-zeropacket.diff /lib/x86_64-linux-gnu/libusb-0.1.so.4.4.4 /lib/x86_64-linux-gnu/libusb-0.1.so.4 /lib/x86_64-linux-gnu/libusb-1.0.so.0.1.0 /lib/x86_64-linux-gnu/libusb-1.0.so.0 /var/cache/apt/archives/libusb-1.0-0-dbg_2%3a1.0.16-3_amd64.deb /var/cache/apt/archives/libusb-1.0-0-dev_2%3a1.0.16-3_amd64.deb /var/cache/apt/archives/libusb-1.0-doc_2%3a1.0.16-3_all.deb /var/lib/dpkg/info/libusb-0.1-4:amd64.shlibs /var/lib/dpkg/info/libusb-1.0-0-dbg:amd64.list /var/lib/dpkg/info/libusb-1.0-0:amd64.md5sums /var/lib/dpkg/info/libusb-0.1-4:amd64.symbols /var/lib/dpkg/info/libusb-1.0-0:amd64.postrm /var/lib/dpkg/info/libusbmuxd2.symbols /var/lib/dpkg/info/libusb-0.1-4:amd64.postrm /var/lib/dpkg/info/libusb-1.0-0:amd64.postinst /var/lib/dpkg/info/libusbmuxd2.postinst /var/lib/dpkg/info/libusb-1.0-0:amd64.shlibs /var/lib/dpkg/info/libusb-0.1-4:amd64.postinst /var/lib/dpkg/info/libusbmuxd2.md5sums /var/lib/dpkg/info/libusb-1.0-doc.list /var/lib/dpkg/info/libusbmuxd2.postrm /var/lib/dpkg/info/libusb-1.0-0-dev:amd64.list /var/lib/dpkg/info/libusb-1.0-doc.md5sums /var/lib/dpkg/info/libusb-1.0-0-dev:amd64.md5sums /var/lib/dpkg/info/libusb-1.0-0:amd64.list /var/lib/dpkg/info/libusb-1.0-0:amd64.symbols /var/lib/dpkg/info/libusb-1.0-0-dbg:amd64.md5sums /var/lib/dpkg/info/libusbmuxd2.shlibs /var/lib/dpkg/info/libusb-0.1-4:amd64.list /var/lib/dpkg/info/libusbmuxd2.list /var/lib/dpkg/info/libusb-0.1-4:amd64.md5sums /usr/share/doc-base/libusb-1.0-doc /usr/share/doc/libusb-1.0-0 /usr/share/doc/libusb-1.0-0-dev /usr/share/doc/libusb-0.1-4 /usr/share/doc/libusb-1.0-doc /usr/share/doc/libusb-1.0-doc/html/libusb_8h_source.html /usr/share/doc/libusb-1.0-0-dbg /usr/share/doc/libusbmuxd2 /usr/lib/libusbmuxd.so.1.0.8 /usr/lib/libusbmuxd.so.2 /usr/lib/x86_64-linux-gnu/libusb-1.0.so /usr/lib/x86_64-linux-gnu/libusb-1.0.a /usr/lib/x86_64-linux-gnu/pkgconfig/libusb-1.0.pc /usr/lib/debug/lib/x86_64-linux-gnu/libusb-1.0.so.0.1.0 /usr/include/libusb-1.0 /usr/include/libusb-1.0/libusb.h

I chose /lib/x86_64-linux-gnu/ and /usr/include/ and assigned the values to $ENV{LIBUSB_LIBDIR}, neither of which worked.

Is it possible that there a missing symlink someplace that should point to libusb(somethingorother)? The code from USB.pm is as follows:

9 use Inline ( 10 C => "DATA", 11 ($ENV{LIBUSB_LIBDIR} 12 ? ( LIBS => "-L\"$ENV{LIBUSB_LIBDIR}\" " . 13 ($^O eq 'MSWin32' ? ' -llibusb -L\"$ENV{W +INDDK}\\lib\\crt\\i386\" -lmsvcrt ' : '-lusb') ) 14 : ( LIBS => '-lusb', ) 15 ), 16 ($ENV{LIBUSB_INCDIR} ? ( INC => "-I\"$ENV{LIBUSB_INCDIR}\ +"" ) : () ), 17 NAME => 'Device::USB', 18 VERSION => '0.35', 19 CCFLAGS => "$Config{ccflags} $ENV{CFLAGS} $ENV{CPPFLAGS}" +, 20 LDDLFLAGS => "$Config{lddlflags} $ENV{LDFLAGS}", 21 ); 22 23 Inline->init();

I don't recognize what it is. Is it bash code to set up the environment? This is fascinating: I commented out lines 11,12,13,14,15 and the error persists. What is most interesting is that in that section the only concatenation operator is on line 12, and even commented out the error persists. This indicates the error is elsewhere, bu there are no further concatenations in the USB.pm file.


In reply to Re^2: Device::USB gives "Use of uninitialized value in concatenation" error by holandes777
in thread Device::USB gives "Use of uninitialized value in concatenation" error by holandes777

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.