novomesk / qt-jpegxl-image-plugin

Qt plug-in to allow Qt and KDE based applications to read/write JXL images.
GNU General Public License v3.0
91 stars 8 forks source link

Build error #7

Closed master-of-zen closed 3 years ago

master-of-zen commented 3 years ago

Following building guide as for now results in this errors on plugin build


> ./build_libqjpegxl_dynamic.sh                               ~/Vault/build/qt-jpegxl-image-plugin(main)@arch
Info: creating stash file /home/zen/Vault/build/qt-jpegxl-image-plugin/.qmake.stash
g++ -c -pipe -O2 -std=c++1z -Wall -Wextra -Wvla -Wdate-time -Wshift-overflow=2 -Wduplicated-cond -Wno-stringop-overflow -Wno-format-overflow -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -D_REENTRANT -fPIC -DQT_NO_LINKED_LIST -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. -I/usr/include/qt -I/usr/include/qt/QtGui -I/usr/include/qt/QtCore -I.moc -I/usr/lib/qt/mkspecs/linux-g++ -o .obj/qjpegxlhandler.o src/qjpegxlhandler.cpp
src/qjpegxlhandler.cpp: In member function ‘virtual bool QJpegXLHandler::write(const QImage&)’:
src/qjpegxlhandler.cpp:488:9: error: ‘JxlColorEncodingSetToSRGB’ was not declared in this scope; did you mean ‘JxlColorEncoding’?
  488 |         JxlColorEncodingSetToSRGB(&color_profile, JXL_FALSE);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~
      |         JxlColorEncoding
src/qjpegxlhandler.cpp:530:17: error: ‘JxlBasicInfo’ {aka ‘struct JxlBasicInfo’} has no member named ‘num_color_channels’; did you mean ‘num_extra_channels’?
  530 |     output_info.num_color_channels = 3;
      |                 ^~~~~~~~~~~~~~~~~~
      |                 num_extra_channels
src/qjpegxlhandler.cpp:532:14: error: ‘JxlEncoderSetBasicInfo’ was not declared in this scope; did you mean ‘JxlDecoderGetBasicInfo’?
  532 |     status = JxlEncoderSetBasicInfo(encoder, &output_info);
      |              ^~~~~~~~~~~~~~~~~~~~~~
      |              JxlDecoderGetBasicInfo
src/qjpegxlhandler.cpp:540:14: error: ‘JxlEncoderSetColorEncoding’ was not declared in this scope
  540 |     status = JxlEncoderSetColorEncoding(encoder, &color_profile);
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~
make: *** [Makefile:712: .obj/qjpegxlhandler.o] Error 1
Failed to build libqjpegxl.so```
novomesk commented 3 years ago

Try latest jpeg-xl, there were some changes in encoding API.

master-of-zen commented 3 years ago

Everything is from main git repos

novomesk commented 3 years ago

The build error indicate that older headers are used somehow.

master-of-zen commented 3 years ago

How can I completely remove jpeg xl and plugin, to make clean install?

novomesk commented 3 years ago

Run find /usr | grep jxl to find out where jpeg-xl is installed.

novomesk commented 3 years ago

Perhaps you have old headers in /usr/local/include/jxl and new in /usr/include/jxl

master-of-zen commented 3 years ago

@novomesk removing everything and making clean install fixed the issue :+1: