Sigil-Ebook / Sigil

Sigil is a multi-platform EPUB ebook editor
GNU General Public License v3.0
5.96k stars 578 forks source link

Link to and the building instructions for Linux should be supplemented to Qt6 / Debian-based #731

Closed SteffenBauer closed 1 year ago

SteffenBauer commented 1 year ago

Bug Description

I build Sigil on my Debian laptop from source every time a new version is released. When 2.0.2 was released, cmake failed in my first attempts this time, while for 2.0.1 and lower cmake worked perfectly. See the attached error message.

Turned out that the build instruction as provided here are still written for Qt5, which seems now outdated for Debian 12.

There are building instruction for Qt6 on Linux here, but these are for Arch Linux and the package names there to install are not applicable to Debian-based systems.

To compile Sigil 2.0.2, I had to install the following libraries:

qt6-tools-dev
qt6-tools-dev-tools
qt6-webengine-dev
qt6-base-dev
qt6-5compat-dev
qt6-svg-dev

via sudo apt-get install

The links to building instructions on the front README.md and on the building instructions for Linux should be supplemented accordingly; or at least on the front README.md it should be made more clear that there are also instructions available for Qt6 on Linux.

Platform (OS)

Linux

OS Version / Specifics

Debian 12.2

What version of Sigil are you using?

2.0.2

Any backtraces or crash reports

CMake Error at src/qt6sigil.cmake:27 (find_package):
  By not providing "FindQt6.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Qt6", but
  CMake did not find one.

  Could not find a package configuration file provided by "Qt6" (requested
  version 6.2) with any of the following names:

    Qt6Config.cmake
    qt6-config.cmake

  Add the installation prefix of "Qt6" to CMAKE_PREFIX_PATH or set "Qt6_DIR"
  to a directory containing one of the above files.  If "Qt6" provides a
  separate development package or SDK, be sure it has been installed.
Call Stack (most recent call first):
  src/CMakeLists.txt:685 (include)

-- Configuring incomplete, errors occurred!
dougmassay commented 1 year ago

I will update the front README to include the Qt6 documentation (Qt6 is now the default cmake build as of 2.0.2), but I don't build Sigil on debian-based Linux any more (haven't done so for many years), so there probably won't be any debian/ubuntu specific instructions forthcoming for Qt6 builds (much like there were no Arch-specific instructions for Qt5 builds before we switched to Qt6). Thanks for sharing your concerns. If I can, I will at least try to make note of the naming convention changes for Qt6 package dependencies on Debian.

If someone were to contribute detailed build instructions for other Linux distros, I would happily include them. But I fear I wouldn't be able to maintain them all as they inevitably change.

dougmassay commented 1 year ago

Just as an FYI: while moving to building with Qt6 is highly recommended (especially where newer Qt6 packages are available from distro repos), continuing to build the latest releases of Sigil with Qt5 will still be possible for a while yet. Just pass the -DUSE_QT5=1 directive to cmake when doing the initial configuring. Much like how -DUSE_QT6=1 was available when building with Qt5 was still the cmake default.