I get the following error when compiling Crypto++ 5.1 on Mac OS X 10.2.8, using gcc 3.3 build 1435:

g++ -g -pipe -D__pic__ -c esign.cpp
esign.cpp: In member function `virtual void
CryptoPP::InvertibleESIGNFunction::GenerateRandom(CryptoPP::RandomNumber Generator&,
const CryptoPP::NameValuePairs&)':
esign.cpp:97: error: cannot declare variable `<anonymous>' to be of type `const
CryptoPP::NameValuePairs'
esign.cpp:97: error: because the following virtual functions are abstract:
cryptlib.h:283: error: virtual bool
CryptoPP::NameValuePairs::GetVoidValue(const char*, const std::type_info&,
void*) const
esign.cpp:97: confused by earlier errors, bailing out
{standard input}:1463:FATAL:.abort detected. Assembly stopping.
make: *** [esign.o] Error 1


Since I could find no information on this, I tried to simply make the function non-abstract, by defining it like this:

virtual bool GetVoidValue(const char *name, const std::type_info &valueType, void *pValue) const {return false;};

(I.e. exactly the same as in NullNameValuePairs.) This yielded the following moderately helpful message:

g++ -g -pipe -D__pic__ -c esign.cpp
esign.cpp: In member function `virtual void
CryptoPP::InvertibleESIGNFunction::GenerateRandom(CryptoPP::RandomNumber Generator&,
const CryptoPP::NameValuePairs&)':
esign.cpp:97: internal compiler error: in cp_expr_size, at cp/cp-lang.c:377
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://developer.apple.com/bugreporter> for instructions.
{standard input}:1463:FATAL:.abort detected. Assembly stopping.
make: *** [esign.o] Error 1


Making the variable primeParam (esign.cpp:97) hold a NameValuePairs instance instead of a reference to it seemed to fix the compile error, but I don't know if this will cause any problems further on. After "fixing" the same problem in luc.cpp, rabin.cpp, rsa.cpp and rw.cpp compilation succeeds, but the validation fails with this message:

LUC validation suite running...

passed    signature key validation
passed    signature and verification
passed    checking invalid signature

CryptoPP::Exception caught: Integer: missing Max argument

Since luc.cpp was one of the files I edited, I suspect that the fix was in fact incorrect.

Any help or hints on how to fix it would be much appreciated.

// Adam


[EMAIL PROTECTED]:cryptopp$ g++ -v Reading specs from /usr/libexec/gcc/darwin/ppc/3.3/specs Thread model: posix gcc version 3.3 20030304 (Apple Computer, Inc. build 1435)

[EMAIL PROTECTED]:cryptopp$ uname -a
Darwin powerbook.local. 6.8 Darwin Kernel Version 6.8: Wed Sep 10 15:20:55 PDT 2003; root:xnu/xnu-344.49.obj~2/RELEASE_PPC Power Macintosh powerpc




Reply via email to