Segfault Running perl on Slackware Current (2015-12-22)

This morning, Tuesday 2015-12-22, I noticed that some PERL scripts which had worked in the past now segfault on Slackware64 Current.

My investigation revealed that the issue is with Term::ReadKey, as when I run:

perl -d -MCPAN -eshell

I get:

Loading DB routines from version 1.49
Editor support available.

Enter h or 'h h' for help, or 'man perldebug' for more help.

main::(-e:1):    shell
Signal SEGV at /usr/local/lib64/perl5/Term/ line 303.
require Term/ called at /usr/local/share/perl5/Term/ReadLine/ line 491
eval {...} called at /usr/local/share/perl5/Term/ReadLine/ line 493
readline::preinit called at /usr/local/share/perl5/Term/ReadLine/ line 207
require Term/ReadLine/ called at /usr/local/share/perl5/Term/ReadLine/ line 63
eval {...} called at /usr/local/share/perl5/Term/ReadLine/ line 63
Term::ReadLine::Perl::new("Term::ReadLine", "perldb", GLOB(0x18a8db0), GLOB(0x173cf88)) called at /usr/share/perl5/ line 6840
DB::setterm() called at /usr/share/perl5/ line 1832
DB::_DB__read_next_cmd(undef) called at /usr/share/perl5/ line 2761
DB::DB called at -e line 1

Poking around a bit, I learned that: while ReadTerm is part of the Slackware package perl-5.22.0-x86_64-1, ReadKey is something added by me via CPAN.

To fix this, I removed all the perl stuff from /usr/local/ using:

rm -r /usr/local/lib64/perl5

After that, no segfault when I run:

perl -MCPAN -eshell

Woohoo! A quick reinstall of some CPAN stuff I like and I’m back in business. At the CPAN prompt:

install YAML
install Bundle::LWP
install Bundle::CPAN

My guess is that the aaa_elflibs upgrade of 15 December caused this, but that’s only a guess.  Regardless of the cause, this fix worked.

Happy Slacking!

1 thought on “Segfault Running perl on Slackware Current (2015-12-22)”

Leave a Comment