unofficial mirror of meta@public-inbox.org
 help / color / mirror / Atom feed
* Trouble running lei
@ 2022-05-03 11:15 Filipe Manana
  2022-05-03 11:37 ` Eric Wong
  0 siblings, 1 reply; 5+ messages in thread
From: Filipe Manana @ 2022-05-03 11:15 UTC (permalink / raw)
  To: meta

Hello,

I tried both 'master' branch and tag v1.8.0, I did the documented build steps:

$ git clone https://public-inbox.org/public-inbox.git/
$ cd public-inbox

$ perl Makefile.PL
$ make
$ echo $? # success, prints 0

$ cd certs
$ /usr/bin/perl ./create-certs.perl
$ cd ..
$ make test
(...)
All tests successful.
Files=157, Tests=6785, 491 wallclock secs ( 0.77 usr  0.13 sys + 39.65
cusr 14.90 csys = 55.45 CPU)
Result: PASS

$ make symlink-install

$HOME/bin is included in my $PATH, but when I run 'lei', I get an error:

$ lei q -o ~/Mail/overlay -I https://lore.kernel.org/all -t
'dfn:fs/btrfs/* AND rt:3.month.ago..'
Attempt to reload PublicInbox/LeiXSearch.pm aborted.
Compilation failed in require at
/home/fdmanana/git/hub/public-inbox/lib/PublicInbox/LeiQuery.pm line
74.

This is on a Ubuntu 20.04.3 LTS distro.
I have it working on a Debian SID box without any problems (it was set
up several months ago).

Any ideas about what's wrong?

Thank you.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Trouble running lei
  2022-05-03 11:15 Trouble running lei Filipe Manana
@ 2022-05-03 11:37 ` Eric Wong
  2022-05-03 12:50   ` Filipe Manana
  0 siblings, 1 reply; 5+ messages in thread
From: Eric Wong @ 2022-05-03 11:37 UTC (permalink / raw)
  To: Filipe Manana; +Cc: meta

Filipe Manana <fdmanana@kernel.org> wrote:
> Hello,
> 
> I tried both 'master' branch and tag v1.8.0, I did the documented build steps:
> 
> $ git clone https://public-inbox.org/public-inbox.git/
> $ cd public-inbox
> 
> $ perl Makefile.PL
> $ make
> $ echo $? # success, prints 0
> 
> $ cd certs
> $ /usr/bin/perl ./create-certs.perl
> $ cd ..
> $ make test
> (...)

Any messages about missing dependencies when running tests?
(e.g. Xapian)

Inline::C or Socket::Msghdr shouldn't be required with 1.8
on most arches...

> All tests successful.
> Files=157, Tests=6785, 491 wallclock secs ( 0.77 usr  0.13 sys + 39.65
> cusr 14.90 csys = 55.45 CPU)

Fwiw, "make check" or "make check-run" can be a lot faster on SMP.

> Result: PASS
> 
> $ make symlink-install
> 
> $HOME/bin is included in my $PATH, but when I run 'lei', I get an error:
> 
> $ lei q -o ~/Mail/overlay -I https://lore.kernel.org/all -t
> 'dfn:fs/btrfs/* AND rt:3.month.ago..'
> Attempt to reload PublicInbox/LeiXSearch.pm aborted.

Odd, "Attempt to reload %s aborted" coming from perl itself means it
already tried and failed before.  (man perldiag)

Were there previous errors from other commands?

Perhaps it's already running lei-daemon as an older version?
"lei daemon-kill" should kill it and it'll restart on the next
command, unless something else got wedged.

I've been meaning to make the daemon stuff "worth it"
w.r.t. automatic updates/flag/keyword sync (inotify/IDLE) but
haven't gotten around to it, yet :x

> Compilation failed in require at
> /home/fdmanana/git/hub/public-inbox/lib/PublicInbox/LeiQuery.pm line
> 74.
> 
> This is on a Ubuntu 20.04.3 LTS distro.
> I have it working on a Debian SID box without any problems (it was set
> up several months ago).
> 
> Any ideas about what's wrong?

Probably daemon-kill will get rid of an old version that's
already running (and verifying that it's actually dead).

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Trouble running lei
  2022-05-03 11:37 ` Eric Wong
@ 2022-05-03 12:50   ` Filipe Manana
  2022-05-03 15:24     ` Konstantin Ryabitsev
  0 siblings, 1 reply; 5+ messages in thread
From: Filipe Manana @ 2022-05-03 12:50 UTC (permalink / raw)
  To: Eric Wong; +Cc: meta

On Tue, May 3, 2022 at 12:37 PM Eric Wong <e@80x24.org> wrote:
>
> Filipe Manana <fdmanana@kernel.org> wrote:
> > Hello,
> >
> > I tried both 'master' branch and tag v1.8.0, I did the documented build steps:
> >
> > $ git clone https://public-inbox.org/public-inbox.git/
> > $ cd public-inbox
> >
> > $ perl Makefile.PL
> > $ make
> > $ echo $? # success, prints 0
> >
> > $ cd certs
> > $ /usr/bin/perl ./create-certs.perl
> > $ cd ..
> > $ make test
> > (...)
>
> Any messages about missing dependencies when running tests?
> (e.g. Xapian)
>
> Inline::C or Socket::Msghdr shouldn't be required with 1.8
> on most arches...
>
> > All tests successful.
> > Files=157, Tests=6785, 491 wallclock secs ( 0.77 usr  0.13 sys + 39.65
> > cusr 14.90 csys = 55.45 CPU)
>
> Fwiw, "make check" or "make check-run" can be a lot faster on SMP.

Oh, I didn't know about it. Good to know.

>
> > Result: PASS
> >
> > $ make symlink-install
> >
> > $HOME/bin is included in my $PATH, but when I run 'lei', I get an error:
> >
> > $ lei q -o ~/Mail/overlay -I https://lore.kernel.org/all -t
> > 'dfn:fs/btrfs/* AND rt:3.month.ago..'
> > Attempt to reload PublicInbox/LeiXSearch.pm aborted.
>
> Odd, "Attempt to reload %s aborted" coming from perl itself means it
> already tried and failed before.  (man perldiag)
>
> Were there previous errors from other commands?
>
> Perhaps it's already running lei-daemon as an older version?
> "lei daemon-kill" should kill it and it'll restart on the next
> command, unless something else got wedged.

Ah, running "lei daemon-kill" fixed it.
I don't know if I did something wrong before, but after running that,
lei is now working fine.

Thanks!

>
> I've been meaning to make the daemon stuff "worth it"
> w.r.t. automatic updates/flag/keyword sync (inotify/IDLE) but
> haven't gotten around to it, yet :x
>
> > Compilation failed in require at
> > /home/fdmanana/git/hub/public-inbox/lib/PublicInbox/LeiQuery.pm line
> > 74.
> >
> > This is on a Ubuntu 20.04.3 LTS distro.
> > I have it working on a Debian SID box without any problems (it was set
> > up several months ago).
> >
> > Any ideas about what's wrong?
>
> Probably daemon-kill will get rid of an old version that's
> already running (and verifying that it's actually dead).

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Trouble running lei
  2022-05-03 12:50   ` Filipe Manana
@ 2022-05-03 15:24     ` Konstantin Ryabitsev
  2022-05-03 20:32       ` Eric Wong
  0 siblings, 1 reply; 5+ messages in thread
From: Konstantin Ryabitsev @ 2022-05-03 15:24 UTC (permalink / raw)
  To: Filipe Manana; +Cc: Eric Wong, meta

On Tue, May 03, 2022 at 01:50:52PM +0100, Filipe Manana wrote:
> > Perhaps it's already running lei-daemon as an older version?
> > "lei daemon-kill" should kill it and it'll restart on the next
> > command, unless something else got wedged.
> 
> Ah, running "lei daemon-kill" fixed it.
> I don't know if I did something wrong before, but after running that,
> lei is now working fine.

I think this is actually a common occurrence. Any way lei-daemon can recognize
when there's a version mismatch between itself and the binary talking to it?

Regards,
-K'

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Trouble running lei
  2022-05-03 15:24     ` Konstantin Ryabitsev
@ 2022-05-03 20:32       ` Eric Wong
  0 siblings, 0 replies; 5+ messages in thread
From: Eric Wong @ 2022-05-03 20:32 UTC (permalink / raw)
  To: Konstantin Ryabitsev; +Cc: Filipe Manana, meta

Konstantin Ryabitsev <konstantin@linuxfoundation.org> wrote:
> On Tue, May 03, 2022 at 01:50:52PM +0100, Filipe Manana wrote:
> > > Perhaps it's already running lei-daemon as an older version?
> > > "lei daemon-kill" should kill it and it'll restart on the next
> > > command, unless something else got wedged.
> > 
> > Ah, running "lei daemon-kill" fixed it.
> > I don't know if I did something wrong before, but after running that,
> > lei is now working fine.

Good to know!

> I think this is actually a common occurrence. Any way lei-daemon can recognize
> when there's a version mismatch between itself and the binary talking to it?

Sorta, but even I manage to lose track of which commits cause
protocol or internal API changes since everything is lazy-loaded.

I think the best way would be to have inotify/kqueue watch the /PublicInbox/
directory and auto-restart iff no active commands are running...

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-05-03 20:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-03 11:15 Trouble running lei Filipe Manana
2022-05-03 11:37 ` Eric Wong
2022-05-03 12:50   ` Filipe Manana
2022-05-03 15:24     ` Konstantin Ryabitsev
2022-05-03 20:32       ` Eric Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).