GNU bug report logs - #43151
Calibre ebook-viewer requires QtWebEngine

Previous Next

Package: guix;

Reported by: Andreas Enge <andreas <at> enge.fr>

Date: Tue, 1 Sep 2020 09:49:01 UTC

Severity: normal

Done: Andreas Enge <andreas <at> enge.fr>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 43151 in the body.
You can then email your comments to 43151 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#43151; Package guix. (Tue, 01 Sep 2020 09:49:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Andreas Enge <andreas <at> enge.fr>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Tue, 01 Sep 2020 09:49:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Andreas Enge <andreas <at> enge.fr>
To: bug-guix <at> gnu.org
Subject: Calibre ebook-viewer requires QtWebEngine
Date: Tue, 1 Sep 2020 11:48:17 +0200
Hello,

when trying to view an epub using ebook-viewer from the calibre package
(or by directly clicking on an epub in calibre), the program fails with
the message:
   Could not find QtWebEngineProcess

I see that commit d79ec4fd343bc2a72652aa3a4b4ae14bd8df88ac has added
python2-pyqtwebengine and qtwebengine to the calibre inputs, but this
is apparently not enough.

I did not git bisect to see where the problem first appeared, but could
do so if this would help debugging.

Andreas





Information forwarded to bug-guix <at> gnu.org:
bug#43151; Package guix. (Tue, 01 Sep 2020 10:04:02 GMT) Full text and rfc822 format available.

Message #8 received at 43151 <at> debbugs.gnu.org (full text, mbox):

From: Andreas Enge <andreas <at> enge.fr>
To: 43151 <at> debbugs.gnu.org
Subject: Re: Calibre ebook-viewer requires QtWebEngine
Date: Tue, 1 Sep 2020 12:03:47 +0200
I did an strace and found the following:
4989  access("/gnu/store/kwx5xihpxmjjf8f8446vn883ank1qcg1-qtbase-5.14.2/lib", F_OK) = 0
4989  access("/gnu/store/kwx5xihpxmjjf8f8446vn883ank1qcg1-qtbase-5.14.2/lib/qt5/libexec/QtWebEngineProcess", F_OK) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
4989  access("/gnu/store/sd278fsdfx5hjrcgncflnp9qq4l42p1c-python2-2.7.17/bin/QtWebEngineProcess", F_OK) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
4989  write(2, "Could not find QtWebEngineProces"..., 34) = 34

This is a problem with a non-monolithic qt package: The file it is
looking for resides in qtwebengine, not qtbase.

The following works:
QTWEBENGINEPROCESS_PATH=`guix build qtwebengine`/lib/qt5/libexec/QtWebEngineProcess ebook-viewer

Do we need to set a search path in qtwebengine?

Andreas





Information forwarded to bug-guix <at> gnu.org:
bug#43151; Package guix. (Tue, 01 Sep 2020 10:38:02 GMT) Full text and rfc822 format available.

Message #11 received at 43151 <at> debbugs.gnu.org (full text, mbox):

From: Andreas Enge <andreas <at> enge.fr>
To: 43151 <at> debbugs.gnu.org
Subject: Re: bug#43151: Calibre ebook-viewer requires QtWebEngine
Date: Tue, 1 Sep 2020 12:37:12 +0200
On Tue, Sep 01, 2020 at 12:03:47PM +0200, Andreas Enge wrote:
> The following works:
> QTWEBENGINEPROCESS_PATH=`guix build qtwebengine`/lib/qt5/libexec/QtWebEngineProcess ebook-viewer
> 
> Do we need to set a search path in qtwebengine?

Well, no, since qtwebengine is not actually installed. Probably add it in a
wrapper around ebook-viewer and wherever else it pops up in applications?

Andreas





Information forwarded to bug-guix <at> gnu.org:
bug#43151; Package guix. (Thu, 03 Sep 2020 03:34:01 GMT) Full text and rfc822 format available.

Message #14 received at 43151 <at> debbugs.gnu.org (full text, mbox):

From: Brendan Tildesley <mail <at> brendan.scot>
To: 43151 <at> debbugs.gnu.org
Subject: Re: Calibre ebook-viewer requires QtWebEngine
Date: Thu, 3 Sep 2020 13:33:23 +1000
I created this patch which I think fixes it, copying the phase from 
Anki. https://issues.guix.gnu.org/issue/42885#4

Perhaps I should have only wrapped the ebook-viewer with qtwebengine 
instead of every program.





Information forwarded to bug-guix <at> gnu.org:
bug#43151; Package guix. (Sun, 06 Sep 2020 08:26:01 GMT) Full text and rfc822 format available.

Message #17 received at 43151 <at> debbugs.gnu.org (full text, mbox):

From: Andreas Enge <andreas <at> enge.fr>
To: Brendan Tildesley <mail <at> brendan.scot>
Cc: 43151 <at> debbugs.gnu.org
Subject: Re: bug#43151: Calibre ebook-viewer requires QtWebEngine
Date: Sun, 6 Sep 2020 10:25:19 +0200
(cc-ing this and only this bug, the other one seems to have diverged towards
css and typescript)

On Fri, Sep 04, 2020 at 07:53:02PM +1000, Brendan Tildesley wrote:
> > I did not realise there was already an open ticket for updating calibre,
> > thanks for pointing it out. Indeed I do not think we need to wrap all
> > programs. I tried out the programs in ...calibre-4.18.0/bin, and only these
> > two fail with an error message:
> >     ebook-edit
> >     ebook-viewer
> > I did not try the different calibre-*; calibre itself starts. Then it can call
> > ebook-viewer, and I do not know the mechanism, so it might just call the
> > wrapped binary ebook-viewer, or it might need wrapping itself because of using
> > internal python mechanics. I would give it a try and not wrap it in the first
> > place.
> > 
> > All "binaries" are already wrappend with PYTHONPATH, so there is probably some
> > mechanic to avoid double wrapping (which your patch may already address).
> Since it uses (replace 'wrap..., it won't run the old wrap phase any more.
> Also I don't think it matters much that the other variables also have the Qt
> variable wrapped, perhaps it is more correct anyway. Especially since the
> wrap script uses '=, which wrap-program interprets as overwriting the
> variable completely, so applying it twice won't make a difference anyway.

Well, I think we should not wrap more than absolutely necessary. And it would
even be easier to write (no need to look for all the binaries, just use these
two names). Would you like to create a patch maybe for the current calibre,
and handle the update following the other bug?

Andreas





Information forwarded to bug-guix <at> gnu.org:
bug#43151; Package guix. (Mon, 07 Sep 2020 06:02:02 GMT) Full text and rfc822 format available.

Message #20 received at 43151 <at> debbugs.gnu.org (full text, mbox):

From: Brendan Tildesley <mail <at> brendan.scot>
To: Andreas Enge <andreas <at> enge.fr>, Arun Isaac <arunisaac <at> systemreboot.net>,
 Leo Famulari <leo <at> famulari.name>
Cc: Ricardo Wurmus <rekado <at> elephly.net>,
 Ludovic Courtès <ludo <at> gnu.org>, 43151 <at> debbugs.gnu.org
Subject: Re: bug#43151: Calibre ebook-viewer requires QtWebEngine
Date: Mon, 7 Sep 2020 16:01:31 +1000
[Message part 1 (text/plain, inline)]
On 6/9/20 6:25 pm, Andreas Enge wrote:
> (cc-ing this and only this bug, the other one seems to have diverged towards
> css and typescript)
>
> On Fri, Sep 04, 2020 at 07:53:02PM +1000, Brendan Tildesley wrote:
>>> I did not realise there was already an open ticket for updating calibre,
>>> thanks for pointing it out. Indeed I do not think we need to wrap all
>>> programs. I tried out the programs in ...calibre-4.18.0/bin, and only these
>>> two fail with an error message:
>>>      ebook-edit
>>>      ebook-viewer
>>> I did not try the different calibre-*; calibre itself starts. Then it can call
>>> ebook-viewer, and I do not know the mechanism, so it might just call the
>>> wrapped binary ebook-viewer, or it might need wrapping itself because of using
>>> internal python mechanics. I would give it a try and not wrap it in the first
>>> place.
>>>
>>> All "binaries" are already wrappend with PYTHONPATH, so there is probably some
>>> mechanic to avoid double wrapping (which your patch may already address).
>> Since it uses (replace 'wrap..., it won't run the old wrap phase any more.
>> Also I don't think it matters much that the other variables also have the Qt
>> variable wrapped, perhaps it is more correct anyway. Especially since the
>> wrap script uses '=, which wrap-program interprets as overwriting the
>> variable completely, so applying it twice won't make a difference anyway.
> Well, I think we should not wrap more than absolutely necessary. And it would
> even be easier to write (no need to look for all the binaries, just use these
> two names). Would you like to create a patch maybe for the current calibre,
> and handle the update following the other bug?
>
> Andreas
>
It's actually a bit more complicated because every other executable 
still requires PYTHONPATH wrapping anyway as python-build-system does 
it. I just tested creating such a wrap phase that only sets 
QTWEBENGINEPROCESS_PATH for ebook-viewer and ebook-edit. It works when 
they are opened directly, but when they are opened via the calibre 
interface, they fail to find qtwebengine. so it does seem that calibre 
it's self needs that variable set anyway.

I've attached a patching fixing this one issue. For those I've emailed 
coming from the Issue I created for updating Calibre, since it looks 
like the update will be delayed until Mathjax 3 is packaged properly, 
would you mind just reviewing this fix to get it through for the current 
Calibre.

I think Ricardo was having a go at packaging swc to transpile typescript 
which is needed for mathjax, but it looks like quite a challenge.

[0001-gnu-calibre-Wrap-QTWEBENGINEPROCESS_PATH.patch (text/x-patch, attachment)]

Information forwarded to bug-guix <at> gnu.org:
bug#43151; Package guix. (Mon, 07 Sep 2020 08:13:01 GMT) Full text and rfc822 format available.

Message #23 received at 43151 <at> debbugs.gnu.org (full text, mbox):

From: Brendan Tildesley <mail <at> brendan.scot>
To: "Prafulla Giri <pratheblackdiamond"@gmail.com,
 Andreas Enge <andreas <at> enge.fr>
Cc: 43249 <at> debbugs.gnu.org, 43151 <at> debbugs.gnu.org
Subject: Re: Resolve Calibre run-time dependency
Date: Mon, 7 Sep 2020 18:12:37 +1000
There is actually a Bug report by Andreas for this very issue. I created 
a bug report just for updating, and fixed this issue after it while I 
could, without realising. Sorry for all the confusion with things 
happening in 3 different threads.

I created an updated patch just for this one here. 
https://issues.guix.gnu.org/43151#5

Your patch also works I think but it will wrap the programs twice, so 
you will get calibre, .calibre-real, and ..calibre-real-real, etc for 
every program, which seems ugly. My patch reproduces the same PYTHONPATH 
that is set in python-build-system in addition to wrapping PYTHONPATH 
(unless I made a mistake), although at the cost of code duplication. I 
leave it to you and who ever is reviewing this to decide which way is 
more correct and push one, haha.


Please continue any discussion of the QtWebEngine bug on issue 43121: 
43151 <at> debbugs.gnu.org / https://issues.guix.gnu.org/43151





Information forwarded to bug-guix <at> gnu.org:
bug#43151; Package guix. (Mon, 07 Sep 2020 08:16:01 GMT) Full text and rfc822 format available.

Message #26 received at 43151 <at> debbugs.gnu.org (full text, mbox):

From: Brendan Tildesley <mail <at> brendan.scot>
To: Prafulla Giri <pratheblackdiamond <at> gmail.com>
Cc: 43151 <at> debbugs.gnu.org
Subject: Re: Resolve Calibre run-time dependency
Date: Mon, 7 Sep 2020 18:15:15 +1000
Sorry I tried sending this with a typo in your gmail address so I'm 
resending just for you:

On 7/9/20 6:12 pm, Brendan Tildesley wrote:
> There is actually a Bug report by Andreas for this very issue. I 
> created a bug report just for updating, and fixed this issue after it 
> while I could, without realising. Sorry for all the confusion with 
> things happening in 3 different threads.
>
> I created an updated patch just for this one here. 
> https://issues.guix.gnu.org/43151#5
>
> Your patch also works I think but it will wrap the programs twice, so 
> you will get calibre, .calibre-real, and ..calibre-real-real, etc for 
> every program, which seems ugly. My patch reproduces the same 
> PYTHONPATH that is set in python-build-system in addition to wrapping 
> PYTHONPATH (unless I made a mistake), although at the cost of code 
> duplication. I leave it to you and who ever is reviewing this to 
> decide which way is more correct and push one, haha.
>
>
> Please continue any discussion of the QtWebEngine bug on issue 43121: 
> 43151 <at> debbugs.gnu.org / https://issues.guix.gnu.org/43151






Reply sent to Andreas Enge <andreas <at> enge.fr>:
You have taken responsibility. (Tue, 08 Sep 2020 20:13:02 GMT) Full text and rfc822 format available.

Notification sent to Andreas Enge <andreas <at> enge.fr>:
bug acknowledged by developer. (Tue, 08 Sep 2020 20:13:02 GMT) Full text and rfc822 format available.

Message #31 received at 43151-done <at> debbugs.gnu.org (full text, mbox):

From: Andreas Enge <andreas <at> enge.fr>
To: Brendan Tildesley <mail <at> brendan.scot>
Cc: 42885 <at> debbugs.gnu.org, 43249-done <at> debbugs.gnu.org,
 Prafulla Giri <pratheblackdiamond <at> gmail.com>, 43151-done <at> debbugs.gnu.org
Subject: Re: bug#43151: Resolve Calibre run-time dependency
Date: Tue, 8 Sep 2020 22:11:44 +0200
Hello,

On Mon, Sep 07, 2020 at 06:15:15PM +1000, Brendan Tildesley wrote:
> Your patch also works I think but it will wrap the programs twice, so
> you will get calibre, .calibre-real, and ..calibre-real-real, etc for
> every program, which seems ugly. My patch reproduces the same PYTHONPATH
> that is set in python-build-system in addition to wrapping PYTHONPATH
> (unless I made a mistake), although at the cost of code duplication. I
> leave it to you and who ever is reviewing this to decide which way is
> more correct and push one, haha.

thanks to both of your for your patches! I just pushed Brendan's, which
wraps only once at the price of copy-pasting from another package. I confirm
that it works, also to click on an epub file from within calibre. Closing
the two bugs asking about qtwebengine.

Concerning the update, is mathjax a required input now, or could we just
leave it out and update nevertheless?

Andreas





Information forwarded to bug-guix <at> gnu.org:
bug#43151; Package guix. (Wed, 09 Sep 2020 08:39:02 GMT) Full text and rfc822 format available.

Message #34 received at 43151-done <at> debbugs.gnu.org (full text, mbox):

From: Prafulla Giri <pratheblackdiamond <at> gmail.com>
To: Andreas Enge <andreas <at> enge.fr>
Cc: 42885 <at> debbugs.gnu.org, 43249-done <at> debbugs.gnu.org,
 Brendan Tildesley <mail <at> brendan.scot>, 43151-done <at> debbugs.gnu.org
Subject: Re: bug#43151: Resolve Calibre run-time dependency
Date: Wed, 9 Sep 2020 14:23:34 +0545
[Message part 1 (text/plain, inline)]
I see. Thank you for the update.

Hopefully (wrap-program) will be fixed soon. That should save us a lot of
code-duplication.

Congratulations, Mr. Tildesley! (:
[Message part 2 (text/html, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 07 Oct 2020 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 173 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.