<snip> g++ -O2 -march=pentium4 -funroll-loops -pipe -c algebra.cpp In file included from seckey.h:10, from 3way.h:7, from 3way.cpp:5: simple.h: In member function `bool CryptoPP::Unflushable<T>::Flush(bool, int, bool)': simple.h:71: error: `NULL_CHANNEL' undeclared (first use this function) simple.h:71: error: (Each undeclared identifier is reported only once for each function it appears in.) simple.h: In member function `bool CryptoPP::Unflushable<T>::ChannelFlush(const std::string&, bool, int, bool)': simple.h:80: error: there are no arguments to `AttachedTransformation' that depend on a template parameter, so a declaration of `AttachedTransformation' must be available simple.h:80: error: (if you use `-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated) simple.h: In member function `void CryptoPP::Multichannel<T>::Initialize(const CryptoPP::NameValuePairs&, int)': simple.h:134: error: `NULL_CHANNEL' undeclared (first use this function) simple.h: In member function `bool CryptoPP::Multichannel<T>::Flush(bool, int, bool)': simple.h:136: error: `NULL_CHANNEL' undeclared (first use this function) simple.h: In member function `bool CryptoPP::Multichannel<T>::MessageSeriesEnd(int, bool)': simple.h:138: error: `NULL_CHANNEL' undeclared (first use this function) simple.h:138: error: there are no arguments to `ChannelMessageSeriesEnd' that depend on a template parameter, so a declaration of `ChannelMessageSeriesEnd' must be available simple.h: In member function `byte* CryptoPP::Multichannel<T>::CreatePutSpace(unsigned int&)': simple.h:140: error: `NULL_CHANNEL' undeclared (first use this function) simple.h: In member function `unsigned int CryptoPP::Multichannel<T>::Put2(const byte*, unsigned int, int, bool)': simple.h:142: error: `NULL_CHANNEL' undeclared (first use this function) simple.h: In member function `unsigned int CryptoPP::Multichannel<T>::PutModifiable2(byte*, unsigned int, int, bool)': simple.h:144: error: `NULL_CHANNEL' undeclared (first use this function) simple.h: In member function `bool CryptoPP::Multichannel<T>::ChannelPutModifiable(const std::string&, byte*, unsigned int)': simple.h:151: error: there are no arguments to `ChannelPut' that depend on a template parameter, so a declaration of `ChannelPut' must be available In file included from 3way.h:7, from 3way.cpp:5: seckey.h: In member function `unsigned int CryptoPP::BlockCipherBaseTemplate<INFO, INTERFACE>::BlockSize() const': seckey.h:159: error: `BLOCKSIZE' undeclared (first use this function) seckey.h: In constructor `CryptoPP::BlockCipherTemplate<DIR, BASE>::BlockCipherTemplate(const byte*)': seckey.h:169: error: `DEFAULT_KEYLENGTH' undeclared (first use this function) seckey.h: In constructor `CryptoPP::BlockCipherTemplate<DIR, BASE>::BlockCipherTemplate(const byte*, unsigned int, unsigned int)': seckey.h:173: error: there are no arguments to `SetKeyWithRounds' that depend on a template parameter, so a declaration of `SetKeyWithRounds' must be available seckey.h: In constructor `CryptoPP::MessageAuthenticationCodeTemplate<BASE>::MessageAuthenticationCodeTemplate(const byte*)': seckey.h:197: error: `DEFAULT_KEYLENGTH' undeclared (first use this function) seckey.h: In member function `std::string CryptoPP::MessageAuthenticationCodeTemplate<BASE>::AlgorithmName() const': seckey.h:201: error: there are no arguments to `StaticAlgorithmName' that depend on a template parameter, so a declaration of `StaticAlgorithmName' must be available make: *** [3way.o] Error 1 make: *** Waiting for unfinished jobs.... algebra.cpp: In member function `virtual const T& CryptoPP::AbstractEuclideanDomain<T>::Gcd(const T&, const T&) const': algebra.cpp:57: error: there are no arguments to `Identity' that depend on a template parameter, so a declaration of `Identity' must be available algebra.cpp:57: error: (if you use `-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated) make: *** [algebra.o] Error 1
Created attachment 30386 [details, diff] crypto++-5.1-gcc34.diff
fixes the gcc 3.4 problems for me. crypto++ relies on undefined identifiers beeing resolved on template instantiation time, but this is not iso C++ conformant. so the diff is quite big. pls also consider including the amd64 patch from bug #49034. i have a changed ebuild with both patches and it runs nicely.
Thomas: Have you submitted these patches upstream?
Committed... Should be hitting the mirrors soon. I put the gcc 3.4 patch up on the distfiles mirror to keep the portage tree smaller.