icc can't compile cryptopp,

icc can't compile cryptopp,

Can anyone compile cryptopp with the icc?


I'm failing here:

icc -g -pipe -c elgamal.cpp
pubkey.h(209): warning #279: controlling expression is constant
assert(!"ProcessRecoverableMessage() not implemented");

misc.h(236): warning #186: pointless comparison of unsigned integer with zero
if (a < 0)
detected during instantiation of "std::string CryptoPP::IntToString(T, unsigned int) [with T=unsigned int]"

secblock.h(251): warning #186: pointless comparison of unsigned integer with zero
{assert(index >= 0 && (unsigned int)index < m_size); return m_ptr[index];}
detected during instantiation of "T &CryptoPP::SecBlock::operator[](I) [with T=byte={unsigned char}, A=CryptoPP::AllocatorWithCleanup, I=unsigned int]"

elgamal.h(81): error: identifier "MaxPlaintextLength" is undefined
unsigned int FixedMaxPlaintextLength() const {return MaxPlaintextLength(FixedCiphertextLength());}

compilation aborted for elgamal.cpp (code 2)
make: *** [elgamal.o] Error 2

10 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

What version of cryptopp are you trying to compile? I grabbed the latest 5.2.1 and had no problems compiling with new (9.1.044) and old (8.1.021) ICC compilers (IA-32).

It might be helpful for you to preprocess elgamal.cpp and attach it to this post. One of us can then try to repdoduce the error.

Oops -- I thought this forum had a file upload mechanism!

I managed to paste your dump into a file. And it successfully compiles, again with old and new compilers. What compiler version are you using? It's IA-32, right? Does the failure occur with the preprocessed version?

I don't know why you would get the compile error. I'm using the same preprocessed file, options, and compiler as you, but no error!

Your "crazy slow" compile times should be unrelated to the error you're seeing, but they are quite disconcerting. Compile time should be on-par with GCC for most translation units. And your machine (PIII) should be fine -- unless your memory footprint gets out of hand and you start swapping to disk. Have you watched the memory usage of ICC (try top or memusage)? What type of license are you using -- does it involve the network? Is your network connectivity to your license server sane? Where does ICC reside -- on a local filesystem, or on NFS? Do other accesses to that filesystem appear slow?

> I also tried compiling just the two failing files with: gcc -g -pipe -c elgamal.cpp; gcc -g -pipe -c validat2.cpp

> But then I can't link.

Mixing/matching GNU-compiled objects with ICC-compiled objects should not be a problem. Make sure you're using icpc for the link.

> still slow compile

Which of the files is giving the horrific compile time? Most of them? I might be able to find a PIII to try and reproduce on. Is this even at -O0?

I have the same problem here. When compiling crypto++ using icc 9.1.045, it stops on the same code.

Hi, I'm the author/maintainer of Crypto++. I can't install ICC due to the installer not recognizing my serial number and license file. However I think there is a good chance this compileproblem can be fixed by adding"this->" in front of "MaxPlaintextLength" on the line that is causing the compiler error.

If you guys have future problems with the Crypto++ library, you can post them to the Crypto++ mailing list which I monitor much more frequently.

This fixes the problem indead. Thank you !

I'd like to note, for those who might arrive on this page by search engine, that the latest release of Crypto++ (version 5.5) should compile with Intel C++ Compiler 9.1 out of the box. It's available from http://www.cryptopp.com.

llazzaro's picture

I had the same error. I fix it installing libc i386

hope ot helps

icc version : 11.0

Login to leave a comment.