Bug 350915 - digiKam fails to compile with jpeg-9a [patch]
Summary: digiKam fails to compile with jpeg-9a [patch]
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Portability-Compilation (show other bugs)
Version: 4.11.0
Platform: Exherbo Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-03 11:09 UTC by Timo Gurr
Modified: 2022-01-02 13:11 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 7.5.0
Sentry Crash Report:


Attachments
digikam-4.11.0-jpeg9.patch (1.31 KB, patch)
2015-08-03 11:11 UTC, Timo Gurr
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Timo Gurr 2015-08-03 11:09:57 UTC
Despite having a codepath for jpeg9 located at core/libs/jpegutils/libjpeg-91 digikam fails with the following error when trying to build with jpeg-9a:

[...]
Found JPEG: /usr/lib/libjpeg.so
[...]

/var/tmp/paludis/build/graphics-digikam-4.11.0/work/digikam-4.11.0/core/libs/dimg/loaders/jpegloader.cpp: In member function 'virtual bool Digikam::JPEGLoader::load(const QString&, Digikam::DImgLoaderObserver*)':
/var/tmp/paludis/build/graphics-digikam-4.11.0/work/digikam-4.11.0/core/libs/dimg/loaders/jpegloader.cpp:253:34: error: cannot convert 'bool' to 'boolean' for argument '2' to 'int jpeg_read_header(j_decompress_ptr, boolean)'
     jpeg_read_header(&cinfo, true);
                                  ^
/var/tmp/paludis/build/graphics-digikam-4.11.0/work/digikam-4.11.0/core/libs/dimg/loaders/jpegloader.cpp:303:35: error: cannot convert 'bool' to 'boolean' in assignment
         cinfo.do_fancy_upsampling = false;
                                   ^
/var/tmp/paludis/build/graphics-digikam-4.11.0/work/digikam-4.11.0/core/libs/dimg/loaders/jpegloader.cpp:304:35: error: cannot convert 'bool' to 'boolean' in assignment
         cinfo.do_block_smoothing  = false;
                                   ^
/var/tmp/paludis/build/graphics-digikam-4.11.0/work/digikam-4.11.0/core/libs/dimg/loaders/jpegloader.cpp: In member function 'virtual bool Digikam::JPEGLoader::save(const QString&, Digikam::DImgLoaderObserver*)':
/var/tmp/paludis/build/graphics-digikam-4.11.0/work/digikam-4.11.0/core/libs/dimg/loaders/jpegloader.cpp:787:43: error: cannot convert 'bool' to 'boolean' for argument '3' to 'void jpeg_set_quality(j_compress_ptr, int, boolean)'
     jpeg_set_quality(&cinfo, quality, true);
                                           ^
/var/tmp/paludis/build/graphics-digikam-4.11.0/work/digikam-4.11.0/core/libs/dimg/loaders/jpegloader.cpp:788:37: error: cannot convert 'bool' to 'boolean' for argument '2' to 'void jpeg_start_compress(j_compress_ptr, boolean)'
     jpeg_start_compress(&cinfo, true);
                                     ^

Attached patch makes digikam-4.11.0 compile fine and a basic test adding jpegs to a new album and displaying them worked.

Note: For getting kipi-plugins to compile with jpeg-9a I had to apply a second patch: https://git.reviewboard.kde.org/r/123886/

Reproducible: Always
Comment 1 Timo Gurr 2015-08-03 11:11:31 UTC
Created attachment 93862 [details]
digikam-4.11.0-jpeg9.patch
Comment 2 caulier.gilles 2015-08-06 08:22:37 UTC
Git commit b2bd2dc6440d70f4a79c0c8a1ed61350e00c518b by Gilles Caulier.
Committed on 06/08/2015 at 08:21.
Pushed by cgilles into branch 'master'.

apply patch #93862 from Timo Gurr to fix compilation with jpeg 9a
FIXED-IN : 4.13.0

M  +2    -1    NEWS
M  +5    -5    libs/dimg/loaders/jpegloader.cpp

http://commits.kde.org/digikam/b2bd2dc6440d70f4a79c0c8a1ed61350e00c518b
Comment 3 caulier.gilles 2015-08-06 08:26:06 UTC
Git commit 10ddbc7afa500499e5d6d6449e488fc611b9c7d3 by Gilles Caulier.
Committed on 06/08/2015 at 08:25.
Pushed by cgilles into branch 'frameworks'.

backport commit #b2bd2dc6440d70f4a79c0c8a1ed61350e00c518b from git/master to frameworks branch

M  +5    -5    libs/dimg/loaders/jpegloader.cpp

http://commits.kde.org/digikam/10ddbc7afa500499e5d6d6449e488fc611b9c7d3