Lymphatus / caesium-image-compressor

Caesium is an image compression software that helps you store, send and share digital pictures, supporting JPG, PNG, WebP and TIFF formats. You can quickly reduce the file size (and resolution, if you want) by preserving the overall quality of the image.
https://saerasoft.com/caesium
GNU General Public License v3.0
3.47k stars 209 forks source link

Build failure in 2.4.1 #214

Closed GaryElshaw closed 1 year ago

GaryElshaw commented 1 year ago

Build failure in main.cpp.o

Caesium Image Compressor 2.4.1

OS: Manjaro Version: Linux 6.2.16-2-MANJARO

Steps to reproduce the behavior:

  1. Follow build instructions

Application Log Build output: caesium.txt

Lymphatus commented 1 year ago

Which Qt version are you using? Caesium v2.4.1 works on Qt 6.5.x.

colorScheme is new to Qt 6.5, so that might be the issue. /home/gary/Downloads/caesium-image-compressor-2.4.1/src/main.cpp:34:41: error: ‘class QStyleHints’ has no member named ‘colorScheme’

GaryElshaw commented 1 year ago

It's a bit weird, eh? I'm using qt6-base-6.5.0-3

Lymphatus commented 1 year ago

My guess is that some components of the Qt Framework are missing from that package, but it's hard to tell which. From my experience with compiling the project in Manjaro, I ended up using the Qt Installer from their website instead of pacman. I think that might solve the issue.

PS: also remember to install Qt ImageFormats plugin

GaryElshaw commented 1 year ago

I double-checked ImageFormats was there; and decided to use the qt online installer. Still seeing the same error, but as an aside, also noted this.

cmake --build build_dir --config Release --target caesium_image_compressor -- GLOB mismatch! CMake Warning (dev) at /usr/share/cmake/Modules/GNUInstallDirs.cmake:243 (message): Unable to determine default CMAKE_INSTALL_LIBDIR directory because no target architecture is known. Please enable at least one language before including GNUInstallDirs. Call Stack (most recent call first): CMakeLists.txt:18 (include) This warning is for project developers. Use -Wno-dev to suppress it.

Lymphatus commented 1 year ago

It happened to me when the CMAKE_PREFIX_PATH was still pointing to the old Qt version. Can it be your case?

GaryElshaw commented 1 year ago

This is the path i've been using: -DCMAKE_PREFIX_PATH=/usr/include/qt6

Lymphatus commented 1 year ago

My guess, but it's probably the one of the pacman install. The Qt installer usually installs all the files in the home directory, if you don't change it of course.