Bug 411429 - Dimg test doesn't compile with latest imagemagick
Summary: Dimg test doesn't compile with latest imagemagick
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Plugin-DImg-Magick (other bugs)
Version First Reported In: 6.2.0
Platform: Gentoo Packages Linux
: NOR critical
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-29 17:36 UTC by Siu Chung (Clement) Cheung
Modified: 2020-05-03 11:17 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 6.3.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Siu Chung (Clement) Cheung 2019-08-29 17:36:28 UTC
SUMMARY
Doesn't compile with latest imagemagick

STEPS TO REPRODUCE
1. emerge digikam

OBSERVED RESULT
/var/tmp/portage/media-gfx/digikam-6.2.0/work/digikam-6.2.0/core/tests/dimg/magi
ckloader.cpp: In function ‘int main(int, char**)’:
/var/tmp/portage/media-gfx/digikam-6.2.0/work/digikam-6.2.0/core/tests/dimg/magi
ckloader.cpp:142:45: error: ‘const MagickInfo’ {aka ‘const struct MagickCore::_M
agickInfo’} has no member named ‘module’; did you mean ‘_module’?
         QString module = QLatin1String(inf->module);
                                             ^~~~~~
                                             _module

EXPECTED RESULT
Compiles

SOFTWARE/OS VERSIONS
Operating System: Gentoo Linux 
KDE Plasma Version: 5.16.4
KDE Frameworks Version: 5.61.0
Qt Version: 5.12.4
Kernel Version: 4.19.66-gentoo
OS Type: 64-bit
Processors: 4 × Intel® Core™ i5-2500K CPU @ 3.30GHz
Memory: 15.6 GiB of RAM

media-gfx/imagemagick-7.0.8.60

ADDITIONAL INFORMATION

Caused by this commit:
https://github.com/ImageMagick/ImageMagick/commit/3175621ed5442e8f353e0f9db1da5a7bfb07b928

Problem on our side still in latest master:
https://invent.kde.org/kde/digikam/blob/master/core/tests/dimg/magickloader.cpp#L142

We could just rename module to magick_module but then it won't compile with older imagemagick. Might need some macro trickery to support both new and old.
Comment 1 Maik Qualmann 2019-08-29 20:37:32 UTC
Git commit 930161ae62846c22fe5874cd243250ea932d23c9 by Maik Qualmann.
Committed on 29/08/2019 at 20:36.
Pushed by mqualmann into branch 'master'.

disable compiling ImageMagick test modul until version 7.0.9

M  +1    -1    core/tests/dimg/CMakeLists.txt
M  +5    -0    core/tests/dimg/magickloader.cpp

https://invent.kde.org/kde/digikam/commit/930161ae62846c22fe5874cd243250ea932d23c9
Comment 2 Maik Qualmann 2019-08-30 06:10:23 UTC
Git commit da3d14bcc3b10618c86d39050260dfb6c762a304 by Maik Qualmann.
Committed on 30/08/2019 at 06:09.
Pushed by mqualmann into branch 'master'.

do not compile the ImageMagick test module for version 7.0.8
FIXED-IN: 6.3.0

M  +2    -1    NEWS
M  +3    -1    core/tests/dimg/CMakeLists.txt
M  +3    -3    core/tests/dimg/magickloader.cpp

https://invent.kde.org/kde/digikam/commit/da3d14bcc3b10618c86d39050260dfb6c762a304
Comment 3 Andreas Sturmlechner 2019-08-30 07:36:23 UTC
See also downstream patch: https://bugs.gentoo.org/692326
Comment 4 Maik Qualmann 2019-08-30 10:22:41 UTC
Git commit 65ed73b01947f936e46bc6042691774072d31b5f by Maik Qualmann.
Committed on 30/08/2019 at 10:21.
Pushed by mqualmann into branch 'master'.

check if defined magick_module

M  +1    -3    core/tests/dimg/CMakeLists.txt
M  +3    -3    core/tests/dimg/magickloader.cpp

https://invent.kde.org/kde/digikam/commit/65ed73b01947f936e46bc6042691774072d31b5f
Comment 5 Maik Qualmann 2019-08-30 10:23:41 UTC
Thanks Andreas, for the hint.

Maik
Comment 6 caulier.gilles 2019-09-11 05:31:06 UTC
Maik, 

Under Mageia6, i seen this compilation error now :

[ 77%] Linking CXX executable showfoto
/mnt/data/GIT/6.x/core/tests/dimg/magickloader.cpp: In function ‘int main(int, char**)’:
/mnt/data/GIT/6.x/core/tests/dimg/magickloader.cpp:145:43: error: ‘const MagickInfo {aka const struct MagickCore::_MagickInfo}’ has no member named ‘module’
         QString mod  = QLatin1String(inf->module);
                                           ^

Installed ImageMagick is standard package version 6.9.10.62

Gilles
Comment 7 caulier.gilles 2019-09-11 05:38:53 UTC
Git commit 57803d3a7abc793d3a62460e00abd777e3d13db2 by Gilles Caulier.
Committed on 11/09/2019 at 05:37.
Pushed by cgilles into branch 'master'.

This check can be done with IM version 6.9, at least. This fix broken compilation under Mageia6 using IM 6.9.10.62

M  +1    -1    core/tests/dimg/magickloader.cpp

https://invent.kde.org/kde/digikam/commit/57803d3a7abc793d3a62460e00abd777e3d13db2