On 2014-03-14 14:14:23, FANTASMA wrote:
Show quoted text> On Tue Mar 04 17:38:11 2014, ANDK wrote:
> Thanks for reporting, my problem is, I don't know what it means. There
> is no offending code line mentioned.
>
> It passes on my box, so I'm at a loss where to start.
It looks like an invisible taint-related error. It can be reproduced using the following command:
$ perl5.19.9 -T -Mblib -e 'require "./lib/PDL/Dims.pm"; warn "ok"'
Nothing is printed out here, perl silently dies without an error message. Exit code is non-zero. The same command without -T shows the expected "ok" message (and some unrelated smartmatch-related warnings in bleadperl).
Running this line with strace shows the invisible error message:
write(2, "Insecure $ENV{PATH} while running with -T switch at /opt/perl-5.19.9/lib/site_perl/5.19.9/i686-linux/PDL/IO/Pic.pm line 190, <DATA> line 207.\nCompilation failed in require at (eval
9) line 21, <DATA> line 207.\nBEGIN failed--compilation aborted at (eval 9) line 21, <DATA> line 207.\nBEGIN failed--compilation aborted at ./lib/PDL/Dims.pm line 29, <DATA> line 207.\nCompilation failed in require at -e line 1, <DATA> line 207.\n", 424) = 424
PDL::IO::Pic seems to do some heavy initialization stuff even if it is just require'd or use'd, doing some system() calls. This seems to be forbidden in taint mode unless $ENV{PATH} is set to a sane value. The above oneliner works if something like
$ENV{PATH}="/bin:/usr/bin";
is put in front of the perl code.
The easiest solution is to remove the "-T" in the shebang of the test script. A better solution is maybe to talk to the PDL::IO::Pic author and ask him/her to move the initialization stuff to a later phase.
Regards,
Slaven