in reply to Device::USB gives "Use of uninitialized value in concatenation" error
What do you think the "error" means?
Did you add "use diagnostics;" to get a more verbose "error" message?
Do you have defined $ENV{LIBUSB_LIBDIR} ? Try getting rid of that (not defining it)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Device::USB gives "Use of uninitialized value in concatenation" error
by holandes777 (Scribe) on Dec 10, 2013 at 23:46 UTC | |
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
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:
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. | [reply] [d/l] [select] |
by Eliya (Vicar) on Dec 11, 2013 at 00:48 UTC | |
My guess would be that it's complaining about undefined CFLAGS / CPPFLAGS / LDFLAGS environment variables (see line 19 and 20). Line numbers reported are not always precise when a statement stretches over multiple lines. Try setting those env variables to nothing, i.e. export CFLAGS= etc., and see what happens... | [reply] [d/l] |
by holandes777 (Scribe) on Dec 11, 2013 at 00:59 UTC | |
this gave the following errors and output:
This indicates $ENV{CFLAGS},$ENV{CPPFLAGS} and $ENV{LDFLAGS} are uninitialized. I'll need to determine what they are supposed to be. There is not much useful I can find. I wonder why the package did not set the variables it needed. Could it be the botched cpan install? Frankly I have no idea what those things should be. I will try defining them as '' or some value
gives the following errors and output
from what I can tell, every ENV variable is assigned something, Why are there still 3 concatenation errors? | [reply] [d/l] [select] |
by Eliya (Vicar) on Dec 11, 2013 at 01:07 UTC | |
by holandes777 (Scribe) on Dec 11, 2013 at 01:20 UTC | |
|