Bug 308534

Summary: MetaEngine fails to build when exiv2 is built without XMP support
Product: [Applications] digikam Reporter: Jekyll Wu <adaptee>
Component: Portability-RuntimeAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: ahuggel, caulier.gilles
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
URL: https://bugs.gentoo.org/show_bug.cgi?id=437682
Latest Commit: Version Fixed In: 3.0.0
Sentry Crash Report:

Description Jekyll Wu 2012-10-17 05:34:58 UTC
[ 14%] Building CXX object libkexiv2/CMakeFiles/kexiv2.dir/kexiv2image.o
/tmp/portage/kde-base/libkexiv2-9999/work/libkexiv2-9999/libkexiv2/kexiv2_p.cpp: In member function ‘bool KExiv2Iface::KExiv2::Private::saveOperations(const QFileInfo&, Exiv2::Image::AutoPtr) const’:
/tmp/portage/kde-base/libkexiv2-9999/work/libkexiv2-9999/libkexiv2/kexiv2_p.cpp:251:43: error: ‘xmpMetadata’ was not declared in this scope

I think http://commits.kde.org/libkexiv2/0364c48d64a4f492600f94f539324b24321a3df7 is where the problem is introduced.


Reproducible: Always
Comment 1 Marcel Wiesweg 2012-10-17 16:02:50 UTC
Is there a particular reason why one would not want XMP support? I dont feel well disabling this in the library, there's more to it up to things like removing options for sidecar support in the UI. Then, I would not want to ship a digikam where XMP does not work.
Comment 2 caulier.gilles 2012-10-17 16:05:46 UTC
I know that XMP sdk from Adobe, used in Exiv2 use BSD like licence if i'm not too wrong, and some distro refuse to use it...

For me it's stupid, but... it's open source (:=))))

Gilles Caulier
Comment 3 Jekyll Wu 2012-10-17 16:25:48 UTC
well, I don't mind building exiv2 with XMP support , but that is not the main point of this report. The import thing is the code is now inconsistent with itself :

#ifdef _XMP_SUPPORT_
    Exiv2::XmpData  xmpMetadata;
#endif

#ifdef _XMP_SUPPORT_
    Exiv2::XmpData&        xmpMetadata()         { return data.data()->xmpMetadata;        }

    /**
     * Merge two XmpData packages, where the result is stored in dest
     * and fields from src take precedence over existing data from dest.
     */
    void mergeXmpData(const Exiv2::XmpData& src, Exiv2::XmpData& dest);
#endif

So either add more #ifdefs or remove those #ifdefs altogether and require XMP support in exiv2, but the current state is just not right.
Comment 4 Marcel Wiesweg 2012-10-18 20:11:59 UTC
I think Adobe did things right and used the modified/3-clause BSD license:
http://www.adobe.com/devnet/xmp/sdk/eula.html
which is fully compatible with free software:
http://www.gnu.org/licenses/license-list.html#ModifiedBSD
Comment 5 caulier.gilles 2012-10-18 21:23:26 UTC
Andreas,

Do you have any idea why XMP support need to be optional in Exiv2 for distro packagers ?

Gilles Caulier
Comment 6 Andreas Huggel 2012-10-19 00:39:31 UTC
Some people don't need all the functionality of the library and like to build only what they need. We have requirements to provide additional options to make further functions optional at compile time (http://dev.exiv2.org/issues/733) and I have recently received a patch to disable the new Video support with a compiler define for example. (One use-case I can remember is where Exiv2 is used by a camera to write Exif into the images.)

However, I'm not aware of any distro, which has a problem with the included XMP-SDK or its license. This is the first time I hear that not all Linux distros compile XMP support.

Andreas
Comment 7 caulier.gilles 2012-10-22 10:35:35 UTC
Andreas,

Look like Exiv2 test do not compile if XMP support is disabled :

-- ------------------------------------------------------------------
-- exiv2 0.23 configure results        <http://www.exiv2.org>
-- Building PNG support:               YES
-- Building shared library:            YES
-- XMP metadata support:               NO
-- Building static libxmp:             NO
-- Native language support:            YES
-- Conversion of Windows XP tags:      YES
-- Nikon lens database:                YES
-- Commercial build:                   NO
-- Build the unit tests:               YES
-- Building translations files:        YES
-- ------------------------------------------------------------------

Scanning dependencies of target geotag
[ 65%] Building CXX object samples/CMakeFiles/geotag.dir/geotag.cpp.o
Linking CXX executable ../bin/geotag
CMakeFiles/geotag.dir/geotag.cpp.o: In function `readXML(char const*, Options&)':
geotag.cpp:(.text+0xf8e): undefined reference to `XML_ParserCreate'
geotag.cpp:(.text+0xfe0): undefined reference to `XML_SetUserData'
geotag.cpp:(.text+0xffb): undefined reference to `XML_SetElementHandler'
geotag.cpp:(.text+0x100e): undefined reference to `XML_SetCharacterDataHandler'
geotag.cpp:(.text+0x10c4): undefined reference to `XML_Parse'
geotag.cpp:(.text+0x114b): undefined reference to `XML_Parse'
geotag.cpp:(.text+0x11a4): undefined reference to `XML_ParserFree'
collect2: ld returned 1 exit status
make[2]: *** [bin/geotag] Error 1
make[1]: *** [samples/CMakeFiles/geotag.dir/all] Error 2
make: *** [all] Error 2

Gilles
Comment 8 caulier.gilles 2012-10-22 12:06:23 UTC
Git commit 600f2b9e2feb2cd574d2b4f0ee3cc049bb0b85c7 by Gilles Caulier.
Committed on 22/10/2012 at 14:05.
Pushed by cgilles into branch 'master'.

compile if Exiv2 is do not support XMP
FIXED-IN: 3.0.0

M  +4    -2    libkexiv2/kexiv2_p.cpp

http://commits.kde.org/libkexiv2/600f2b9e2feb2cd574d2b4f0ee3cc049bb0b85c7