Discussion:
[Swig-devel] Perl tests fail with Perl 5.26 without dot in INC
Jitka Plesníková
2017-06-14 11:52:27 UTC
Permalink
Hi,

we updated Perl to 5.26 in Fedora. One of changes is removal of the
current directory (".")
from @INC by default. This change caused that some Perl tests failed.

Details about the change
http://search.cpan.org/dist/perl-5.26.0/pod/perldelta.pod#Removal_of_the_current_directory_(%22.%22)***@INC

Example of error:

Can't locate example.pm in @INC (you may need to install the example
module) (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5
/usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl
/usr/lib64/perl5 /usr/share/perl5) at runme.pl line 7.
BEGIN failed--compilation aborted at runme.pl line 7.
make[3]: *** [../../Makefile:285: perl5_run] Error 2
make[2]: *** [Makefile:10: check] Error 2
make[1]: *** [Makefile:257: class.actionexample] Error 2
checking Examples/perl5/constants
Can't locate example.pm in @INC (you may need to install the example
module) (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5
/usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl
/usr/lib64/perl5 /usr/share/perl5) at runme.pl line 3.
BEGIN failed--compilation aborted at runme.pl line 3.
make[3]: *** [../../Makefile:285: perl5_run] Error 2
make[2]: *** [Makefile:10: check] Error 2
make[1]: *** [Makefile:257: constants.actionexample] Error 2

The error could be fixed by adding 'BEGIN { push @INC, '.'; }' to the tests.

The attachment contains patch which fixes the tests for Fedora.

Regards,
Jitka
--
Jitka Plesníková
Software Engineer
Red Hat
Robert Stone
2017-06-14 18:33:40 UTC
Permalink
Post by Jitka Plesníková
Hi,
we updated Perl to 5.26 in Fedora. One of changes is removal of the
current directory (".")
Details about the change
Thanks, I think we can get a solution for this in place. I suspect the
change might impact a bit more than just the tests. Some of the
expected uses for generated perl modules might break too. I'll
investigate.

Robert
Robert Stone
2017-06-15 04:14:24 UTC
Permalink
Post by Robert Stone
Post by Jitka Plesníková
Hi,
we updated Perl to 5.26 in Fedora. One of changes is removal of the
current directory (".")
Details about the change
Thanks, I think we can get a solution for this in place. I suspect the
change might impact a bit more than just the tests. Some of the
expected uses for generated perl modules might break too. I'll
investigate.
It looks like Olly got this one already in commit 8855ef2b yesterday,
thanks!
Olly Betts
2017-06-21 05:10:57 UTC
Permalink
Post by Robert Stone
Post by Robert Stone
Thanks, I think we can get a solution for this in place. I suspect the
change might impact a bit more than just the tests. Some of the
expected uses for generated perl modules might break too. I'll
investigate.
It looks like Olly got this one already in commit 8855ef2b yesterday,
thanks!
I fixed the testsuite (by just passing -I. to perl when we run tests
as adding back the current directory should be fine in this context).

Not sure what you have in mind by "expected uses for generated perl
modules might break too", but I didn't consider anything like that.

Adding back the current directory to the include path doesn't seem a
good idea to do as a general fix (it was removed for sound reasons),
so I guess it's probably a matter of updating any documentation which
suggests things which rely on this.

Cheers,
Olly

Loading...