Bug 496148 - Build failed with : metaengine.cpp
Summary: Build failed with : metaengine.cpp
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Metadata-Engine (show other bugs)
Version: 8.5.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-11-11 20:22 UTC by pascal lacroix
Modified: 2024-11-12 11:35 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description pascal lacroix 2024-11-11 20:22:20 UTC
Build failed with : digikam/core/libs/metadataengine/engine/metaengine.cpp:296:48: error: no match for ‘operator=’ (operand types are ‘Exiv2::DataBuf’ and ‘Exiv2::DataBuf*’)
  296 |         d->iccProfileBuf() = image->iccProfile();
In file included from /usr/include/exiv2/error.hpp:35,
                 from /mnt/2c98cfab-4320-4ff2-b8d7-f2da522cc741/digikam-devel/dk-2024-11-11/digikam/core/libs/metadataengine/engine/metaengine_p.h:63,
                 from /mnt/2c98cfab-4320-4ff2-b8d7-f2da522cc741/digikam-devel/dk-2024-11-11/digikam/core/libs/metadataengine/engine/metaengine.cpp:22:
/usr/include/exiv2/types.hpp:220:18: note: candidate: ‘Exiv2::DataBuf& Exiv2::DataBuf::operator=(Exiv2::DataBuf&)’
  220 |         DataBuf& operator=(DataBuf& rhs);
      |                  ^~~~~~~~
/usr/include/exiv2/types.hpp:220:37: note:   no known conversion for argument 1 from ‘Exiv2::DataBuf*’ to ‘Exiv2::DataBuf&’
  220 |         DataBuf& operator=(DataBuf& rhs);
      |                            ~~~~~~~~~^~~
/usr/include/exiv2/types.hpp:252:18: note: candidate: ‘Exiv2::DataBuf& Exiv2::DataBuf::operator=(Exiv2::DataBufRef)’
  252 |         DataBuf& operator=(DataBufRef rhs);
      |                  ^~~~~~~~
/usr/include/exiv2/types.hpp:252:39: note:   no known conversion for argument 1 from ‘Exiv2::DataBuf*’ to ‘Exiv2::DataBufRef’
  252 |         DataBuf& operator=(DataBufRef rhs);
      |                            ~~~~~~~~~~~^~~
make[2]: *** [core/libs/metadataengine/CMakeFiles/core_dmetadata_obj.dir/build.make:96 : core/libs/metadataengine/CMakeFiles/core_dmetadata_obj.dir/engine/metaengine.cpp.o] Erreur 1
make[1]: *** [CMakeFiles/Makefile2:8983 : core/libs/metadataengine/CMakeFiles/core_dmetadata_obj.dir/all] Erreur 2
make: *** [Makefile:146 : all] Erreur 2


SYSTEM:
KDE Version 5.115.0
Qt Version 5.15.13
ThinkStation-S30 Kernel: 6.8.0-48-generic arch: x86_64
 Desktop: Cinnamon v: 6.2.9 Distro: Linux Mint 22 Wilma
Comment 1 Maik Qualmann 2024-11-11 21:31:30 UTC
You are using an Exiv2-0.27.x version, the API for iccProfile() has been changed in Exiv2-0.28.

Maik
Comment 2 Maik Qualmann 2024-11-11 21:40:43 UTC
Git commit 70730f5c9c513155d9a0a7f72f7fdbad1f2fad13 by Maik Qualmann.
Committed on 11/11/2024 at 21:39.
Pushed by mqualmann into branch 'master'.

fix compile with older Exiv2 version

M  +8    -0    core/libs/metadataengine/engine/metaengine.cpp
M  +8    -0    core/libs/metadataengine/engine/metaengine_fileio.cpp

https://invent.kde.org/graphics/digikam/-/commit/70730f5c9c513155d9a0a7f72f7fdbad1f2fad13
Comment 3 Maik Qualmann 2024-11-11 21:52:15 UTC
Git commit 023b7b27e69bfd3d2c7bf49ced7fb963033ad3f2 by Maik Qualmann.
Committed on 11/11/2024 at 21:51.
Pushed by mqualmann into branch 'master'.

polish

M  +1    -1    core/libs/metadataengine/engine/metaengine.cpp
M  +1    -1    core/libs/metadataengine/engine/metaengine_fileio.cpp

https://invent.kde.org/graphics/digikam/-/commit/023b7b27e69bfd3d2c7bf49ced7fb963033ad3f2
Comment 4 pascal lacroix 2024-11-11 22:58:43 UTC
Thanks, updated with last commits, 

build is still failed with :

metaengine_p.cpp: In member function ‘bool Digikam::MetaEngine::Private::saveUsingExiv2(const QFileInfo&, const QDateTime&, Exiv2::Image::AutoPtr) const’:
/mnt/2c98cfab-4320-4ff2-b8d7-f2da522cc741/digikam-devel/dk-2024-11-11/digikam/core/libs/metadataengine/engine/metaengine_p.cpp:313:34: error: ‘const class Exiv2::DataBuf’ has no member named ‘empty’
  313 |                 !iccProfileBuf().empty()
      |                                  ^~~~~
/mnt/2c98cfab-4320-4ff2-b8d7-f2da522cc741/digikam-devel/dk-2024-11-11/digikam/core/libs/metadataengine/engine/metaengine_p.cpp: In member function ‘bool Digikam::MetaEngine::Private::saveUsingExifTool(const QFileInfo&, const QDateTime&) const’:
/mnt/2c98cfab-4320-4ff2-b8d7-f2da522cc741/digikam-devel/dk-2024-11-11/digikam/core/libs/metadataengine/engine/metaengine_p.cpp:519:25: error: ‘const class Exiv2::DataBuf’ has no member named ‘empty’
  519 |         iccProfileBuf().empty()
      |                         ^~~~~
make[2]: *** [core/libs/metadataengine/CMakeFiles/core_dmetadata_obj.dir/build.make:110 : core/libs/metadataengine/CMakeFiles/core_dmetadata_obj.dir/engine/metaengine_p.cpp.o] Erreur 1
make[1]: *** [CMakeFiles/Makefile2:8983 : core/libs/metadataengine/CMakeFiles/core_dmetadata_obj.dir/all] Erreur 2
make: *** [Makefile:146 : all] Erreur 2
Comment 5 Maik Qualmann 2024-11-12 07:08:51 UTC
Git commit f1438463dc59cacbb64f5f44715545f12baec9ba by Maik Qualmann.
Committed on 12/11/2024 at 07:08.
Pushed by mqualmann into branch 'master'.

fix compile with older Exiv2 version #2

M  +1    -1    core/libs/metadataengine/engine/metaengine.cpp
M  +12   -1    core/libs/metadataengine/engine/metaengine_fileio.cpp
M  +20   -0    core/libs/metadataengine/engine/metaengine_p.cpp

https://invent.kde.org/graphics/digikam/-/commit/f1438463dc59cacbb64f5f44715545f12baec9ba
Comment 6 Maik Qualmann 2024-11-12 07:20:09 UTC
Git commit d7c5e92c0c75819a15568a6feea306f0648dc166 by Maik Qualmann.
Committed on 12/11/2024 at 07:19.
Pushed by mqualmann into branch 'master'.

fix compile with older Exiv2 version #3

M  +18   -0    core/libs/metadataengine/engine/metaengine_item.cpp

https://invent.kde.org/graphics/digikam/-/commit/d7c5e92c0c75819a15568a6feea306f0648dc166
Comment 7 pascal lacroix 2024-11-12 09:10:29 UTC
Thanks,
With last commits and old exiv2, it build and start nicely.
Comment 8 Maik Qualmann 2024-11-12 09:22:51 UTC
Thanks for the tests and feedback.
I had to do it "blind" because I can no longer compile it with Exiv2-0.27.x.

Maik
Comment 9 caulier.gilles 2024-11-12 09:36:23 UTC
Hi Maik, later 8.5.0, we can leave Exiv2 0.27 support in digiKam as 0.27 is not maintained by Exiv2 team and security issues are not back-ported from 0.28 to 0.27...

Gilles
Comment 10 Maik Qualmann 2024-11-12 11:35:58 UTC
Hi Gilles, yes we should increase the minimum version of Exiv2 later.

Maik