Not so very long after I was finally able to produce my first packages for Calibre 5.x, Kovid Goyal ended that development cycle and bumped his e-book management application’s major version number to “6” in order to make a switch from Qt5 to Qt6 as its graphical engine.
The main hurdle for me when the upgrade from Calibre 4.x to 5.x happened was that internally, Calibre switched from Python2 to Python3. Essentially the whole of Calibre is written in Python and it uses PyQt to build the graphical interface using Qt widgets.
It took me a lot of work to re-write the calibre.SlackBuild to also make that Python switch. After all, my single calibre package is actually getting built from many sources (44 tarballs for Calibre 4, 55 tarballs for Calibre 5) and a lot of those had to be replaced to work with Python3. Moving my calibre.SlackBuild to Python3 took so much effort that I decided to apply some simplification as well: I removed the script’s ability to build its own Qt5 libraries from source, instead I let my calibre-5.x packages depend on the qt5 package which is already present in the Slackware OS since release 15.0.
Naturally I was not looking forward to doing the same cumbersome and time-consuming exercise again, now having to figure out the intricacies of Qt6, a graphical toolkit I had never built or used before.
But I was bothered by the consequence that I had to stick with Calibre 5.44 being the final release using Qt5, and so I decided to take my time, and inbetween other activities I started gradually re-writing the calibre.SlackBuild script to encompass the new sources and get these compiled and tested.
Now then finally, you can install Calibre 6 on Slackware using a 170 MB large natively-built package which needs 64 source tarballs to compile You can get the new Calibre 6 packages from my repository or any mirror (like my own US mirror). No external dependencies, works out of the box on Slackware 15.0 or -current.
To refresh your memory in case you are still thinking “what the heck is he talking about” – Calibre is an e-book library management program which I started using after buying my first E-reader (a Sony TRS-T1) and discovering that the accompanying e-book management software was proprietary and not user-friendly. The functionality and ease-of-use of Calibre were so much better than the commercial software that I never looked back.
I now read my e-books on a Kobo Aura2 H2O . Adding books to the reader is dead-simple: Calibre exports my book library on the internet as a OPDS server that works with any e-reader that has Internet connectivity, and I can scroll through my library even when on vacation and pick a new book to read. The power of Open Source.
A note for those of you who are on a 32bit Slackware and are currently using my Calibre 5.x package. With Calibre 6 it is no longer needed to set the “QTWEBENGINE_CHROMIUM_FLAGS” variable to disable seccomp. Qt6 does not appear to have the issues that the embedded Chromium browser of Qt5 had.
I also checked that the application’s screenreader still works. Right-click the current page in your open e-book text and then click “Read Aloud“. The text-to-speech is provided by an embedded speech-dispatcher program.
This is great, but the downside of it is, that the default espeak voice sounds like Steve Hawking came to visit you. If you find out how to improve the text-to-speech capability of Calibre by adding voices (especially non-english) and playing with the various engines, please let me know in the comments section below. I really would like to improve the out-of-the-box TTS experience for people with visual disabilities or dyslexia.
Have fun! Eric
Hi Eric,
Slackware 15.0 ships only the espeak-ng speech synthesizer and associated voices, so that’s what calibre uses through speech-dispatcher
It is possible to at least change the voice and associated language, get better sounding ones needs to install them, like the mbrola voices that espeak-ng can handle. More voices can be bought by users, or/ installed with additional speech synthesizers like voxin. I can help you package or bundle such stuff with Calibre, hopefully at the beginning of next week, meanwhile you could have a look on how I package these stuff in https://slackware.uk/slint/x86_64/slint-15.0/source/.
Directories that could be of interest: espeak-ng, espeak-ng-variants (I package them separately), flite, flite-voices, mbrola RHVoice, speehc-dispatcher, svox.
How this stuff is used is indicated in https://slint.fr/doc/HandBook.html#_voices_and_tts_in_slin
I installed your package for 15.0 in slint-15.0, it works, thanks! As I have several TTS engines and associated voices installed, I could choose other synthesizers and voices. Re-building and/or re-configuring the internal speech-dispatcher (by the way Samuel released version 0.11.3 one month ago) would give access to more among the ones I have installed. Meanwhile you can check how your shiny new calibre speaks in Slint installing it, which should not take long: https://slackware.uk/slint/x86_64/slint-15.0/iso/ then just installpkg it.
I hope this helps at least a little,
Cheers,
Didier
PS for your information Slint includes ebook-speaker, a console application limited features.
Unfortunately, while reading a book aloud is easy for a sighted users, not so for the blind as this GUI is completely inaccessible with a screen reader as far as I can tell.
I tested running the Orca screen reader, and also tried to find appropriate keyboard shortcuts in https://manual.calibre-ebook.com/en/gui.html#keyboard-shortcuts to no avail. I tried both in Maté (based on GTK3) and LXQt (based on Qt5),
I will ping Christian Hempfling aka Chrys https://github.com/chrys87 about that as he contributes to make KDE/Plasma more accessible, and is probably aware of the accessibility status of Qt and applications relying on it.
Sorry for conveying not so good news.
Cheers,
Didier
Thanks For Calibre 6 and the latest chromium packages Eric.
Posting from chromium-ungoogled/chromium-ungoogled-106.0.5249.119-x86_64-1alien and I am testing calibre-6.7.1-x86_64-1alien with a few books right now.
I like the new Calibre.
Thanks again !
— kjh
Grazie!
I’m getting:
Failed to import PyQt module: PyQt6.QtNetwork with error: /lib64/libgssapi_krb5.so.2: undefined symbol: k5_sname_compare, version krb5_3_MIT
Traceback (most recent call last):
File “/usr/bin/calibre”, line 21, in
sys.exit(calibre())
File “/usr/lib64/calibre/calibre/gui_launch.py”, line 72, in calibre
from calibre.gui2.main import main
File “/usr/lib64/calibre/calibre/gui2/__init__.py”, line 13, in
from qt.core import (
ImportError: cannot import name ‘QNetworkProxyFactory’ from ‘qt.core’ (/usr/lib64/calibre/qt/core.py)
Hi Geremia,
I do not see this error on Slackware 15.0 (using XFCE) or -current (using Plasma5).
Do you already have another version of calibre installed? What is your OS?
I am getting exact same error. Running slackware-current, with Plasma.
I *had* the generic version of Calibre 6.7.1, but removed it before installed your package (as I usually prefer your packages, they work better in my Slackware).
Let me know if I can get ant trace for you to find out the issue.
Perhaps the configuration files of that generic Calibre are causing this? What happens when you create a fresh user account and start Calibre using that account?
good point, I have not tested that, give me a sec …
…
tested:
1. run calibre-uninstall (to remove original version)
2. check the libs are not there any longer
3. slackpkg install calibre
4. create a fresh user with useradd -d /home/tests -m -g users -u 2001 tests
5 run calibre with the new user: same result, same error
a detail I failed to comment earlier, the very last line of the error message is:
ImportError: libffi.so.7: cannot open shared object file: No such file or directory
and it is true I have not that file, but I have /usr/lib64/libffi.so.8
could it be that your package requieres an older version of the lib?
I’ll upgrade my Slackware-current to the latest packages and see what happens. I’ll report back later (or tomorrow).
I have upgraded to the latest slackware64-current and Calibre still works without error. I added some more MBROLA voices and they work too.
No message about libffi.so.7 either. Perhaps you have some other 3rd party package installed which relies on that older libffi and which is pulled in when Calibre starts.
it could be, but it’s unlikely.
The thing is that I do not have the libffi.so.7, it was removed from Slackware last week:
Wed Oct 19 20:06:33 UTC 2022
a/aaa_libraries-15.1-x86_64-11.txz: Rebuilt.
Upgraded: libcap.so.2.66, liblzma.so.5.2.7, libpopt.so.0.0.2,
libexpat.so.1.8.9, libglib-2.0.so.0.7200.4, libgmodule-2.0.so.0.7200.4,
libgobject-2.0.so.0.7200.4, libgthread-2.0.so.0.7200.4, libhistory.so.8.2,
libreadline.so.8.2.
Added: libunistring.so.2.1.0, libunistring.so.5.0.0.
Removed: libffi.so.7.1.0.
So, if any other third party software needs it, I would be having error with that other package as well, and I have not seen any error.
But of course it might happen that it is a package I don’t use often, so I will keep an eye in case something else starts complaining.
Thanks for your work and effort troubleshooting this.
Hi Jesus,
I used ‘ldd’ to check the libraries (in /usr/lib64/calibre/lib/) in my Calibre packages for Slackware64 15.0 and -current. Libraries in the package for Slackware 15.0 link to libffi.so.7 and the libraries in the Calibre package for Slackware-current link to libffi.so.8.
I checked that my repository indeed has the correct packages for each of these Slackware releases.
Did you by any chance download the package that is meant for Slackware 15.0? What is its md5sum? FFor the -current package that should be 5809e9adc62f623acfd33b8f1bb214be.
And once again, you are right, I was using the Slackware-15 package.
b3db7842e58bae259452c5bd8096eb03 /var/cache/packages/SLACKPKGPLUS_alienbob/calibre/calibre-6.7.1-x86_64-1alien.txz
After downloading the right one:
5809e9adc62f623acfd33b8f1bb214be /var/cache/packages/SLACKPKGPLUS_alienbob/calibre/calibre-6.7.1-x86_64-1alien.txz
Removed the -15, downloaded and installed the -current, and … like a charm.
Thanks!
Glad it’s resolved now.
Hi Eric,
I hope you know how much your work enriches the lives of so many people. These emails embody the excitement and passion of Linux.
Thank you,
Pete
It makes me happy all the time when I do stuff that I like and at the same time can share with other people. Follow your dreams.
I have to admit audio books are nice for knitting and other things where I’m engaged in something, but can’t look up from it (unless I’m knitting garter or stockinette. I can do those in my sleep.) I don’t get the hate about audiobooks or ebooks. My partner has the family ADHD, and can concentrate on audiobooks easier, too. The speech thing is a nice feature to have that I didn’t know existed.
I added a package for MBROLA to my repository. It is a speech synthesizer which can be used by speech-dispatcher.
After installing it, create a directory “/usr/share/mbrola” as root.
Then, download one or more mbrola voices here: https://github.com/numediart/MBROLA-voices
Each voice goes into their own subdirectory. For instance, to install the female dutch voice “nl3”:
# mkdir -p /usr/share/mbrola/nl3
# cd /usr/share/mbrola/nl3
# wget https://github.com/numediart/MBROLA-voices/raw/master/data/nl3/nl3
Open the configuration file /etc/speech-dispatcher/speechd.conf and uncomment the line:
AddModule “espeak-ng-mbrola-generic” “sd_generic” “espeak-ng-mbrola-generic.conf”
Then start Calibre, open a dutch EPUB (of course); start the screenreader, click on the cogwheel and select the new voice which is now visible, called: “dutch-mbrola-3”. Calibre reads the dutch text with a dutch female voice. Compared to Google’s Assistant voice it’s pretty awful 🙂 But it is understandable!
You can add many voices like this, for many languages. Perhaps I should create a package for that.
Nice !
I’ll check out mbrola
Thanks Eric
— kjh
In recent versions of speech-dispatcher there is no need to un-comment any AddModule line, if the module is built and installed and the corresponding .conf file installed the synthesizer will be usable.
As an aside although I contributed to the file espeak-ng-mbrola-generic.conf as shown by my copyright at the bottom of it: https://github.com/brailcom/speechd/blob/master/config/modules/espeak-mbrola-generic.conf I do not use it anymore, as now the module espeak-ng-mbrola provides the same features…
And of course feel free to use any of my building stuff to write your SlackBuilds as you see fit.
Hi Eric! As soon as I saw your announcement I downloaded and installed the new Calibre. It worked very well. Thanks! I really appreciate the huge effort in getting a great package of a qt6-based complex piece of software.
Hmm… there are some disadvantages to not upgrading to Slack 15, I guess. One of them seems to be that I’m going to have to stick with Calibre 4.15 for a bit longer. 🙁
Thanks for all you do, Eric! 🙂
The calibre 6.x packages contain an embedded version of Python 3.10 and that one no longer supports openssl 1.0.x as found in Slackware 14.2.
You could try changing the embedded version to a 3.9 release and then compile a calibre package yourself.
But it is probably wiser to upgrade to Slackware 15.0 regardless. What is holding you back? Time, customization or software like KDE4 that is no longer available in Slackware 15?
I get this following error
Traceback (most recent call last):
File “/usr/bin/calibre”, line 20, in
from calibre.gui_launch import calibre
File “/usr/lib64/calibre/calibre/__init__.py”, line 22, in
initialize_calibre()
File “/usr/lib64/calibre/calibre/startup.py”, line 124, in initialize_calibre
from calibre.utils.icu import title_case, lower as icu_lower, upper as icu_upper
File “/usr/lib64/calibre/calibre/utils/icu.py”, line 13, in
from calibre_extensions import icu as _icu
ImportError: libicudata.so.69: cannot open shared object file: No such file or directory
I am running slackware current with mate-desktop. Is there any dependency for this package ?
What version of calibre do you have installed and what was the download URL?
I installed through slackpkg+.
Package: calibre-6.11.0-x86_64-1alien
Repository: alienbob
Path: ./calibre/calibre-6.11.0-x86_64-1alien.txz
Url: https://slackware.nl/people/alien/sbrepos/15.0/x86_64/calibre/calibre-6.11.0-x86_64-1alien.txz
You run Slackware -current but installed the calibre package from the 15.0 repository which is linked against the icu4c found in Slackware (69.1). You need the package found at https://slackware.nl/people/alien/sbrepos/current/x86_64/calibre/ instead. That one links against icu4c 72.1.
Hint: you need to fix /etc/slackpkg/slackpkgplus.conf
Thanks it worked.
A;ways a good idea to keep icu4c-compat installed and updated on -current.
And boost-compat and poppler-compat as well.