Bug 157223

Summary: libkexiv2 doesn't compile against exiv2 0.16 due to incorrect version detection code
Product: [Developer tools] buildsystem Reporter: makosoft
Component: KDE4 (cmake)Assignee: Unassigned bugs mailing-list <unassigned-bugs>
Status: RESOLVED WORKSFORME    
Severity: normal CC: finex, mumismo
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:

Description makosoft 2008-02-05 17:57:34 UTC
Version:            (using Devel)
Installed from:    Compiled sources
Compiler:          gcc (GCC) 4.2.2 (Gentoo 4.2.2 p1.0) 
OS:                Linux

The trunk version of libkexiv2 doesn't seem to compile against exiv2 0.16:

In file included from /home/aidan/kde4/src/KDE/extragear-libs/libkexiv2/libkexiv2/kexiv2.cpp:31:
/home/aidan/kde4/src/KDE/extragear-libs/libkexiv2/libkexiv2/kexiv2private.h:90: error: redefinition of 'class Exiv2::XmpData'
/usr/include/exiv2/xmp.hpp:179: error: previous definition of 'class Exiv2::XmpData'
make[2]: *** [libkexiv2/libkexiv2/CMakeFiles/kexiv2.dir/kexiv2.o] Error 1
make[1]: *** [libkexiv2/libkexiv2/CMakeFiles/kexiv2.dir/all] Error 2
make: *** [all] Error 2
makeobj[0]: Leaving directory `/home/aidan/kde4/build/KDE/extragear-libs'

The reason for this appears to be some bad version detection code in libkexiv2/libkexiv2/kexiv2private.h which incorrectly detects 0.16 as being a version without XMP support:

// Check if Exiv2 support XMP

#if (EXIV2_MAJOR_VERSION ==0 && EXIV2_MINOR_VERSION >=15 && EXIV2_PATCH_VERSION >=99) || \
    (EXIV2_MAJOR_VERSION >0)
#   define _XMP_SUPPORT_ 1
#endif

If this is corrected to detect Exiv2 0.16 and later as having XMP support, libkexiv2 compiles again.
Comment 1 FiNeX 2008-11-19 19:48:49 UTC
What is the status now? Can you compile it using more recent versions?
Comment 2 Jordi Polo 2008-12-01 06:23:27 UTC
It works for me, anyway I sent it to the buildsystem
Comment 3 FiNeX 2008-12-20 18:48:42 UTC
Works for me too. Probably it was a temporary problem