Bug 199129 - xmp_sdk/common/LargeFileAccess.cpp: size of array ‘check_off_t_size’ is negative
Summary: xmp_sdk/common/LargeFileAccess.cpp: size of array ‘check_off_t_size’ is negative
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Plugin-Bqm-DngConverter (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-06 11:19 UTC by Friedrich W. H. Kossebau
Modified: 2018-03-23 11:30 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 0.5.0


Attachments
Patch from Angelo Naselli to fix broken XMP SDK compilation under 64 bits computer (2.45 KB, patch)
2009-07-06 14:44 UTC, caulier.gilles
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Friedrich W. H. Kossebau 2009-07-06 11:19:56 UTC
Version:            (using Devel)
Compiler:          gcc (SUSE Linux) 4.3.2 [gcc-4_3-branch revision 141291]
OS:                Linux
Installed from:    Compiled sources

Compiling kipi-plugins of r992095 stops at the given file with the given error. Looking at the source this signals that off_t is not 64 bits wide.
I am on a 32-bit CPU (Pentium M), might this be the reason?
Comment 1 Friedrich W. H. Kossebau 2009-07-06 11:22:11 UTC
Title of the report seems to be limited in size, so here the complete compiler log:

/home/koder/Kode/kdesvn/trunk/extragear/graphics/kipi-plugins/dngconverter/dngwriter/extra/xmp_sdk/common/LargeFileAccess.cpp:525: error: size of array ‘check_off_t_size’ is negative
Comment 2 Nicolas L. 2009-07-06 11:23:11 UTC
confirming this on my 32bit mandriva
Comment 3 caulier.gilles 2009-07-06 11:32:29 UTC
This code is XMP SDK from Adobe. files source code are copied as well from original tarball provided by Adobe :

http://www.adobe.com/devnet/xmp/sdk/eula.html

I just update code from 2007 release to 2008 release.

Andreas, with old code (2007) of XMP sdk included in Exiv2 core, are you fixed something like that, based on exempi work:

http://libopenraw.freedesktop.org/wiki/Exempi

Gilles
Comment 4 Andreas Huggel 2009-07-06 11:51:21 UTC
The Exiv2 version of XMP-SDK doesn't have this particular file. Either it was added in the new release (Exiv2 still uses the old release) or I didn't copy it from the XMP SDK (Exiv2 only uses the Core part, not the Files part of the XMP SDK). Besides, yes, I did port some fixes from Exempi. See the repository for details: http://dev.exiv2.org/repositories/browse/exiv2/trunk/xmpsdk

Andreas
Comment 5 caulier.gilles 2009-07-06 14:44:21 UTC
Created attachment 35095 [details]
Patch from Angelo Naselli to fix broken XMP SDK compilation under 64 bits computer

Friedrich,

Please test this patch on your computer...

Gilles Caulier
Comment 6 Nicolas L. 2009-07-06 15:27:56 UTC
i am trying this patch on a 64bit host and it builds OK
Comment 7 Friedrich W. H. Kossebau 2009-07-06 15:50:01 UTC
Hi Gilles,

(In reply to comment #5)
> Created an attachment (id=35095) [details]
> Patch from Angelo Naselli to fix broken XMP SDK compilation under 64 bits
> computer
> 
> Friedrich,
> 
> Please test this patch on your computer...

Nope, no change.
The line in question is
	static char check_off_t_size [ (sizeof(off_t) == 8) ? 1 : -1 ];
and it might only be solvable if off_t is 8 byte long. No idea where off_t comes from. A first glance at the websearch result on off_t hints that anticipations about the size of off_t is a real problem. :(
Comment 8 Nicolas L. 2009-07-06 15:55:57 UTC
of course that doesn't change anything on 32 bit.

i searched and 
on 32bit sizeof(off_t) == 4
on 64bit sizeof(off_t) == 8
Comment 9 Andreas Huggel 2009-07-06 16:11:39 UTC
Gilles,

Can you simply remove the file?

From a quick look it seems that only the XMPFiles component needs this stuff. So if your converter doesn't use that, you may get away without compiling this.

Andreas
Comment 10 caulier.gilles 2009-07-06 17:43:53 UTC
SVN commit 992321 by cgilles:

With DNG converter, this file can be dropped from XMP sdk
CCBUGS: 199129


 M  +0 -2      CMakeLists.txt  
 D             dngwriter/extra/xmp_sdk/common/LargeFileAccess.cpp  
 D             dngwriter/extra/xmp_sdk/common/LargeFileAccess.hpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=992321
Comment 11 caulier.gilles 2009-07-06 17:45:49 UTC
Thanks Andreas. Yes these files can be removed.

Nicolas, Friedrich, can you try again with current implementation from trunk ?

Gilles Caulier
Comment 12 Friedrich W. H. Kossebau 2009-07-06 18:44:06 UTC
Yes, 992331 now compiles for me. :)

BTW: Thanks for Digikam, I am discovering this program only now, and am really satisfied!
Comment 13 Nicolas L. 2009-07-06 21:28:17 UTC
perfect for me too