Compilation fails with "QColorSpace: No such file or directory"
Takuyax opened this issue · 2 comments
Takuyax commented
Hi!
I'm getting an error during compilation due to something called "QColorSpace".
./build_libqjpegxl_dynamic.sh
g++ -c -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -O2 -std=c++1z -Wall -W -Wvla -Wdate-time -Wshift-overflow=2 -Wduplicated-cond -Wno-stringop-overflow -Wno-deprecated-copy -Wno-redundant-move -Wno-format-overflow -Wno-init-list-lifetime -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -D_REENTRANT -fPIC -DQT_DEPRECATED_WARNINGS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_PLUGIN -DQT_GUI_LIB -DQT_CORE_LIB -I. -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -I.moc -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -o .obj/qjpegxlhandler.o src/qjpegxlhandler.cpp
src/qjpegxlhandler.cpp:9:10: fatal error: QColorSpace: No such file or directory
9 | #include <QColorSpace>
| ^~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:373: .obj/qjpegxlhandler.o] Error 1
Failed to build libqjpegxl.so
I'm running Kubuntu 20.04.
- I compiled and installed libjxl without any errors, and cjxl+djxl work without any issues.
- I checked that the image-jxl.xml file is in the right directory, then updated the mime database.
- Couldn't find the "qt5base-dev" package, but I found and installed "qtbase5-dev", which at the time I assumed is the same.
- Then cloned the code with the --recursive option.
- When building after this, I get the above error message.
Am I missing some dependencies? Or is qtbase5-dev the wrong package after all?
Edit: I forgot to mention that I managed to compile libjxl without errors and it works without any issues.
novomesk commented
This plug-in needs at least Qt 5.14
I think that Kubuntu 20.04 has only Qt 5.12.8 so it will not work.
Takuyax commented
Alright, installing qtbase 5.14.2 did the trick. It works without any issues now.
Thanks!