in reply to Re^3: Device::USB gives "Use of uninitialized value in concatenation" error
in thread Device::USB gives "Use of uninitialized value in concatenation" error
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 print "CCFLAGS =>|$Config{ccflags}|$ENV{CFLAGS}|$ENV{CPPFLAGS}|\n +"; 23 print "LDDLFLAGS =>|$Config{lddlflags}|$ENV{LDFLAGS}|\n";
this gave the following errors and output:
root@gk-kubuntu-dev:~/dav/Nevada# perl kk.pl Use of uninitialized value in concatenation (.) or string at /usr/lib/ +perl5/Device/USB.pm line 10. Use of uninitialized value in concatenation (.) or string at /usr/lib/ +perl5/Device/USB.pm line 10. Use of uninitialized value in concatenation (.) or string at /usr/lib/ +perl5/Device/USB.pm line 10. Use of uninitialized value in concatenation (.) or string at /usr/lib/ +perl5/Device/USB.pm line 22. Use of uninitialized value in concatenation (.) or string at /usr/lib/ +perl5/Device/USB.pm line 22. CCFLAGS =>|-D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fstack-protector -fno- +strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FIL +E_OFFSET_BITS=64||| Use of uninitialized value in concatenation (.) or string at /usr/lib/ +perl5/Device/USB.pm line 23. LDDLFLAGS =>|-shared -L/usr/local/lib -fstack-protector||
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
9 $ENV{CFLAGS} = 'A'; 10 $ENV{CPPFLAGS} = 'B'; 11 $ENV{LDFLAGS} = 'C'; 12 $ENV{LIBUSB_LIBDIR} = 'D'; 13 $ENV{WINDDK} = 'E'; 14 $ENV{LIBUSB__INCDIR} = 'F'; 15 use Inline ( 16 C => "DATA", 17 ($ENV{LIBUSB_LIBDIR} 18 ? ( LIBS => "-L\"$ENV{LIBUSB_LIBDIR}\" " . 19 ($^O eq 'MSWin32' ? ' -llibusb -L\"$ENV{W +INDDK}\\lib\\crt\\i386\" -lmsvcrt ' : '-lusb') ) 20 : ( LIBS => '-lusb', ) 21 ), 22 ($ENV{LIBUSB_INCDIR} ? ( INC => "-I\"$ENV{LIBUSB_INCDIR}\ +"" ) : () ), 23 NAME => 'Device::USB', 24 VERSION => '0.35', 25 CCFLAGS => "$Config{ccflags} $ENV{CFLAGS} $ENV{CPPFLAGS}" +, 26 LDDLFLAGS => "$Config{lddlflags} $ENV{LDFLAGS}", 27 ); 28 print "CCFLAGS =>|$Config{ccflags}|$ENV{CFLAGS}|$ENV{CPPFLAGS}|\n +"; 29 print "LDDLFLAGS =>|$Config{lddlflags}|$ENV{LDFLAGS}|\n";
gives the following errors and output
Use of uninitialized value in concatenation (.) or string at /usr/lib/ +perl5/Device/USB.pm line 16. Use of uninitialized value in concatenation (.) or string at /usr/lib/ +perl5/Device/USB.pm line 16. Use of uninitialized value in concatenation (.) or string at /usr/lib/ +perl5/Device/USB.pm line 16. CCFLAGS =>|-D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fstack-protector -fno- +strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FIL +E_OFFSET_BITS=64|A|B| LDDLFLAGS =>|-shared -L/usr/local/lib -fstack-protector|C|
from what I can tell, every ENV variable is assigned something, Why are there still 3 concatenation errors?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^5: Device::USB gives "Use of uninitialized value in concatenation" error
by Eliya (Vicar) on Dec 11, 2013 at 01:07 UTC | |
by holandes777 (Scribe) on Dec 11, 2013 at 01:20 UTC | |
by Corion (Patriarch) on Dec 11, 2013 at 07:44 UTC | |
by Anonymous Monk on Feb 27, 2014 at 08:59 UTC |