#77 closed defect (fixed)

compile failure error: uninitialized const ‘CryptoPP::g_nullNameValuePairs’ [-fpermissive]

Reported by: zooko Owned by:
Priority: major Milestone: 0.6.0
Version: 0.5.29 Keywords:
Cc: Launchpad Bug:

Description

gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I. -I/usr/include/python2.7 -c embeddedcryptopp/cryptlib.cpp -o build/temp.linux-x86_64-2.7/embeddedcryptopp/cryptlib.o -w
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
embeddedcryptopp/cryptlib.cpp:33:26: error: uninitialized const ‘CryptoPP::g_nullNameValuePairs’ [-fpermissive]
embeddedcryptopp/cryptlib.h:321:20: note: ‘const class CryptoPP::NullNameValuePairs’ has no user-provided default constructor

A little investigation makes me suspect that the reason this doesn't happen on Crypto++ trunk is due to this patch: http://bazaar.launchpad.net/~zooko/cryptopp/trunk/revision/466 . We could adopt that patch (seems like a good idea anyway) or try a more specific patch, such as the one suggested here:
http://sourceforge.net/tracker/index.php?func=detail&aid=3285703&group_id=37892&atid=421366

--- src/crypto51/cryptlib.h.old 2011-04-12 14:50:28.000000000 +0200
+++ src/crypto51/cryptlib.h 2011-04-12 14:55:34.000000000 +0200
@@ -297,6 +297,7 @@
class NullNameValuePairs : public NameValuePairs
{
public:
+ NullNameValuePairs() : NameValuePairs() {}
bool GetVoidValue(const char *name, const std::type_info &valueType, void *pValue) const {return false;}
};

Change History (5)

comment:1 Changed at 2011-12-26T19:36:14Z by zooko

Nick Murdoch reported this to the Crypto++ mailing list: http://www.mail-archive.com/cryptopp-users@googlegroups.com/msg06359.html

comment:2 Changed at 2011-12-28T08:07:58Z by zooko

This is actually probably intimately related to #44, if not an outright duplicate.

comment:3 Changed at 2012-02-17T07:00:38Z by zooko

  • Resolution set to fixed
  • Status changed from new to closed

comment:4 Changed at 2012-03-13T07:18:49Z by zooko

comment:3 seems to have an incorrect patch id in it. The patch that fixed this issue is [d3d5ac12c0ca3e718ac152ea6d244988beaba3a0/git].

comment:5 Changed at 2012-03-13T07:22:48Z by zooko

  • Milestone set to 0.6.0
Note: See TracTickets for help on using tickets.