Bug 311936 - FindKdcraw.cmake is outdated and causes digiKam to fail building
Summary: FindKdcraw.cmake is outdated and causes digiKam to fail building
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Portability-Cmake (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-19 14:21 UTC by S. Burmeister
Modified: 2022-01-31 16:34 UTC (History)
10 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.0.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description S. Burmeister 2012-12-19 14:21:05 UTC
If one tries to compile digikam against KDE 4.10 it fails because the cmake file used does not provide enough info for digikam to be happy, e.g. the version of libkdcraw.

A working cmake file is part of libkdcraw since a year now but digikam devs did not feel like pushing it to kdelibs/updating the one provided by kdelibs. Instead they recommend to compile digikam with private libs, i.e. not using the libs coming with KDE 4.10.

This commit makes digikam fail with the cmake file from kdelibs:
https://projects.kde.org/projects/extragear/graphics/digikam/repository/revisions/bd02b4969e00b0daa937712c8f14ab52b70320e4/diff

This is the proposed fix from the digikam devs:
https://projects.kde.org/projects/extragear/graphics/digikam/digikam-software-compilation/repository/revisions/4af38fdb2d818029b98090b552f9507c17a4ccb2/diff

Reproducible: Always
Comment 1 S. Burmeister 2012-12-19 14:22:30 UTC
I know this is a digikam issue but since they did not feel like changing anything for a year and not even now that they were asked, it seems more useful to ping kdelibs people to pull the change instead of relying on digikam folks to push it.
Comment 2 Christoph Feck 2012-12-19 15:55:17 UTC
See also bug 307213.
Comment 3 Rex Dieter 2012-12-19 16:02:47 UTC
I can't reproduce this, builds fine for me (the same cannot be said of libkipi issue bug #307213)

Mind posting what errors/problems you encounter?
Comment 4 S. Burmeister 2012-12-20 11:38:44 UTC
You have to explicitely switch off building private/local libs and use current git, i.e. the digikam-software-collection.

[  241s] -- Found automoc4: /usr/bin/automoc4
[  241s] -- Local kdegraphics libraries will be compiled... NO
[  241s] -- Handbooks will be compiled..................... YES
[  241s] -- Extract translations files..................... NO
[  241s] -- Translations will be compiled.................. YES

[  242s] -- Check Kdcraw library in local sub-folder...
[  242s] -- Check Kdcraw library using pkg-config...
[  242s] -- WARNING: you are using the obsolete 'PKGCONFIG' macro, use FindPkgConfig
[  242s] -- Found libkdcraw release >= 0.2.0
[  242s] -- Found libkdcraw: /usr/lib/libkdcraw.so
[  242s] CMake Warning at extra/kipi-plugins/CMakeLists.txt:145 (MESSAGE):
[  242s]   libkdcraw: Version information not found, your version is probably too old.

[  244s] -- ----------------------------------------------------------------------------------
[  244s] --  kipi-plugins 3.0.0-rc dependencies results   <http://www.digikam.org>
[  244s] -- 
[  244s] --  libjpeg library found.................... YES
[  244s] --  libtiff library found.................... YES
[  244s] --  libpng library found..................... YES
[  244s] --  libkipi library found.................... YES
[  244s] --  libkexiv2 library found.................. YES
[  244s] --  libkdcraw library found.................. NO
[  244s] -- 
[  244s] CMake Error at extra/kipi-plugins/CMakeLists.txt:88 (MESSAGE):
[  244s]    kipi-plugins needs libkdcraw. You need to install the libkdcraw (version >= 2.2.0) library development package.
[  244s] Call Stack (most recent call first):
[  244s]   extra/kipi-plugins/CMakeLists.txt:239 (PRINT_LIBRARY_STATUS)
Comment 5 Rex Dieter 2012-12-20 14:51:22 UTC
And, counter-example,
http://kojipkgs.fedoraproject.org//packages/digikam/3.0.0/0.11.beta3.fc19/data/logs/i686/build.log

building digikam-3.0.0-beta3 against kde-4.9.90,

-- Check Kdcraw library in local sub-folder...
-- Check Kdcraw library using pkg-config...
-- WARNING: you are using the obsolete 'PKGCONFIG' macro, use FindPkgConfig
-- Found libkdcraw release >= 0.2.0
-- Found libkdcraw: /usr/lib/libkdcraw.so
CMake Warning at extra/kipi-plugins/CMakeLists.txt:140 (MESSAGE):
  libkdcraw: Version information not found, your version is probably too old.
...
--  libkdcraw library found.................. YES
...

and build continues to completion for me.
Comment 6 S. Burmeister 2012-12-20 18:11:27 UTC
Is that beta3 or today's git checkout?
Comment 7 Rex Dieter 2012-12-20 18:16:14 UTC
beta3
Comment 9 Rex Dieter 2012-12-20 19:19:49 UTC
OK, looks like the "fix" for bug #311310 indeed causes this regressed behavior
Comment 10 caulier.gilles 2012-12-27 18:35:57 UTC
Sound like this entry have been fixed with bug #311310

Please confirm. Fix have been applied to next digiKam 3.0.0-RC

Gilles Caulier
Comment 11 S. Burmeister 2012-12-28 14:17:08 UTC
Nope.

That bug(In reply to comment #10)
> Sound like this entry have been fixed with bug #311310
> 
> Please confirm. Fix have been applied to next digiKam 3.0.0-RC

No. That bug lists a "fix" from the 18. whereas this bug still fails with a git checkout from the 20. In fact bug #311310 causes the regression.

This bug is fixed if digikam compiles with KDE SC 4.10 and without compiling local graphics libs.
Comment 12 Andreas K. Huettel 2012-12-28 20:32:15 UTC
FYI Pino Toscano has updated the module in kdelibs KDE/4.10 branch and master (commits b0586b0e10c7e3bd9dcf3abc17c3974106a5bf1b and f89f934b2d895631725a086376cb555e8707a0be)
Comment 13 Andreas K. Huettel 2012-12-28 20:33:06 UTC
I guess this can be resolved?
Comment 14 Pino Toscano 2012-12-28 20:46:29 UTC
(In reply to comment #13)
> I guess this can be resolved?

You can consider that, until the next time Gilles will make changes to the (uninstalled) version of FindKdcraw.cmake shipped in the libkdcraw sources, and make digikam rely on such changes.

Really: the proper way to fix this Find*.cmake madness is just to have libkdcraw and the other libraries (libkipi, libkexiv2, libmediawiki, libkgeomap, libkface, libksane, libvkontakte) ship and install a *Config.cmake (e.g. KdcrawConfig.cmake) providing the own installation path, include dirs, full library/ies path, version, etc. An installed *Config.cmake file has always priority on a Find*.cmake, so having the libraries above mentioned switching to those would mean
a) no more need to carry Find*.cmake around
b) proper providing of own data, with no need to edit anything out of the library itself

Gilles, there are various examples in KDE's code about providing such cmake configuration files instead of Find*.cmake, and you can always ask for help in the build system mailing list: kde-buildsystem@kde.org.
Please fix this libraries mess, thanks.
Comment 15 Michael Pyne 2012-12-28 21:51:08 UTC
Not to pile on, but the corresponding libkipi bug to this one (bug 307213) has example code to generate and install a *Config.cmake file which could probably be easily adapted. I just checked and I forgot to actually include the corresponding .cmake.in file in my patch but I'll fix that up now for posterity.
Comment 16 Rex Dieter 2014-03-11 14:21:01 UTC
Marking fixed per comment #13 comment #14, no point in leaving this to linger...