My thoughts on Slackware, life and everything

Calibre 5.x available for Slackware 15.0 and -current (finally)

Finally! I have a working package for Calibre 5.38.0, targeting Slackware 15.0 and -current.

As you surely know by now, Calibre is an e-book library management program, probably the best you can get and it surpasses its commercial rivals in terms of feature set and ease of use.

Calibre is not only a library manager, it can act as a content server to make your book library accessible online (on your phone and in web browsers for instance), and it also contains a Qt5-based e-book reader application, as well as a full-fledged e-book editor. If you have online magazine or newspaper subscriptions, Calibre can download these magazines automatically for you and add them to your library.

It is also quite the complex piece of software. It is written in Python, using several modules to enable its features. Calibre creates its graphical user interface using PyQt5 widget libraries. My calibre package for Slackware embeds all these modules, so that the package does not have any external dependencies. It does expect a full Slackware installation however, because that includes Qt5, PyQt5 and related packages. You could slim down your Slackware as long as you keep Qt5 related packages installed.

It took a long time to upgrade my Calibre 4.x package to 5.x, the first release in the 5.x series was on 25 September 2020. The reason is that the developer, Kovid Goyal, switched Calibre from Python 2 to Python3 and that influenced many of the Python modules that are used by the program. I had decided to wait for a Slackware 15.0 release to start working on the calibre.SlackBuild… but then that Slackware 15.0 release got delayed, and delayed, and… I could finally free up some of my time to actually do this, last week.

So here it is: Calibre 5.38.0, get it from my repository or any mirror (like my own US mirror)!

Note that you should either install my calibre4 package, or calibre (now at 5.x) but do not install both at the same time! Their files overlap.

Another note: on 32bit Slackware 15.0 and -current, all Chromium based programs will crash with a seccomp error. This is caused by the changes in glibc with regard to secure computing (seccomp), and the affected versions of glibc can be found in Slackware 15.0 and newer. The Chromium developers have been unable to update their sourcecode to make this work on 32bit Operating Systems. As a result, for instance Falkon on 32bit Slackware 15.0 and newer will crash immediately on startup.
The workaround is to disable the seccomp filter sandbox for your 32bit OS. This is achieved without much effort, you have to make an environment variable available after login: QTWEBENGINE_CHROMIUM_FLAGS needs to be set to “--disable-seccomp-filter-sandbox“.

For bash-compatible shells you would do as follows:

# echo "export QTWEBENGINE_CHROMIUM_FLAGS='--disable-seccomp-filter-sandbox'" > /etc/profile.d/chromium_seccomp.sh
# chmod +x /etc/profile.d/chromium_seccomp.sh

And after logging in again, you should find that calibre works also on 32bit Slackware.

Addendum: even the screenreader 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. Unfortunately the configuration button does not work there, but if you don’t like the default espeak voice you can manually pick one of the available alternatives by editing the file “/usr/lib64/calibre/etc/speech-dispatcher/speechd.conf” (on 32bit Slackware the libdir is ‘lib‘ of course).

Have fun! Eric

25 Comments

  1. mdkdio

    Thank you Eric!!
    Much appreciated.
    Just tested, works like a charm 🙂 (15.0 64-bit)

  2. Tom

    Thanks Eric. I’m running slack64-current with all available updates. I installed Calibre-5 but when I try to start it from the command line I get –

    $ calibre
    /usr/lib64/calibre/python3: symbol lookup error: /usr/lib64/calibre/lib/libQt5XcbQpa.so.5: undefined symbol: _ZN22QWindowSystemInterface24setPlatformFiltersEventsEb, version Qt_5_PRIVATE_API

    • alienbob

      I think you have installed my new calibre package on top of another one instead of removing/upgrading. That file “/usr/lib64/calibre/lib/libQt5XcbQpa.so.5” is not part of my new package, but it was part of the old calibre 4.x package from 2020.
      Check your installation carefully and remove old stuff.

      • Tom

        Thanks Eric. That fixed the problem. I had removed the previous 4.x version but looking in /usr/lib64 show a calibre directory still present. Used removepkg to clear out remnants and noticed there was still a calibre directory in /usr/lib64. Deleted that, reinstalled your new package and everything works now. Sorry for the bother and thanks for your work.

  3. Lovecraftesque

    I had version 3.48.0 in my Slackware64 15.0, which I upgraded to version 5.38.0 with upgradepkg calibre-5.38.0-x86_64-1alien.txz. The upgrade process works as expected, but when I invoke calibre from the CL this is what I get:

    $ calibre
    qt.glx: qglx_findConfig: Failed to finding matching FBConfig for QSurfaceFormat(version 2.0, options QFlags(), depthBufferSize -1, redBufferSize 1, greenBufferSize 1, blueBufferSize 1, alphaBufferSize -1, stencilBufferSize -1, samples -1, swapBehavior QSurfaceFormat::SingleBuffer, swapInterval 1, colorSpace QSurfaceFormat::DefaultColorSpace, profile QSurfaceFormat::NoProfile)
    qt.glx: qglx_findConfig: Failed to finding matching FBConfig for QSurfaceFormat(version 2.0, options QFlags(), depthBufferSize -1, redBufferSize 1, greenBufferSize 1, blueBufferSize 1, alphaBufferSize -1, stencilBufferSize -1, samples -1, swapBehavior QSurfaceFormat::SingleBuffer, swapInterval 1, colorSpace QSurfaceFormat::DefaultColorSpace, profile QSurfaceFormat::NoProfile)
    Could not initialize GLX
    Aborted

    This happens when the output from calibre is sent to a different system (and display) – i.e. with the DISPLAY environment variable set to mydesktop:0 when invoked from a Slackware64 15.0 system that is not mydesktop. Now when I use calibre 3.48.0 instead, I get diagnostics which look very similar to the ones above – but calibre runs (correctly, as far as I can tell) in spite of them:

    $ calibre
    qt.glx: qglx_findConfig: Failed to finding matching FBConfig for QSurfaceFormat(version 2.0, options QFlags(), depthBufferSize -1, redBufferSize 1, greenBufferSize 1, blueBufferSize 1, alphaBufferSize 0, stencilBufferSize -1, samples -1, swapBehavior QSurfaceFormat::SingleBuffer, swapInterval 1, colorSpace QSurfaceFormat::DefaultColorSpace, profile QSurfaceFormat::NoProfile)
    No XVisualInfo for format QSurfaceFormat(version 2.0, options QFlags(), depthBufferSize -1, redBufferSize 1, greenBufferSize 1, blueBufferSize 1, alphaBufferSize 0, stencilBufferSize -1, samples -1, swapBehavior QSurfaceFormat::SingleBuffer, swapInterval 1, colorSpace QSurfaceFormat::DefaultColorSpace, profile QSurfaceFormat::NoProfile)
    Falling back to using screens root_visual.
    qt.glx: qglx_findConfig: Failed to finding matching FBConfig for QSurfaceFormat(version 2.0, options QFlags(), depthBufferSize -1, redBufferSize 1, greenBufferSize 1, blueBufferSize 1, alphaBufferSize -1, stencilBufferSize -1, samples -1, swapBehavior QSurfaceFormat::SingleBuffer, swapInterval 1, colorSpace QSurfaceFormat::DefaultColorSpace, profile QSurfaceFormat::NoProfile)
    No XVisualInfo for format QSurfaceFormat(version 2.0, options QFlags(), depthBufferSize -1, redBufferSize 1, greenBufferSize 1, blueBufferSize 1, alphaBufferSize -1, stencilBufferSize -1, samples -1, swapBehavior QSurfaceFormat::SingleBuffer, swapInterval 1, colorSpace QSurfaceFormat::DefaultColorSpace, profile QSurfaceFormat::NoProfile)
    Falling back to using screens root_visual.

    • alienbob

      Does exporting QT_XCB_GL_INTEGRATION=xcb_egl work?
      Otherwise, does exporting QT_XCB_GL_INTEGRATION=none work?

      If you have a Nvidia card, try instead exporting __GLX_VENDOR_LIBRARY_NAME=nvidia …
      Lots of pain is expected if you attempt to run GLX applications over remote X.

      • Lovecraftesque

        Thanks. Exporting QT_XCB_GL_INTEGRATION as xcb_egl or none works, but exporting __GLX_VENDOR_LIBRARY_NAME as nvidia does not. Interestingly, the system where I want to get the output has indeed an Nvidia card, whereas the one where calibre is running does not.

  4. KG Hammarlund

    Thanks, Eric! I’ve relied on Kovid Goyal’s install script for some time now, but uninstalled that and installed your fresh package. Works perfectly. Great achievement, much appreiated! You’ve also managed to fix the issue with the epub viewer mentioned here:
    https://bugs.launchpad.net/calibre/+bug/1963551

  5. Eduardo

    Thanks Eric!! THANKS!!
    Now we can use a great latest release with even the ebook reader working!
    I can only imagine how cumbersome building that stuff would be. I really appreciate this.

  6. metageek

    Thank you Eric! Works like a charm on Slackware64-15.0. This is one of my must-have apps in my home computer.

    metageek

  7. KG Hammarlund

    It took some time on my modest Lenovo U330p laptop, but I can report that today’s Calibre-5.39 builds just fine using your buildscript.

    • alienbob

      I need to see how closely I need to stay aligned with the bi-weekly release schedule of Calibre. Should not take long to compile here since I can use the tarball of pre-compiled Python interpreter plus modules (calibre_pythondeps* you can find in the /tmp folder after compilation) to recompile Calibre faster.

  8. Francisco

    Hi Eric.
    Congratulations and happy to hear you got this package working. Thanks for your time invested on this and for sharing with us the results.

  9. Richard Van Den Boom

    Hi, Eric. Does Calibre 5 still able to decrypt the Adobe Digital Edition epub with the appropriate plugin?
    Cheers,

    • alienbob

      You tell me Richard. How would I know… I have not tried such a thing in years. However it looks like https://github.com/noDRM/DeDRM_tools is a version of DeDRM which has been ported to Python3 to work with Calibre 5.x.

      • Richard Van Den Boom

        I upgraded to your Calibre 5 package and it does work. I just had to reinstall DeDRM with an upgrade version (7.2) compatible with version 5. Thanks a lot for the package!

  10. Janis

    Hi! Downloading The Economist I get such error\:c
    Conversion error:
    ….
    Synthesizing mastheadImage
    /usr/lib64/calibre/python3: symbol lookup error: /usr/lib64/calibre/calibre/plugins/libheadless.so: undefined symbol: FcConfigGetFonts

    • alienbob

      Yep, I see the same error. No idea though…

    • Geremia

      I was able to avert that error by specifying ” –no-default-epub-cover”

  11. Geremia

    I get this error when using ebook-convert in your calibre-5.43.0-x86_64-1alien:
    “/usr/lib64/calibre/python3: symbol lookup error: /usr/lib64/calibre/calibre/plugins/libheadless.so: undefined symbol: FcConfigGetFonts”

    • alienbob

      I noticed that the calibre developer gave his standard reply when you reported this as a bug – distro packages are not getting support.
      Are you using Slackware 15.0 or -current?

      • jay

        Hey Eric.
        I get:

        /usr/lib64/calibre/python3: symbol lookup error: /usr/lib64/calibre/calibre/plugins/libheadless.so: undefined symbol: FcPatternCreate

        conversion pdf?pdf
        Slackware64 15.0

        ldd says libheadless doesn’t link to fonconfig, so maybe this means the program is looking for the fontconfig functions in this libheadless.so.

        regards

  12. Francisco

    Hi Eric,

    Just to let you know I installed calibre. No doubt it is the best in class compared to other options.

    As of 07OCT23 there is a new 6.28.1 version. Using 6.27.0 now.

    I just wanted to thank you for your time and effort to compile and make calibre available for us.

    Regards, Francisco

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

© 2024 Alien Pastures

Theme by Anders NorenUp ↑