zigdon / twirssi

An irssi script allowing the use of Twitter from within the IRC client.
http://twirssi.com
134 stars 26 forks source link

Twirssi won't run because something with Net::Twitter fails #77

Closed sandebert closed 9 years ago

sandebert commented 9 years ago

Hi,

After following the installation instructions and launching irssi I get this in the status window:

15:51:18 -!- Irssi: Error in script twirssi:
15:51:18 Attempt to reload Net/Twitter.pm aborted.
15:51:18 Compilation failed in require at /home/user/.irssi/scripts/twirssi.pl line 12.
15:51:18 BEGIN failed--compilation aborted at /home/user/.irssi/scripts/twirssi.pl line 12.

Line 12 of twirssi.pl is:

use Net::Twitter qw/3.11009/;

Your documentation says one should have at least version 3, and looking at my installation I have version 4 installed.

$ dpkg -s libnet-twitter-perl | grep Version
Version: 4.01002-1~bpo70+1

Any ideas what might be the problem?

zigdon commented 9 years ago

Often, the problem is that irssi caches the lack of Net::Twitter. Restarting irssi is the first thing I'd suggest (or reloading the perl interface)

On Fri Feb 20 2015 at 6:58:26 AM Fredrik Sandebert notifications@github.com wrote:

Hi,

After following the installation instructions and launching irssi I get this in the status window:

15:51:18 -!- Irssi: Error in script twirssi: 15:51:18 Attempt to reload Net/Twitter.pm aborted. 15:51:18 Compilation failed in require at /home/user/.irssi/scripts/twirssi.pl line 12. 15:51:18 BEGIN failed--compilation aborted at /home/user/.irssi/scripts/twirssi.pl line 12.

Line 12 of twirssi.pl is:

use Net::Twitter qw/3.11009/;

Your documentation says one should have at least version 3, and looking at my installation I have version 4 installed.

$ dpkg -s libnet-twitter-perl | grep Version Version: 4.01002-1~bpo70+1

Any ideas what might be the problem?

— Reply to this email directly or view it on GitHub https://github.com/zigdon/twirssi/issues/77.

sandebert commented 9 years ago

In trying to fix this, I've restarted irssi many times, without any change. I tried finding info on how to reload the perl interface but haven't found any clues on how to do that. I'm hoping that's something that's also done when I restart irssi itself.

Also, today I noticed something that might be related or it might be a separate issue - can't really tell. The first time after a launch of irssi that I try /script load twirssi.pl I get a longer error message, like so:

20:58:31 -!- Irssi: Error in script twirssi:
20:58:31 List::Util version 1.33 required--this is only version 1.23 at /usr/local/lib/perl/5.14.2/Class/MOP/Class.pm line 18.
20:58:31 BEGIN failed--compilation aborted at /usr/local/lib/perl/5.14.2/Class/MOP/Class.pm line 18.
20:58:31 Compilation failed in require at /usr/local/lib/perl/5.14.2/Class/MOP.pm line 18.
20:58:31 BEGIN failed--compilation aborted at /usr/local/lib/perl/5.14.2/Class/MOP.pm line 18.
20:58:31 Compilation failed in require at /usr/local/lib/perl/5.14.2/Moose/Exporter.pm line 8.
20:58:31 BEGIN failed--compilation aborted at /usr/local/lib/perl/5.14.2/Moose/Exporter.pm line 8.
20:58:31 Compilation failed in require at /usr/local/lib/perl/5.14.2/Moose.pm line 15.
20:58:31 BEGIN failed--compilation aborted at /usr/local/lib/perl/5.14.2/Moose.pm line 15.
20:58:31 Compilation failed in require at /usr/share/perl5/Net/Twitter.pm line 3.
20:58:31 BEGIN failed--compilation aborted at /usr/share/perl5/Net/Twitter.pm line 3.
20:58:31 Compilation failed in require at /home/fsa/.irssi/scripts/twirssi.pl line 12.
20:58:31 BEGIN failed--compilation aborted at /home/fsa/.irssi/scripts/twirssi.pl line 12.

If I try to load the script again, I just get this short error:

21:03:32 -!- Irssi: Error in script twirssi:
21:03:32 Attempt to reload Net/Twitter.pm aborted.
21:03:32 Compilation failed in require at /home/user/.irssi/scripts/twirssi.pl line 12.
21:03:32 BEGIN failed--compilation aborted at /home/user/.irssi/scripts/twirssi.pl line 12.

If I restart irssi, this pattern repeats.

I've tried to figure out what the problem is with List::Util. As far as I can tell I have version 1.41 installed on my system:

$ perl -MList::Util -e 'print "$List::Util::VERSION\n"'
1.41

FYI: I'm on Debian Stable.

zigdon commented 9 years ago

Perhaps the dependencies for the deb package for net-twitter aren't correct? Sounds like you're missing Moose and other modules.

On Sat Feb 21 2015 at 12:14:01 PM Fredrik Sandebert < notifications@github.com> wrote:

In trying to fix this, I've restarted irssi many times, without any change. I tried finding info on how to reload the perl interface but haven't found any clues on how to do that. I'm hoping that's something that's also done when I restart irssi itself.

Also, today I noticed something that might be related or it might be a separate issue - can't really tell. The first time after a launch of irssi that I try /script load twirssi.pl I get a longer error message, like so:

20:58:31 -!- Irssi: Error in script twirssi: 20:58:31 List::Util version 1.33 required--this is only version 1.23 at /usr/local/lib/perl/5.14.2/Class/MOP/Class.pm line 18. 20:58:31 BEGIN failed--compilation aborted at /usr/local/lib/perl/5.14.2/Class/MOP/Class.pm line 18. 20:58:31 Compilation failed in require at /usr/local/lib/perl/5.14.2/Class/MOP.pm line 18. 20:58:31 BEGIN failed--compilation aborted at /usr/local/lib/perl/5.14.2/Class/MOP.pm line 18. 20:58:31 Compilation failed in require at /usr/local/lib/perl/5.14.2/Moose/Exporter.pm line 8. 20:58:31 BEGIN failed--compilation aborted at /usr/local/lib/perl/5.14.2/Moose/Exporter.pm line 8. 20:58:31 Compilation failed in require at /usr/local/lib/perl/5.14.2/Moose.pm line 15. 20:58:31 BEGIN failed--compilation aborted at /usr/local/lib/perl/5.14.2/Moose.pm line 15. 20:58:31 Compilation failed in require at /usr/share/perl5/Net/Twitter.pm line 3. 20:58:31 BEGIN failed--compilation aborted at /usr/share/perl5/Net/Twitter.pm line 3. 20:58:31 Compilation failed in require at /home/fsa/.irssi/scripts/twirssi.pl line 12. 20:58:31 BEGIN failed--compilation aborted at /home/fsa/.irssi/scripts/twirssi.pl line 12.

If I try to load the script again, I just get this short error:

21:03:32 -!- Irssi: Error in script twirssi: 21:03:32 Attempt to reload Net/Twitter.pm aborted. 21:03:32 Compilation failed in require at /home/user/.irssi/scripts/twirssi.pl line 12. 21:03:32 BEGIN failed--compilation aborted at /home/user/.irssi/scripts/twirssi.pl line 12.

If I restart irssi, this pattern repeats.

I've tried to figure out what the problem is with List::Util. As far as I can tell I have version 1.41 installed on my system:

$ perl -MList::Util -e 'print "$List::Util::VERSION\n"' 1.41

FYI: I'm on Debian Stable.

— Reply to this email directly or view it on GitHub https://github.com/zigdon/twirssi/issues/77#issuecomment-75390429.

ailin-nemui commented 9 years ago

maybe it is picking up the wrong version, try to run these three commands inside irssi to debug this issue further;

/script exec print $^V # to check your irssi perl version, and compare that with perl -V
/script exec print for @INC # and compare that to perl -V
/set perl_use_lib

you can also try /set -clear perl_use_lib if the path is already included in @INC when you run perl -V on the command line

sandebert commented 9 years ago

@zigdon Well, Net::Twitter was installed using apt-get so all dependencies should be there. I've never had any issues before with them not working. Still I reinstalled Net::Twitter and got the same result.

@ailin-nemui Thanks for giving me commands to try help find the problem. This is the output I got:

/script exec print $^V

v5.14.2
/script exec print for @INC

19:43:22 /home/user/.irssi/scripts
19:43:22 /usr/share/irssi/scripts
19:43:22 /usr/lib/perl/5.14
19:43:22 /etc/perl
19:43:22 /usr/local/lib/perl/5.14.2
19:43:22 /usr/local/share/perl/5.14.2
19:43:22 /usr/lib/perl5
19:43:22 /usr/share/perl5
19:43:22 /usr/share/perl/5.14
19:43:22 /usr/local/lib/site_perl
/set perl_use_lib

19:47:28 [perl]
19:47:28 perl_use_lib = /usr/lib/perl/5.14
$ perl -V  | grep -A100 @INC:

  @INC:
    /etc/perl
    /usr/local/lib/perl/5.14.2
    /usr/local/share/perl/5.14.2
    /usr/lib/perl5
    /usr/share/perl5
    /usr/lib/perl/5.14
    /usr/share/perl/5.14
    /usr/local/lib/site_perl
    .

And as the output from /set perl_use_lib is found in the @INC I tried this:

/set -clear perl_use_lib

19:50:01 [perl]
19:50:01 perl_use_lib = 

I then restarted irssi and tried the whole thing again:

19:53:49 -!- Irssi: Loaded script twirssi

...and it works! :-)

I don't understand enough about the situation to see how clearing that variable could have fixed it. Is it possible that clearing it will cause side effects for other scripts or irssi itself? Should I report this as a bug to irssi?

In any event, thank you to @zigdon and @ailin-nemui for helping me solve this!

sandebert commented 9 years ago

For posterity: I didn't (yet) get a response to my two questions but twirssi is working for me now so I'll close the issue.