[ Long time subscriber, posting from a new address ;-) ]
I'm trying to build crypto++ with clang.

It's throwing some errors like:

> clang++ -DNDEBUG -g -O2 -arch x86_64 -arch i386 -DCRYPTOPP_DISABLE_ASM -pipe 
> -c panama.cpp
> panama.cpp:425:2: error: use of undeclared identifier 'PadLastBlock'
>         PadLastBlock(this->BLOCKSIZE, 0x01);
>         ^
>         this->
> panama.cpp:500:22: note: in instantiation of member function
>       'CryptoPP::Weak::PanamaHash<CryptoPP::EnumToType<CryptoPP::ByteOrder, 1>
>       >::TruncatedFinal' requested here
> template class Weak::PanamaHash<BigEndian>;
>                      ^
> In file included from panama.cpp:9:
> In file included from ./panama.h:5:
> ./iterhash.h:38:7: note: must qualify identifier to find this declaration in 
> dependent
>       base class
>         void PadLastBlock(unsigned int lastBlockSize, byte padFirst=0x80);
>              ^
> panama.cpp:425:2: error: no member named 'PadLastBlock' in
>       'CryptoPP::Weak::PanamaHash<LittleEndian>'
>         PadLastBlock(this->BLOCKSIZE, 0x01);
>         ^~~~~~~~~~~~
> panama.cpp:501:22: note: in instantiation of member function
>       'CryptoPP::Weak::PanamaHash<CryptoPP::EnumToType<CryptoPP::ByteOrder, 0>
>       >::TruncatedFinal' requested here
> template class Weak::PanamaHash<LittleEndian>;
>                      ^
> In file included from panama.cpp:9:
> In file included from ./panama.h:4:
> In file included from ./strciphr.h:31:
> In file included from ./seckey.h:9:


I fixed these errors by inserting qualifying 'this->' in several places in the 
crypto++ sources.
I would like to see these changes rolled into the next release.
[ When built with gcc 4.2.1, crypto++ builds and passes all its' tests with 
these changes in place. ]


> diff -r /Volumes/Bay2/LLVM/cryptopp561/algebra.cpp 
> /Volumes/Bay2/Alex/cryptopp/cryptopp5.6.1/algebra.cpp
> 61c61
> <     while (!this->Equal(g[i1], this->Identity()))
> ---
> >     while (!Equal(g[i1], this->Identity()))
> diff -r /Volumes/Bay2/LLVM/cryptopp561/eccrypto.cpp 
> /Volumes/Bay2/Alex/cryptopp/cryptopp5.6.1/eccrypto.cpp
> 438c438
> <     this->SetSubgroupGenerator(G);
> ---
> >     SetSubgroupGenerator(G);
> 594c594
> <             Element gq = gpc ? 
> gpc->Exponentiate(this->GetGroupPrecomputation(), q) : 
> this->ExponentiateElement(g, q);
> ---
> >             Element gq = gpc ? 
> > gpc->Exponentiate(this->GetGroupPrecomputation(), q) : 
> > ExponentiateElement(g, q);
> 632c632
> <     this->SetPublicElement(P);
> ---
> >     SetPublicElement(P);
> diff -r /Volumes/Bay2/LLVM/cryptopp561/eccrypto.h 
> /Volumes/Bay2/Alex/cryptopp/cryptopp5.6.1/eccrypto.h
> 46c46
> <             this->SetSubgroupGenerator(G);
> ---
> >             SetSubgroupGenerator(G);
> 148c148
> <             {this->AccessGroupParameters() = params; 
> this->SetPublicElement(Q);}
> ---
> >             {this->AccessGroupParameters() = params; SetPublicElement(Q);}
> 150c150
> <             {this->AccessGroupParameters().Initialize(ec, G, n); 
> this->SetPublicElement(Q);}
> ---
> >             {this->AccessGroupParameters().Initialize(ec, G, n); 
> > SetPublicElement(Q);}
> 169c169
> <             {this->GenerateRandom(rng, params);}
> ---
> >             {GenerateRandom(rng, params);}
> 171c171
> <             {this->GenerateRandom(rng, DL_GroupParameters_EC<EC>(ec, G, 
> n));}
> ---
> >             {GenerateRandom(rng, DL_GroupParameters_EC<EC>(ec, G, n));}
> diff -r /Volumes/Bay2/LLVM/cryptopp561/panama.cpp 
> /Volumes/Bay2/Alex/cryptopp/cryptopp5.6.1/panama.cpp
> 425c425
> <     this->PadLastBlock(this->BLOCKSIZE, 0x01);
> ---
> >     PadLastBlock(this->BLOCKSIZE, 0x01);
> diff -r /Volumes/Bay2/LLVM/cryptopp561/secblock.h 
> /Volumes/Bay2/Alex/cryptopp/cryptopp5.6.1/secblock.h
> 91c91
> <             this->CheckSize(n);
> ---
> >             CheckSize(n);

-- Marshall

-- 
You received this message because you are subscribed to the "Crypto++ Users" 
Google Group.
To unsubscribe, send an email to [email protected].
More information about Crypto++ and this group is available at 
http://www.cryptopp.com.

Reply via email to