Project

General

Profile

Bug #547

exiv2 0.16 fails to compile with gcc 4.3.0

Added by Eric Sandall over 13 years ago. Updated almost 13 years ago.

Status:
Closed
Priority:
Normal
Category:
build
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

Tested on:
uname -m = x86_64
uname -r = 2.6.24.4
uname -s = Linux
uname -v = #2 SMP Mon Mar 24 20:25:29 PDT 2008

AND

uname -m = i686
uname -r = 2.6.24.3
uname -s = Linux
uname -v = #3 PREEMPT Sat Mar 8 11:10:16 PST 2008

$ gcc -dumpversion
4.3.0

$ ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --mandir=/usr/share/man --infodir=/usr/share/info --build=x86_64-pc-linux-gnu
$ make
...
g++ -march=nocona -fPIC -DPIC -pipe -DPIC -fPIC -O3 -Wall -Wcast-align -Wconversion -Wpointer-arith -Wformat-security -Wmissing-format-attribute -W -MMD -I. -DEXV_LOCALEDIR=\"/usr/share/locale\" -I../include -funsigned-char -DNDEBUG=1 -c XMPMeta-Parse.cpp -fPIC -DPIC -o .libs/XMPMeta-Parse.o
In file included from XMPMeta-GetSet.cpp:13:
XMPCore_Impl.hpp: In function 'bool IsPathPrefix(const char*, const char*)':
XMPCore_Impl.hpp:372: error: 'strlen' is not a member of 'std'
XMPCore_Impl.hpp:373: error: 'strncmp' is not a member of 'std'
XMPMeta-GetSet.cpp: In function 'XMP_CLTMatch ChooseLocalizedText(const XMP_Node*, const char*, const char*, const XMP_Node**)':
XMPMeta-GetSet.cpp:262: error: 'strlen' was not declared in this scope
XMPMeta-GetSet.cpp:268: error: 'strncmp' is not a member of 'std'
XMPMeta-GetSet.cpp:283: error: 'strncmp' is not a member of 'std'
In file included from XMPMeta-Parse.cpp:13:
XMPCore_Impl.hpp: In function 'bool IsPathPrefix(const char*, const char*)':
XMPCore_Impl.hpp:372: error: 'strlen' is not a member of 'std'
XMPCore_Impl.hpp:373: error: 'strncmp' is not a member of 'std'
XMPMeta-Parse.cpp: In function 'void RepairAltText(XMP_Node&, const char*, const char*)':
XMPMeta-Parse.cpp:639: warning: conversion to 'int' from 'long unsigned int' may alter its value
XMPMeta-Parse.cpp: In function 'void TouchUpDataModel(XMPMeta*)':
XMPMeta-Parse.cpp:735: error: 'strncmp' is not a member of 'std'
XMPMeta-Parse.cpp: In function 'int CountUTF8(const XMP_Uns8*, const XMP_Uns8*)':
XMPMeta-Parse.cpp:873: warning: conversion to 'XMP_Uns8' from 'int' may alter its value
XMPMeta-Parse.cpp:873: warning: conversion to 'XMP_Uns8' from 'int' may alter its value
XMPMeta-Parse.cpp: In function 'int CountControlEscape(const XMP_Uns8*, const XMP_Uns8*)':
XMPMeta-Parse.cpp:904: error: 'strncmp' was not declared in this scope
XMPMeta-Parse.cpp:910: warning: conversion to 'XMP_Uns8' from 'int' may alter its value
XMPMeta-Parse.cpp:913: warning: conversion to 'XMP_Uns8' from 'int' may alter its value
XMPMeta-Parse.cpp:916: warning: conversion to 'XMP_Uns8' from 'int' may alter its value
XMPMeta-Parse.cpp:921: warning: conversion to 'XMP_Uns8' from 'int' may alter its value
XMPMeta-Parse.cpp:924: warning: conversion to 'XMP_Uns8' from 'int' may alter its value
XMPMeta-Parse.cpp:927: warning: conversion to 'XMP_Uns8' from 'int' may alter its value
XMPMeta-Parse.cpp:939: warning: conversion to 'int' from 'size_t' may alter its value
XMPMeta-Parse.cpp: In function 'size_t ProcessUTF8Portion(XMLParserAdapter*, const XMP_Uns8*, size_t, bool)':
XMPMeta-Parse.cpp:1007: error: 'strlen' was not declared in this scope
XMPMeta-Parse.cpp: In member function 'void XMPMeta::ParseFromBuffer(const char*, XMP_StringLen, XMP_OptionBits)':
XMPMeta-Parse.cpp:1082: error: 'strlen' was not declared in this scope
XMPMeta-Parse.cpp:1124: error: 'memcpy' was not declared in this scope
XMPMeta-Parse.cpp:1175: error: 'memcpy' was not declared in this scope
XMPMeta-Parse.cpp:1235: error: 'memcpy' was not declared in this scope
XMPMeta-GetSet.cpp: In member function 'void XMPMeta::SetLocalizedText(const char*, const char*, const char*, const char*, const char*, XMP_OptionBits)':
XMPMeta-GetSet.cpp:900: error: 'strcmp' is not a member of 'std'
In file included from XMPMeta.cpp:13:
XMPCore_Impl.hpp: In function 'bool IsPathPrefix(const char*, const char*)':
XMPCore_Impl.hpp:372: error: 'strlen' is not a member of 'std'
XMPCore_Impl.hpp:373: error: 'strncmp' is not a member of 'std'
make1: * [XMPMeta-Parse.o] Error 1
make1:
Waiting for unfinished jobs....
make1:
[XMPMeta-GetSet.o] Error 1
XMPMeta.cpp: In function 'XMP_Status DumpStringMap(const XMP_StringMap&, const char*, XMP_Status ()(void, const char*, XMP_StringLen), void*)':
XMPMeta.cpp:107: error: 'strlen' was not declared in this scope
XMPMeta.cpp: In function 'XMP_Status DumpNodeOptions(XMP_OptionBits, XMP_Status ()(void, const char*, XMP_StringLen), void*)':
XMPMeta.cpp:177: error: 'strlen' was not declared in this scope
XMPMeta.cpp:182: error: 'strlen' was not declared in this scope
XMPMeta.cpp: In function 'XMP_Status DumpPropertyTree(const XMP_Node*, int, size_t, XMP_Status ()(void, const char*, XMP_StringLen), void*)':
XMPMeta.cpp:217: warning: format '%d' expects type 'int', but argument 4 has type 'size_t'
XMPMeta.cpp:217: warning: format '%d' expects type 'int', but argument 4 has type 'size_t'
XMPMeta.cpp:217: error: 'strlen' was not declared in this scope
XMPMeta.cpp:235: error: 'strlen' was not declared in this scope
XMPMeta.cpp:241: error: 'strlen' was not declared in this scope
XMPMeta.cpp:243: error: 'strlen' was not declared in this scope
XMPMeta.cpp:245: error: 'strlen' was not declared in this scope
XMPMeta.cpp:259: error: 'strlen' was not declared in this scope
XMPMeta.cpp:260: error: 'strlen' was not declared in this scope
XMPMeta.cpp:261: error: 'strlen' was not declared in this scope
XMPMeta.cpp:263: error: 'strlen' was not declared in this scope
XMPMeta.cpp:275: error: 'strlen' was not declared in this scope
XMPMeta.cpp:276: error: 'strlen' was not declared in this scope
XMPMeta.cpp:280: error: 'strlen' was not declared in this scope
XMPMeta.cpp:283: error: 'strlen' was not declared in this scope
XMPMeta.cpp: In static member function 'static void XMPMeta::GetVersionInfo(XMP_VersionInfo*)':
XMPMeta.cpp:454: error: 'memset' was not declared in this scope
XMPMeta.cpp: In static member function 'static bool XMPMeta::Initialize()':
XMPMeta.cpp:576: warning: unused variable 'flag'
XMPMeta.cpp: In static member function 'static XMP_Status XMPMeta::DumpNamespaces(XMP_Status ()(void, const char*, XMP_StringLen), void*)':
XMPMeta.cpp:723: error: 'strlen' was not declared in this scope
XMPMeta.cpp:731: error: 'strlen' was not declared in this scope
XMPMeta.cpp:739: error: 'strlen' was not declared in this scope
XMPMeta.cpp:751: error: 'strlen' was not declared in this scope
XMPMeta.cpp:759: error: 'strlen' was not declared in this scope
XMPMeta.cpp: In static member function 'static XMP_Status XMPMeta::DumpAliases(XMP_Status ()(void, const char*, XMP_StringLen), void*)':
XMPMeta.cpp:801: error: 'strlen' was not declared in this scope
XMPMeta.cpp:817: error: 'strlen' was not declared in this scope
XMPMeta.cpp:821: error: 'strlen' was not declared in this scope
XMPMeta.cpp:822: error: 'strlen' was not declared in this scope
XMPMeta.cpp:825: error: 'strlen' was not declared in this scope
XMPMeta.cpp: In static member function 'static void XMPMeta::RegisterStandardAliases(const char*)':
XMPMeta.cpp:1218: error: 'strcmp' is not a member of 'std'
XMPMeta.cpp:1230: error: 'strcmp' is not a member of 'std'
XMPMeta.cpp:1241: error: 'strcmp' is not a member of 'std'
XMPMeta.cpp:1252: error: 'strcmp' is not a member of 'std'
XMPMeta.cpp:1252: error: 'strcmp' is not a member of 'std'
XMPMeta.cpp:1261: error: 'strcmp' is not a member of 'std'
XMPMeta.cpp: In member function 'XMP_Status XMPMeta::DumpObject(XMP_Status ()(void, const char*, XMP_StringLen), void*) const':
XMPMeta.cpp:1293: error: 'strlen' was not declared in this scope
XMPMeta.cpp:1305: error: 'strlen' was not declared in this scope
XMPMeta.cpp:1312: error: 'strlen' was not declared in this scope
XMPMeta.cpp:1340: error: 'strlen' was not declared in this scope
XMPMeta.cpp:1345: error: 'strlen' was not declared in this scope
make1:
[XMPMeta.o] Error 1
make1: Leaving directory `/usr/src/exiv2-0.16/xmpsdk/src'
make: *
* [xmpsdk] Error 2


Files

gcc43.patch (1.44 KB) gcc43.patch Redmine Admin, 18 Apr 2008 21:56
exiv2_r1401-1402.patch (8.87 KB) exiv2_r1401-1402.patch Redmine Admin, 12 May 2008 18:20
exiv2_r1412-1413.patch (629 Bytes) exiv2_r1412-1413.patch Redmine Admin, 12 May 2008 18:37

History

#1

Updated by Eric Sandall over 13 years ago

The attached gcc43.patch includes the missing <cstring> header in g++ 4.3.0 for strlen, memcpy, and strncmp used in the above errors.

#2

Updated by Andreas Huggel over 13 years ago

I fixed this in the trunk recently:

http://dev.robotbattle.com/cmtinfo_svn.php?r=10&l=50&v=1402

Thanks for taking the time to report this and submitting a patch anyway.

Amdreas

#3

Updated by Andreas Huggel over 13 years ago

Attached patches with the actual changes made to resolve this bug:
+ exiv2_r1401-1402.patch
+ exiv2_r1412:1413.patch

Also available in: Atom PDF